Computer Science 330
Operating Systems
Fall 2022, Siena College
Lecture 0x15: I/O Systems; Wrapup
Date: Monday, December 12, 2022
Agenda
- Announcements
- Final exam Thursday, December 15, 8:30 AM
- Advent of Code bonus available up to the morning of our final
exam: gold stars worth 2 points, silver stars worth 1, up to a
total of 20 programming project points (problems are getting
harder but you can still go back and do the easier ones)
- Programming Project 4: Roger Bacon Shell with Pipes and
Redirection [HTML] [PDF] complete any remaining demos today or tomorrow
- Lab 8: Working Set Simulation [HTML] [PDF] simulator
implementation due this afternoon
- Disk Scheduling Algorithms
- Recall: cost of a disk access 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)
- Looking at some exercises for OS zyBook Chapter 9
- Section 2, 9.2.2
- Section 3, 9.3.2, 9.3.3, 9.3.4
- Parity and RAID
- Looking at some more exercises for OS zyBook Chapter 9
- Thank you!
Links