Tuesday, August 12, 2025

CST334: Week 7 (Week 31)

This week we learned about topics relating to device I/O, disks and persistent storage, file system structure and operations.

With regard to I/O devices, we covered different ways of handling data transfers between the CPU and peripherals devices. Polling(programmable) I/O involves the CPU constantly checking a device's status, i.e. polling the device. It’s simple but inefficient due to wasted CPU cycles. Interrupt-driven I/O is more efficient since devices interrupt the CPU only when they need attention. That way the CPU can work on other tasks while waiting. DMA-based I/O (Direct Memory Access) is better in most cases. It allows I/O devices to transfer data directly to and from memory without involving the CPU, minimizing CPU overhead. It requires dedicated hardware called a DMA controller.

We also covered hard drives, their basic structure, and performance implications. Hard drives are made up of spinning platters, usually in a stacked configuration. The platters have magnetic coatings for storing data. Tracks are rings on the plater that expand outward from the center. One ring inside of the other. The tracks are divided into sectors. A head moves across the platters to read or write data at commanded locations. Access time is the time it takes to retrieve data. It’s impacted by seek time, the time it takes for the head to move to the correct track. It’s also impacted by rotational delay, the time it takes for the targeted sector to rotate under the head.

Lastly, we covered the basics of files and directories. At a basic level, files and folders are just sequences of bits/bytes. Directories organize the files (and other directories) hierarchically. A superblock holds important file system information, like its size and the number of available blocks. Inodes contain metadata about files and directories (ownership, permissions, etc.) and pointers to their data blocks. Blocks are the basic unit of storage for file contents. The metadata describes files and directories, and are used for file system management and access.

No comments:

Post a Comment

CST370: Week 7 (Week 58)

 This week we covered non-comparison sorting, dynamic programming, Warshall's algorithm, Floyd's algorithm, Greedy Technique, and Pr...