Operating Systems Unit 3 - Files Management
Operating Systems Unit 3 - Files Management
By Dr D B Ntalasha
SCAN and C-SCAN perform better for systems that place a heavy load on the disk
Less starvation
The disk-scheduling algorithm should be written as a separate module of the operating system, allowing it to be
replaced with a different algorithm if necessary
To use a disk to hold files, the operating system still needs to record its own data structures on the
disk
Partition the disk into one or more groups of cylinders, each treated as a logical disk
Logical formatting or “making a file system”
To increase efficiency most file systems group blocks into clusters
Disk I/O done in blocks
File I/O done in clusters
Swap-space can be carved out of the normal file system, or, more commonly, it can be in a separate disk
partition (raw)
Swap-space management
4.3BSD allocates swap space when process starts; holds text segment (the program) and data segment
Kernel uses swap maps to track swap-space use
Solaris 2 allocates swap space only when a dirty page is forced out of physical memory, not when the virtual
memory page is first created
File data written to swap space until write to file system requested
Other dirty pages go to swap space due to no other home
Text segment pages thrown out and reread from the file system as needed
Checksums kept with pointer to object, to detect if object is the right one and whether
it changed
WORM (“Write Once, Read Many Times”) disks can be written only
once
Thin aluminum film sandwiched between two glass or plastic platters
To write a bit, the drive uses a laser light to burn a small hole through
the aluminum; information can be destroyed by not altered
Very durable and reliable
Read-only disks, such ad CD-ROM and DVD, com from the factory
with the data pre-recorded
Tapes
Compared to a disk, a tape is less expensive and holds more data, but
random access is much slower.
Tape is an economical medium for purposes that do not require fast
random access, e.g., backup copies of disk data, holding huge volumes
of data.
Large tape installations typically use robotic tape changers that move
tapes between tape drives and storage slots in a tape library
stacker – library that holds a few tapes
silo – library that holds thousands of tapes
A disk-resident file can be archived to tape for low cost storage; the
computer can stage it back into disk storage for active use.
Operating System Support
Major OS jobs are to manage physical devices and to
present a virtual machine abstraction to applications
The cheapest tape drives and the cheapest disk drives have had
about the same storage capacity over the years