Computer Science 330
Operating Systems
Fall 2025, Siena University
Lecture 0x12: Mass Storage Structure
Date: Friday, November 21, 2025
Agenda
- Announcements
- The next readings/activities from OS zyBook
- Chapter 19, Sections 1-3, due Monday, November 24
- Chapter 19, Sections 4-5, Chapter 22, due Monday, December 1
- Programming Project 5: Roger Bacon Shell with Pipes and
Redirection [HTML] [PDF] parsing functionality now due, everything
else in 2 weeks
- Exam 2 recap
- Hard Disk Scheduling Algorithms
- Recall: cost of a disk access for a mechanical/magnetic
storage device includes seek time and rotational latency
- We wish to minimize seek time by minimizing the distance the
read/write head has to move in order to service the incoming
requests by reordering requests based on cylinder number
- This optimization may be done by the disk, the hardware
controller, or by the operating system
- Compare algorithms by examining their performance on a given
request queue
- First-Come First-Served (FCFS)
- Shortest Seek Time First (SSTF)/Closest Cylinder Next
- SCAN or Elevator Algorithm
- LOOK Algorithm
- Circular Algorithms
- Comparing Disk Scheduling Algorithms
- SSTF or LOOK are often reasonable for a default algorithm
- SCAN and C-SCAN are better for heavily loaded systems
where LOOK is unlikely to save much and SSTF runs the risk of
starvation
- performance depends on the frequency and types of requests
- we may want to consider some of this when we decide
how to organize file systems
- FreeBSD's ufs filesystem uses an elevator algorithm (see
/usr/src/sys/ufs/ufs/ufs_disksubr.c)
- Error detection and correction
- Lab 8: Working Set Simulation [HTML] [PDF]