Operating Systems (Final) Flashcards
File System
A way to organize and manage files on a storage device.
File System Components
Files, FCB’s, directories, and hardware/software used to implement the secondary storage.
Speed of Secondary Storage
Secondary storage is much slower than CPU and main memory, but still faster than disk drives and tape drives (I/O stuff)
Random Access of Sec Storage
CD writers, Hard Drives
Sequential Access of Sec Storage
Tape Drives
Seq. vs Random Access
Sequential is faster! Its cheaper too! However, what is best depends on the situation. It is more effective to use random access when dealing with a large database, because otherwise the entire database would have to be loaded in sequential.
Indexed Files
A file with an index that allows easy random access, if the computer is given the index.
FCB
File Control Block. Holds file metadata. Can include: name, owner, date, path, type, and more properties.
Seek()
Place file pointer at a location in bytes. Used to navigate a file. Can be used by index files to retrieve the location to specific records even faster.
Tell()
Return current byte location. Used to navigate a file. Can be used by index files to retrieve the location to specific records even faster.
chmod 666 a.out error
Running a.out with those permissions set is impossible. 666 means read and write permissions is given to everyone, but not execution permissions. Give execution permissions to fix it (done with +x).
Disk
A drive with a spinning disk where data is written and read by a disk head.
Track
A ring on the disk.
Sector
A piece (like a slice) on the disk.
Block
A logical unit of storage on the disk, located by a specific track/sector.
Contiguous versus linked allocation
Files must be allocated in a contiguous manner, while in linked allocation, files can be anywhere, as blocks point to other blocks until the last block in the file reads EOF.
Linked allocation benefits
There is much less fragmentation, Dynamic allocation, and easier file expansion.
FAT benefits
It is better than linked allocation because all linking information is held in a separate table, instead of it being tied to the blocks. The table is also stored in cache memory.
How is block size determined?
By factors such as the size of the disk, the size of the files to be stored, and system performance requirements all play a factor.
Logical to physical mapping of blocks
Contiguous, linked, and multi-indexed allocation. Any of these schemes can be used to translate blocks, but it depends on the storage system requirements.
FCSF Disk Head Algorithm
Serves read/write requests in the order they are received.
Shortest Seek Time First
Serves requests by shortest seek time.
Scan
Services requests in a single direction, it reverses and serves the requests in the other direction.
Cyclic Scan
Similar to scan, but instead of reversing direction, it starts back at the beginning of the disk before continuing.