Week 9 Flashcards
(13 cards)
Free Space Management
Reclaims lost space when files are deleted or shortened
Whats a bit vector
Very similar to a FAT and how it handles linking but each bit represents a datablock on the system. Easy to get contiguous space but bad for medium-large sized disks
For spinning drives, what determines the time to access a block? And what factor increases said time?
How long it takes to move the r/w to the correct track, and the length of time for the block to rotate under the head.
Disk Fragmentation
What is disk fragmentation?
The condition where data on a storage device is scattered across different locations on the disk. Happens when we modify, create and delete data resulting in non sequential segments.
In disk scheduling, determine the total tracks seeked using FCFS and SCAN on this list:
Head is at track 50, curr list of requests : 100, 20, 150, 21, 121
SCAN: SO 50, SO 21, SO 29, SI 129, SI 1 TOTAL = 211
FCFS: SO 50 SI 80 SO 130 SI 129 SO 100 TOTAL = 489
What is “Free Behind”
Free the block as soon as the next one is requested
What is “Free Ahead”
Read next block before it’s requested by the process
What’s an advantage of Direct Memory Access
Efficiency. Its inefficient to transfer one word at a time, thus DMA wastes less CPU cycles and enables real time processing.
What is the recovery program?
Walks the file system from the super block. It starts at the top dir, walks each dir and file checking against free list.
What is Direct Memory Access?
Allows devices to transfer data directory to or from memory without constant CPU involvement. A DMA controller manages the transfer and interrupts the cpu only when its completed.
key idea: we give controller access the memory bus, because some devices transfer data in blocks not words.
short definition: Uses a DMA controller to allow for device to finish transmitting all of its data before interrupting the cpu.
How do we ensure the file system is consistent?
One field in the PC is used to mark a potential problem. Once the file system is mounted, we write the PCB back with a field set to indicate a problem, and when the file system is shut down correctly, we write the PCB back with the flag unset. if it shuts down without unsetting, we have an issue.
What is a journaled file system?
Transaction based. Actions are written to log on disk before the action is taken. It then is cleared after the action is successfully completed, and written to the disk. This way for recovery, we don’t need to check the entire disk, just the log.
What is a distributed file system?
A file system that enables access to files from multiple devices over a network as if they were on a local disk