OS Module 5 (Mass-Storage Systems, File-System Interface and Implementation)
OS Module 5 (Mass-Storage Systems, File-System Interface and Implementation)
o Busses vary, including EIDE, ATA, SATA, USB, Fibre Channel, SCSI, SAS,
Firewire
o Host controller in computer uses bus to talk to disk controller built into drive or
storage array
Magnetic Disks
Platters range from .85” to 1->” (historically)
o Commonly 3.5”, 2.5”, and 1.8”
Range from 30GB to 3TB per drive
Performance
o Transfer Rate – theoretical – 6 Gb/sec
o Effective Transfer Rate – real – 1Gb/sec
o Seek time from 3ms to 12ms – 9ms common for desktop drives
o Average seek time measured or calculated based on 1/3 of tracks
o Latency based on spindle speed
-> 1/(RPM * 60)
o Average latency = ½ latency
The 1-dimensional array of logical blocks is mapped into the sectors of the disk
sequentially
o Sector 0 is the first sector of the first track on the outermost cylinder
o Mapping proceeds in order through that track, then the rest of the tracks in that
cylinder, and then through the rest of the cylinders from outermost to innermost
o Logical to physical address should be easy
Source diginotes.in Save The Earth.Go Paperless
-> Except for bad sectors
-> Non-constant # of sectors per track via constant angular velocity
Disk Attachment
Disk Scheduling
The operating system is responsible for using hardware efficiently — for the disk drives,
this means having a fast access time and disk bandwidth
Minimize seek time
Seek time seek distance
Disk bandwidth is the total number of bytes transferred, divided by the total time
between the first request for service and the completion of the last transfer
There are many sources of disk I/O request
OS
System processes
Users processes
I/O request includes input or output mode, disk address, memory address, number of
sectors to transfer
OS maintains queue of requests, per disk or device
Idle disk can immediately work on I/O request, busy disk means work must queue
98, 183, 37, 122, 1->, 12->, 65, 67
Head pointer 53
SSTF
Shortest Seek Time First selects the request with the minimum seek time from the current
head position
SSTF scheduling is a form of SJF scheduling; may cause starvation of some requests
Illustration shows total head movement of 236 cylinders
C-LOOK
LOOK a version of SCAN, C-LOOK a version of C-SCAN
Arm only goes as far as the last request in each direction, then reverses direction
immediately, without first going all the way to the end of the disk
Access Control
Protection can be applied to non-file resources
Solaris 10 provides role-based access control (RBAC) to implement least privilege
o Privilege is right to execute system call or use an option within a system call
o Can be assigned to processes
o Users assigned roles granting access to privileges and programs
-> Enable role via password to gain its privileges
o Similar to access matrix
Security
The Security Problem:
System secure if resources used and accessed as intended under all circumstances
l Unachievable
Intruders (crackers) attempt to breach security
Threat is potential security violation
Attack is attempt to breach security
Attack can be accidental or malicious
Easier to protect against accidental than malicious misuse
Security Violation Categories
Breach of confidentiality
o Unauthorized reading of data
Breach of integrity
o Unauthorized modification of data
Breach of availability
o Unauthorized destruction of data