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.