Computer Science BS Journal (CST334) : Week 7
This week in CST334 our lectures covered: IO Devices, Hard Drives, Files and Directories, File Systems(Data), and File Systems(Access). In this learning journal I'll write and explanation/what I think to be the most important bits of each subject.
1. I/O Devices
I/O (Input/Output) devices are hardware that allow a computer to communicate with the outside world — keyboards, displays, printers, network cards, sensors, etc. They operate via controllers that communicate with the CPU and memory.
Key Takeaways:
-
Two main types: block devices (e.g., disks) and character devices (e.g., keyboards).
-
Managed through device drivers.
-
Performance depends on throughput (data per second) and latency (time per operation).
-
Communication methods: polling, interrupts, DMA (Direct Memory Access).
2. Hard Drives
Hard Disk Drives (HDDs) store data magnetically on spinning platters. Data is read/written by a moving read/write head.
Key Takeaways:
-
Performance factors: seek time, rotational latency, transfer rate.
-
Organized into tracks, sectors, and cylinders.
-
Sequential reads/writes are much faster than random access.
-
HDDs are non-volatile but slower than SSDs (solid-state drives).
3. Files and Directories
Files store data; directories organize files into a hierarchy. The OS manages these structures for storage and retrieval.
Key Takeaways:
-
Files have metadata (size, permissions, timestamps) and data.
-
Directories map names to file metadata (inode in Unix-like systems).
-
Paths can be absolute or relative.
-
Provides a logical view over physical storage.
4. File Systems (Data)
This refers to how file data and metadata are stored on disk — the on-disk structures that organize and manage storage space.
Key Takeaways:
-
Structures: superblock, inodes, data blocks, free space lists/bitmaps.
-
Must handle allocation, free space tracking, and crash recovery.
-
Examples: FAT32, NTFS, ext4.
-
Balances performance, space efficiency, and reliability.
5. File Systems (Access)
This is the interface the OS provides to programs for interacting with files and directories.
Key Takeaways:
-
Common API calls:
open(),read(),write(),close(),mkdir(),unlink(). -
Supports permissions and access control.
-
May include caching and buffering for performance.
-
Virtual File System (VFS) layer abstracts different file system types.
Comments
Post a Comment