Disk Scheduling Algorithms Simulation Lab

Size: px
Start display at page:

Download "Disk Scheduling Algorithms Simulation Lab"

Transcription

1 Disk Scheduling Algorithms Simulation Lab In this lab, we will start to look at the various disk scheduling algorithms which we discussed in the course. Here is a brief summary of the algorithms: 1. FCFS (First Come, First Served) o perform operations in order requested o no reordering of work queue o no starvation: every request is serviced o poor performance 2. SSTF (Shortest Seek Time First) o after a request, go to the closest request in the work queue, regardless of direction o reduces total seek time compared to FCFS o Disadvantages starvation is possible; stay in one area of the disk, if very busy switching directions slows things down 3. SCAN o go from the outside to the inside servicing requests and then back from the outside to the inside servicing requests o repeats this over and over o reduces variance compared to SSTF 4. LOOK o like SCAN but stops moving inwards (or outwards) when no more requests in that direction exist 5. C-SCAN (circular scan) o moves inwards, servicing requests until it reaches the innermost cylinder; then, jumps to the outside cylinder of the disk without servicing any requests o o repeats this over and over variant: service requests from inside to outside, and then skips back to the innermost cylinder 6. C-LOOK o moves inwards, servicing requests until there are no more requests in that direction; then, it jumps to the outermost outstanding requests o o repeats this over and over variant: service requests from inside to outside, then skips back to the innermost request The Saylor Foundation 1

2 For this exercise, we will run a Java disk scheduling simulator. Please make sure that you have at least the Java runtime environment setup. The simulations can be run on any platform that supports Java. For the purposes of this exercise, we will focus on running this on a Windows PC. Initial Setup 1. If you do not have Java installed, please download and install* the Java runtime environment. 2. Create a folder called Rec10 on your computer. 3. You may read through the University of Texas at San Antonio s user s guide* if you would like. Download disk.zip by clicking on the link labeled disk.zip. 4. Extract the zip file to the Rec10 folder. 5. If you are running Windows, start an MS-DOS command window (choose run from your Windows start menu and type command in the window). 6. Once you have an MS-DOS command window, type cmd/e. 7. Switch to the Rec10 folder. The command to do this is: cd \Rec10 *Terms of Use: Please respect the copyright and terms of use on the webpages linked above. Getting Familiar with the Simulator 1. Execute the rundisk batchfile. 2. You will see the main simulator window which should look like Figure 1. Click on the quit button in the upper right hand corner to exit the simulator. Figure 1 The Saylor Foundation 2

3 3. Go through the simulator tutorial that you can find in the directory that you expanded disk.zip into. Edit the diskheadconfig file so that it has your name instead of New User. 4. In order to perform a new experiment, we need to edit the diskheadconfig file and change myrun to myrun1 and myexp to myexp1. Your diskheadconfig file should look similar to Figure 2 Figure 2 5. Copy myrun.run into myrun1.run and myexp.exp into myexp1.exp. 6. Edit myrun1.run, changing the first line to name myrun1. Change the second line to reference myrun1 instead of myrun. 7. Edit myexp1.exp, changing the first line to name myexp1 and change all occurrences of myrun to myrun1. 8. Run the simulator. You should get the same results are before. 9. Let s make a few changes to the experiment. o Change 30 in first nextblock line to 25. This is a probability distribution for o generating the next block. The next block can be between 25 and 40. In the first numblocks line change 20 to 30. This tells the simulator how many blocks to request to generate from a distribution. o In the second interarrival line, change 5 to 3 and 15 to 10. The line should now read: interarrival uniform 3 10 This specifies that there should now be an interarrival time somewhere between 3 and 10. o In the second numblocks line, change 4 to 20. The Saylor Foundation 3

4 10. Run the simulator again. When the run is done, click the Show Table Data button. Make sure there were 3 runs, each having 50 seeks. (Check the Count column.) You should see something similar to figure 3. Figure To help understand what is happening a bit more, let s look at the actual data. Your results might by a bit different, since this is a random distribution. To show this, click on Show Run Data Table (see Figure 4). Figure 4 All of the data can be found in Appendix A. For the purposes of our discussion, I have included a portion of each table. Let s first look at FCFS, a portion of which is shown in Table 1 below: The Saylor Foundation 4

5 Block Time From To Request Start End Seek Turnaround Table 1: FCFS Notice how the first request starts at time 2.23 and ends at The starting block is 4, and the ending block is 33. The next request comes in at 3.12 but does not start until 4.13, since it has to wait until the first request is finished. First come, first served (FCFS) is going to simply take each request as it comes in and service it. All servicing will be done sequentially. If you look at the full table in Appendix A, you will find the statistics for this part of the experiment at the bottom of the table. Let s now look at STTF, which is a bit more complicated. Block Time From To Request Start End Seek Turnaround Table 2: SSTF Once again, we need to pay attention to the request time. Obviously, if a request has not been received yet, there is no way for the algorithm to determine that the seek time to that request is shorter. Looking at the second request, notice that the algorithm starts at 33 and ends at 117. The third request starts at 117 and ends at 37. You might wonder why we just did not go from 33 to 37 and then eventually to 117. However, notice that at the start time (4.13), the request for service to block 37 had not been received, so the algorithm had no knowledge of a closer request. As you look through the table data after running experiments, please keep track of the request time as well as the start time, since these are very The Saylor Foundation 5

6 important when determining the order of servicing requests. The full SSTF table can be found here. Finally, let s take a look at the table for the C-LOOK algorithm. I ve included a bit more data in Table 3 in order to help you understand exactly how the algorithm is working. The full table is available for viewing here. Block Time From To Request Start End Seek Turnaround Table 3 To make this easier, let s place the requests in order of arrival using the from block: 4, 33, 117, 36, 32, 37, 30, 35 Table 4 breaks down the servicing of requests as well as the requests in the queue for each point in time that we need to examine. Req No From To Request Start End In Queue In Queue Start at Finish ,4, ,5 4,5,6, ,5,6 4,5, ,6,8 4,6, ,6 4, Table 4 The Saylor Foundation 6

7 Let s discuss what is happening at each request: Req No 1 Since the service time ends at 4.13, request 2 is placed in the queue for waiting requests. 2 By the time that this service request has finished, requests 3, 4, and 5 have arrived and are in the queue. Notice that the disk head is sitting at block 117. While requests 4 and 5 are closer to 117 (37 and 35), the C- LOOK algorithm specifies that the disk head returns to the furthest request and then starts to work back towards the inside of the disk, so request 3 will be serviced next. 3 Requests 4 and 5 are in the queue when the servicing of this request starts. During the servicing, 6 and 7 also arrive in the queue. Since request 7 requires a move to block 32 and the disk head is moving inward, this will be serviced next. 7 Requests 4, 5, and 6 are in the queue at the beginning of servicing request 7 as well as at the end. Since request 5 requires a move to block 35, this will be the next request serviced. 5 Request 8 comes in just about the time that request 5 starts, so 4, 6, and 8 are in the queue. Since 8 only requires a move to block 36, this will be serviced next. 8 Request 4 and 6 are in the queue. If you look at the entire table of data in the appendix, you will see other requests that would be in the queue. However, we are just looking at a small segment of the data. Since request 4 only requires a move to 37, this request will be serviced next. 4 At this point, in our subset, only request 6 is left, so this will be serviced next. 6 Request 6 is now serviced. There are additional requests serviced beyond 6, but for the purpose of our discussion, we have only looked at processing through request 6. Table 5 The Saylor Foundation 7

8 12. Let s take a look at the summary data for each algorithm: Blocks Traveled in one Request Algorithm: FCFS Seek Time Turnaround Time Mean Minimum Maximum Standard Deviation Blocks Traveled in one Request Algorithm: SSTF Seek Time Turnaround Time Mean Minimum Maximum Standard Deviation Blocks Traveled in one Request Algorithm: C-LOOK Seek Time Turnaround Time Mean Minimum Maximum Standard Deviation Table 6 As you can see, SSTF and C-LOOK are pretty close as far as mean seek time. However, SSTF has a shorter turnaround time (the time from which a request enters the queue until it has been serviced.) As such, SSTF would be the best algorithm in this case. The Saylor Foundation 8

9 13. As a final step to familiarize yourself with the simulator, click on the Show Run Data Graph button. Make sure that you choose all runs. The graphs should be saved automatically to the log file. In the next section of the lab, you will look at the log file to analyze your results. Figure 5 The Saylor Foundation 9

10 Running an Experiment 1. Create a Rec11 directory, and do the following to create a separate set of files: o Copy the files from your Rec10 directory into this one. o Edit diskheadconfig, and change myrun1 to myrun2 and myexp1 to myexp2. o Copy myrun.run to myrun2.run and myexp.exp to myexp2.exp. o Edit the lines of these files so that they refer to myrun2 and myexp2. Be sure to change all of the run line of myexp2.exp. 2. You should now change myrun2.run so that a set of 250 requests with a first arrival time of 0 is used for the run. You also will want to modify the interarrival time so that it is constant at 10 and the NextBlock is uniform between 0 and 260. Please complete the following steps: o Delete the last four lines of myrun2.run. o Change the interarrival line form constant 2 to constant o Change the nextblock line from to o Change the firstarrival from 2.23 to 0. o Change numblocks from 20 to 250. o Change the layout line from uniform 2 to uniform 1. o Change the movement line from linear 0.5, 0.10 to linear Remove all but the last run line from myexp2.run. This line refers to the CLOOK algorithm, which we use for this experiment. 4. Check to make sure that the simulator will run with 250 requests. 5. Let s now take a look at how bad blocks affect disk performance. First, a little background. In order to account for bad disks, most disk drives today transparently map any disk blocks marked as bad to some special blocks on the disk that are reserved for that purpose. This makes the disk appear to have no bad blocks. For example, if the reserved blocks are on cylinder 245, then a request for a bad block on cylinder 30 will automatically go to cylinder 245. Because the operating system thinks that the disk in on cylinder 30, it will use this to make some decisions about where to move next. Because of this, there might just be some extra head movement. Let s now run some experiments to determine how bad blocks can impact disk performance. 6. Add the following two lines to myrun2.run: badfraction 0.0 baddestination constant 245 The first line tells us that there are no bad blocks, and the second line tells all that cylinder 245 has been reserved as a space to redirect bad blocks to. 7. Let s run the simulator again. What results do you obtain? Why? The Saylor Foundation 10

11 8. Now add a second run line to myexp2.exp. Copy the run line and add to the end of it: badfraction 0.1 This tells the simulator that every 10 th seek will be to cylinder 245, since 10 percent of the blocks are bad. 9. Let s run the simulator again. What do you find? Why? 10. Let s experiment with the fraction of bad blocks. Experiment with several values of the fraction between 0 and 0.1. As the fraction increases, does the turnaround time increase slowly, or is there a value above which it increases rapidly? 11. Now modify myexp2.exp so that it contains about 5 runs with the values of badfraction that you think are most instructive. Create a log file. Write a short paragraph summarizing your results, and put it at the end of the log file. 12. Compare the results of your log file with the answer key. The Saylor Foundation 11

12 Appendix A: Show Run Data Table FCFS Block Time From To Request Start End Seek Turnaround The Saylor Foundation 12

13 Mean Minimum Maximum Standard Deviation The Saylor Foundation 13

14 Block myrun1 SSTF Time From To Request Start End Seek Turnaround The Saylor Foundation 14

15 Mean Minimum Maximum Standard Deviation The Saylor Foundation 15

16 Block myrun1 C-LOOK Time From To Request Start End Seek Turnaround The Saylor Foundation 16

17 Mean Minimum Maximum Standard Deviation The Saylor Foundation 17

Disk Scheduling Algorithms Simulation Lab Answer Key. Initial Setup: there was no work for this that was not shown in the lab document.

Disk Scheduling Algorithms Simulation Lab Answer Key. Initial Setup: there was no work for this that was not shown in the lab document. Disk Scheduling Algorithms Simulation Lab Answer Key Initial Setup: there was no work for this that was not shown in the lab document. Running an Experiment 1. Create a Rec11 directory, and do the following

More information

CSCI-375 Lab 11 Disk Head Scheduling Simulator

CSCI-375 Lab 11 Disk Head Scheduling Simulator CSCI-375 Lab 11 Disk Head Scheduling Simulator Part I Instructions: Download the Disk Head Scheduling simulator from the following site: http://cs.stfx.ca/~ltyang/csci-375/labs/disk.zip and extract the

More information

Secondary Storage Management Rab Nawaz Jadoon

Secondary Storage Management Rab Nawaz Jadoon Secondary Storage Management Rab Nawaz Jadoon DCS COMSATS Institute of Information Technology Assistant Professor COMSATS University, Lahore Pakistan Operating System Concepts Secondary storage Secondary

More information

A Disk Head Scheduling Simulator

A Disk Head Scheduling Simulator A Disk Head Scheduling Simulator Steven Robbins Department of Computer Science University of Texas at San Antonio srobbins@cs.utsa.edu Abstract Disk head scheduling is a standard topic in undergraduate

More information

Disk Scheduling. Based on the slides supporting the text

Disk Scheduling. Based on the slides supporting the text Disk Scheduling Based on the slides supporting the text 1 User-Space I/O Software Layers of the I/O system and the main functions of each layer 2 Disk Structure Disk drives are addressed as large 1-dimensional

More information

CS420: Operating Systems. Mass Storage Structure

CS420: Operating Systems. Mass Storage Structure Mass Storage Structure James Moscola Department of Physical Sciences York College of Pennsylvania Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne Overview of Mass Storage

More information

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9 OPERATING SYSTEMS CS3502 Spring 2018 Input/Output System Chapter 9 Input/Output System Major objectives: An application s I/O requests are sent to the I/O device. Take whatever response comes back from

More information

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9 OPERATING SYSTEMS CS3502 Spring 2017 Input/Output System Chapter 9 Input/Output System Major objectives: An application s I/O requests are sent to the I/O device. Take whatever response comes back from

More information

Chapter 12: Secondary-Storage Structure. Operating System Concepts 8 th Edition,

Chapter 12: Secondary-Storage Structure. Operating System Concepts 8 th Edition, Chapter 12: Secondary-Storage Structure, Silberschatz, Galvin and Gagne 2009 Chapter 12: Secondary-Storage Structure Overview of Mass Storage Structure Disk Structure Disk Attachment Disk Scheduling Disk

More information

Chapter 12: Mass-Storage Systems. Operating System Concepts 8 th Edition,

Chapter 12: Mass-Storage Systems. Operating System Concepts 8 th Edition, Chapter 12: Mass-Storage Systems, Silberschatz, Galvin and Gagne 2009 Chapter 12: Mass-Storage Systems Overview of Mass Storage Structure Disk Structure Disk Scheduling 12.2 Silberschatz, Galvin and Gagne

More information

Disk Scheduling. Chapter 14 Based on the slides supporting the text and B.Ramamurthy s slides from Spring 2001

Disk Scheduling. Chapter 14 Based on the slides supporting the text and B.Ramamurthy s slides from Spring 2001 Disk Scheduling Chapter 14 Based on the slides supporting the text and B.Ramamurthy s slides from Spring 2001 1 User-Space I/O Software Layers of the I/O system and the main functions of each layer 2 Disks

More information

Lecture 9. I/O Management and Disk Scheduling Algorithms

Lecture 9. I/O Management and Disk Scheduling Algorithms Lecture 9 I/O Management and Disk Scheduling Algorithms 1 Lecture Contents 1. I/O Devices 2. Operating System Design Issues 3. Disk Scheduling Algorithms 4. RAID (Redundant Array of Independent Disks)

More information

Mass-Storage Structure

Mass-Storage Structure CS 4410 Operating Systems Mass-Storage Structure Summer 2011 Cornell University 1 Today How is data saved in the hard disk? Magnetic disk Disk speed parameters Disk Scheduling RAID Structure 2 Secondary

More information

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 420, York College. November 21, 2006

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 420, York College. November 21, 2006 November 21, 2006 The memory hierarchy Red = Level Access time Capacity Features Registers nanoseconds 100s of bytes fixed Cache nanoseconds 1-2 MB fixed RAM nanoseconds MBs to GBs expandable Disk milliseconds

More information

Module 13: Secondary-Storage Structure

Module 13: Secondary-Storage Structure Module 13: Secondary-Storage Structure Disk Structure Disk Scheduling Disk Management Swap-Space Management Disk Reliability Stable-Storage Implementation Operating System Concepts 13.1 Silberschatz and

More information

Free Space Management

Free Space Management CSC 4103 - Operating Systems Spring 2007 Lecture - XVI File Systems - II Tevfik Koşar Louisiana State University March 22 nd, 2007 1 Free Space Management Disk space limited Need to re-use the space from

More information

File. File System Implementation. Operations. Permissions and Data Layout. Storing and Accessing File Data. Opening a File

File. File System Implementation. Operations. Permissions and Data Layout. Storing and Accessing File Data. Opening a File File File System Implementation Operating Systems Hebrew University Spring 2007 Sequence of bytes, with no structure as far as the operating system is concerned. The only operations are to read and write

More information

Access time based on initial head position in disk scheduling

Access time based on initial head position in disk scheduling Access time based on initial head position in disk scheduling Mr. Naresh Janwa M.Tech. Scholar Computer Science & Engineering Mewar University, Gangrar Chittorgarh - 312901 Naresh.janwa@gmail.com Mr. B.L.

More information

Disc Allocation and Disc Arm Scheduling?

Disc Allocation and Disc Arm Scheduling? CSE 2431: Introduction to Operating Systems Disc Allocation and Disc Arm Scheduling? Study: 9 th (12.4, 12.5, 10.4) 10 th (14.4, 14.5, 11.2) 11-29-2018 Presentation K Gojko Babić Moving-Head Disk Mechanism

More information

CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University

CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University CS 370: SYSTEM ARCHITECTURE & SOFTWARE [DISK SCHEDULING ALGORITHMS] Frequently asked questions from the previous class survey Shrideep Pallickara Computer Science Colorado State University L30.1 L30.2

More information

Chapter 14: Mass-Storage Systems. Disk Structure

Chapter 14: Mass-Storage Systems. Disk Structure 1 Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space Management RAID Structure Disk Attachment Stable-Storage Implementation Tertiary Storage Devices Operating System

More information

Principles of Operating Systems CS 446/646

Principles of Operating Systems CS 446/646 Principles of Operating Systems CS 446/646 5. Input/Output a. Overview of the O/S Role in I/O b. Principles of I/O Hardware c. I/O Software Layers d. Disk Management Physical disk characteristics Disk

More information

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto Ricardo Rocha Department of Computer Science Faculty of Sciences University of Porto Slides based on the book Operating System Concepts, 9th Edition, Abraham Silberschatz, Peter B. Galvin and Greg Gagne,

More information

EIDE, ATA, SATA, USB,

EIDE, ATA, SATA, USB, Magnetic disks provide bulk of secondary storage of modern computers! Drives rotate at 60 to 200 times per second! Transfer rate is rate at which data flow between drive and computer! Positioning time

More information

Overview of Mass Storage Structure

Overview of Mass Storage Structure CSC 4103 - Operating Systems Spring 2008 Lecture - XVIII Mass Storage & IO Tevfik Ko!ar Louisiana State University April 8th, 2008 1 Overview of Mass Storage Structure Magnetic disks provide bulk of secondary

More information

Mass-Storage. ICS332 Operating Systems

Mass-Storage. ICS332 Operating Systems Mass-Storage ICS332 Operating Systems Magnetic Disks Magnetic disks are (still) the most common secondary storage devices today They are messy Errors, bad blocks, missed seeks, moving parts And yet, the

More information

Disks March 15, 2010

Disks March 15, 2010 15-410...What goes around comes around... Disks March 15, 2010 Dave Eckhardt & Garth Gibson Brian Railing & Steve Muckle Contributions from Eno Thereska, Rahul Iyer 15-213 How Stuff Works web site 1 L22_Disks1

More information

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University CS 370: OPERATING SYSTEMS [DISK SCHEDULING ALGORITHMS] Shrideep Pallickara Computer Science Colorado State University Frequently asked questions from the previous class survey Can a UNIX file span over

More information

I/O 1. Devices and I/O. key concepts device registers, device drivers, program-controlled I/O, DMA, polling, disk drives, disk head scheduling

I/O 1. Devices and I/O. key concepts device registers, device drivers, program-controlled I/O, DMA, polling, disk drives, disk head scheduling I/O 1 Devices and I/O key concepts device registers, device drivers, program-controlled I/O, DMA, polling, disk drives, disk head scheduling reading Three Easy Pieces: Chapters 36-37 I/O 2 Sys/161 Device

More information

Silberschatz, et al. Topics based on Chapter 13

Silberschatz, et al. Topics based on Chapter 13 Silberschatz, et al. Topics based on Chapter 13 Mass Storage Structure CPSC 410--Richard Furuta 3/23/00 1 Mass Storage Topics Secondary storage structure Disk Structure Disk Scheduling Disk Management

More information

CSL373: Lecture 6 CPU Scheduling

CSL373: Lecture 6 CPU Scheduling CSL373: Lecture 6 CPU Scheduling First come first served (FCFS or FIFO) Simplest scheduling algorithm cpu cpu 0 0 Run jobs in order that they arrive Disadvantage: wait time depends on arrival order. Unfair

More information

CSE325 Principles of Operating Systems. Mass-Storage Systems. David P. Duggan. April 19, 2011

CSE325 Principles of Operating Systems. Mass-Storage Systems. David P. Duggan. April 19, 2011 CSE325 Principles of Operating Systems Mass-Storage Systems David P. Duggan dduggan@sandia.gov April 19, 2011 Outline Storage Devices Disk Scheduling FCFS SSTF SCAN, C-SCAN LOOK, C-LOOK Redundant Arrays

More information

I/O, Disks, and RAID Yi Shi Fall Xi an Jiaotong University

I/O, Disks, and RAID Yi Shi Fall Xi an Jiaotong University I/O, Disks, and RAID Yi Shi Fall 2017 Xi an Jiaotong University Goals for Today Disks How does a computer system permanently store data? RAID How to make storage both efficient and reliable? 2 What does

More information

Chapter 13: Mass-Storage Systems. Disk Scheduling. Disk Scheduling (Cont.) Disk Structure FCFS. Moving-Head Disk Mechanism

Chapter 13: Mass-Storage Systems. Disk Scheduling. Disk Scheduling (Cont.) Disk Structure FCFS. Moving-Head Disk Mechanism Chapter 13: Mass-Storage Systems Disk Scheduling Disk Structure Disk Scheduling Disk Management Swap-Space Management RAID Structure Disk Attachment Stable-Storage Implementation Tertiary Storage Devices

More information

Chapter 13: Mass-Storage Systems. Disk Structure

Chapter 13: Mass-Storage Systems. Disk Structure Chapter 13: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space Management RAID Structure Disk Attachment Stable-Storage Implementation Tertiary Storage Devices Operating System

More information

UNIT 4 Device Management

UNIT 4 Device Management UNIT 4 Device Management (A) Device Function. (B) Device Characteristic. (C) Disk space Management. (D) Allocation and Disk scheduling Methods. [4.1] Device Management Functions The management of I/O devices

More information

Disks October 22 nd, 2010

Disks October 22 nd, 2010 15-410...What goes around comes around... Disks October 22 nd, 2010 Dave Eckhardt & Garth Gibson Brian Railing & Steve Muckle Contributions from Eno Thereska, Rahul Iyer 15-213 How Stuff Works web site

More information

CS370: Operating Systems [Fall 2018] Dept. Of Computer Science, Colorado State University

CS370: Operating Systems [Fall 2018] Dept. Of Computer Science, Colorado State University CS 370: OPERATING SYSTEMS [DISK SCHEDULING ALGORITHMS] Shrideep Pallickara Computer Science Colorado State University L30.1 Frequently asked questions from the previous class survey ECCs: How does it impact

More information

Mass-Storage. ICS332 - Fall 2017 Operating Systems. Henri Casanova

Mass-Storage. ICS332 - Fall 2017 Operating Systems. Henri Casanova Mass-Storage ICS332 - Fall 2017 Operating Systems Henri Casanova (henric@hawaii.edu) Magnetic Disks! Magnetic disks (a.k.a. hard drives ) are (still) the most common secondary storage devices today! They

More information

CS370: Operating Systems [Fall 2018] Dept. Of Computer Science, Colorado State University

CS370: Operating Systems [Fall 2018] Dept. Of Computer Science, Colorado State University Frequently asked questions from the previous class survey CS 370: OPERATING SYSTEMS [DISK SCHEDULING ALGORITHMS] Shrideep Pallickara Computer Science Colorado State University ECCs: How does it impact

More information

CSCI-GA Operating Systems. I/O : Disk Scheduling and RAID. Hubertus Franke

CSCI-GA Operating Systems. I/O : Disk Scheduling and RAID. Hubertus Franke CSCI-GA.2250-001 Operating Systems I/O : Disk Scheduling and RAID Hubertus Franke frankeh@cs.nyu.edu Disks Scheduling Abstracted by OS as files A Conventional Hard Disk (Magnetic) Structure Hard Disk

More information

CSC369 Lecture 9. Larry Zhang, November 16, 2015

CSC369 Lecture 9. Larry Zhang, November 16, 2015 CSC369 Lecture 9 Larry Zhang, November 16, 2015 1 Announcements A3 out, due ecember 4th Promise: there will be no extension since it is too close to the final exam (ec 7) Be prepared to take the challenge

More information

Outline. Operating Systems: Devices and I/O p. 1/18

Outline. Operating Systems: Devices and I/O p. 1/18 Outline Diversity of I/O devices block and character devices Organization of I/O subsystem of kernel device drivers Common hardware characteristics of device I/O subsystem tasks Operating Systems: Devices

More information

Disks March 26 th, 2007

Disks March 26 th, 2007 15-410...What goes around comes around... Disks March 26 th, 2007 Dave Eckhardt & Bruce Maggs Brian Railing & Steve Muckle Contributions from Eno Thereska, Rahul Iyer 15-213 How Stuff Works web site 1

More information

CSE506: Operating Systems CSE 506: Operating Systems

CSE506: Operating Systems CSE 506: Operating Systems CSE 506: Operating Systems Disk Scheduling Key to Disk Performance Don t access the disk Whenever possible Cache contents in memory Most accesses hit in the block cache Prefetch blocks into block cache

More information

Today: Secondary Storage! Typical Disk Parameters!

Today: Secondary Storage! Typical Disk Parameters! Today: Secondary Storage! To read or write a disk block: Seek: (latency) position head over a track/cylinder. The seek time depends on how fast the hardware moves the arm. Rotational delay: (latency) time

More information

CSE380 - Operating Systems. Communicating with Devices

CSE380 - Operating Systems. Communicating with Devices CSE380 - Operating Systems Notes for Lecture 15-11/4/04 Matt Blaze (some examples by Insup Lee) Communicating with Devices Modern architectures support convenient communication with devices memory mapped

More information

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University Che-Wei Chang chewei@mail.cgu.edu.tw Department of Computer Science and Information Engineering, Chang Gung University l Chapter 10: File System l Chapter 11: Implementing File-Systems l Chapter 12: Mass-Storage

More information

File. File System Implementation. File Metadata. File System Implementation. Direct Memory Access Cont. Hardware background: Direct Memory Access

File. File System Implementation. File Metadata. File System Implementation. Direct Memory Access Cont. Hardware background: Direct Memory Access File File System Implementation Operating Systems Hebrew University Spring 2009 Sequence of bytes, with no structure as far as the operating system is concerned. The only operations are to read and write

More information

EECS 482 Introduction to Operating Systems

EECS 482 Introduction to Operating Systems EECS 482 Introduction to Operating Systems Winter 2018 Harsha V. Madhyastha Recap: CPU Scheduling First Come First Serve (FCFS) Simple, but long waiting times for short jobs Round Robin Reduces waiting

More information

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017 CS 471 Operating Systems Yue Cheng George Mason University Fall 2017 Review: Disks 2 Device I/O Protocol Variants o Status checks Polling Interrupts o Data PIO DMA 3 Disks o Doing an disk I/O requires:

More information

CS3600 SYSTEMS AND NETWORKS

CS3600 SYSTEMS AND NETWORKS CS3600 SYSTEMS AND NETWORKS NORTHEASTERN UNIVERSITY Lecture 9: Mass Storage Structure Prof. Alan Mislove (amislove@ccs.neu.edu) Moving-head Disk Mechanism 2 Overview of Mass Storage Structure Magnetic

More information

I/O 1. Devices and I/O. key concepts device registers, device drivers, program-controlled I/O, DMA, polling, disk drives, disk head scheduling

I/O 1. Devices and I/O. key concepts device registers, device drivers, program-controlled I/O, DMA, polling, disk drives, disk head scheduling I/O 1 Devices and I/O key concepts device registers, device drivers, program-controlled I/O, DMA, polling, disk drives, disk head scheduling reading Three Easy Pieces: Chapters 36-37 I/O 2 Sys/161 Device

More information

V. Mass Storage Systems

V. Mass Storage Systems TDIU25: Operating Systems V. Mass Storage Systems SGG9: chapter 12 o Mass storage: Hard disks, structure, scheduling, RAID Copyright Notice: The lecture notes are mainly based on modifications of the slides

More information

Chapter 11. I/O Management and Disk Scheduling

Chapter 11. I/O Management and Disk Scheduling Operating System Chapter 11. I/O Management and Disk Scheduling Lynn Choi School of Electrical Engineering Categories of I/O Devices I/O devices can be grouped into 3 categories Human readable devices

More information

Operating Systems Peter Pietzuch

Operating Systems Peter Pietzuch Tutorial Disk Management Operating Systems 211 - Peter Pietzuch 1. A disk controller with enough memory can perform read-ahead, reading blocks on the current track into its memory before

More information

File System Performance (and Abstractions) Kevin Webb Swarthmore College April 5, 2018

File System Performance (and Abstractions) Kevin Webb Swarthmore College April 5, 2018 File System Performance (and Abstractions) Kevin Webb Swarthmore College April 5, 2018 Today s Goals Supporting multiple file systems in one name space. Schedulers not just for CPUs, but disks too! Caching

More information

I/O Management and Disk Scheduling. Chapter 11

I/O Management and Disk Scheduling. Chapter 11 I/O Management and Disk Scheduling Chapter 11 Categories of I/O Devices Human readable used to communicate with the user video display terminals keyboard mouse printer Categories of I/O Devices Machine

More information

I/O Device Controllers. I/O Systems. I/O Ports & Memory-Mapped I/O. Direct Memory Access (DMA) Operating Systems 10/20/2010. CSC 256/456 Fall

I/O Device Controllers. I/O Systems. I/O Ports & Memory-Mapped I/O. Direct Memory Access (DMA) Operating Systems 10/20/2010. CSC 256/456 Fall I/O Device Controllers I/O Systems CS 256/456 Dept. of Computer Science, University of Rochester 10/20/2010 CSC 2/456 1 I/O devices have both mechanical component & electronic component The electronic

More information

STORAGE SYSTEMS. Operating Systems 2015 Spring by Euiseong Seo

STORAGE SYSTEMS. Operating Systems 2015 Spring by Euiseong Seo STORAGE SYSTEMS Operating Systems 2015 Spring by Euiseong Seo Today s Topics HDDs (Hard Disk Drives) Disk scheduling policies Linux I/O schedulers Secondary Storage Anything that is outside of primary

More information

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto Ricardo Rocha Department of Computer Science Faculty of Sciences University of Porto Slides based on the book Operating System Concepts, 9th Edition, Abraham Silberschatz, Peter B. Galvin and Greg Gagne,

More information

Preview. Process Scheduler. Process Scheduling Algorithms for Batch System. Process Scheduling Algorithms for Interactive System

Preview. Process Scheduler. Process Scheduling Algorithms for Batch System. Process Scheduling Algorithms for Interactive System Preview Process Scheduler Short Term Scheduler Long Term Scheduler Process Scheduling Algorithms for Batch System First Come First Serve Shortest Job First Shortest Remaining Job First Process Scheduling

More information

MODULE 4. FILE SYSTEM AND SECONDARY STORAGE

MODULE 4. FILE SYSTEM AND SECONDARY STORAGE This document can be downloaded from www.chetanahegde.in with most recent updates. 1 MODULE 4. FILE SYSTEM AND SECONDARY STORAGE File system provides the mechanism for storage of data and access to data

More information

Ref: Chap 12. Secondary Storage and I/O Systems. Applied Operating System Concepts 12.1

Ref: Chap 12. Secondary Storage and I/O Systems. Applied Operating System Concepts 12.1 Ref: Chap 12 Secondary Storage and I/O Systems Applied Operating System Concepts 12.1 Part 1 - Secondary Storage Secondary storage typically: is anything that is outside of primary memory does not permit

More information

CHAPTER 12: MASS-STORAGE SYSTEMS (A) By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

CHAPTER 12: MASS-STORAGE SYSTEMS (A) By I-Chen Lin Textbook: Operating System Concepts 9th Ed. CHAPTER 12: MASS-STORAGE SYSTEMS (A) By I-Chen Lin Textbook: Operating System Concepts 9th Ed. Chapter 12: Mass-Storage Systems Overview of Mass-Storage Structure Disk Structure Disk Attachment Disk Scheduling

More information

I/O & Storage. Jin-Soo Kim ( Computer Systems Laboratory Sungkyunkwan University

I/O & Storage. Jin-Soo Kim ( Computer Systems Laboratory Sungkyunkwan University I/O & Storage Jin-Soo Kim ( jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics I/O systems Device characteristics: block vs. character I/O systems

More information

Prepared by Heena Patel(Asst. Prof) Page 1

Prepared by Heena Patel(Asst. Prof) Page 1 UNIT-1 Operating System Concept 1. Define an operating system. What is primary goal of OS? 2. What is an OS? 3. What do you mean by multitasking? Give names of OS having this feature. 4. What do you mean

More information

Disks: Structure and Scheduling

Disks: Structure and Scheduling Disks: Structure and Scheduling COMS W4118 References: Opera;ng Systems Concepts (9e), Linux Kernel Development, previous W4118s Copyright no2ce: care has been taken to use only those web images deemed

More information

Laboratory. Disk Scheduling. Objectives. References. Watch how the operating system schedules the reading or writing of disk tracks.

Laboratory. Disk Scheduling. Objectives. References. Watch how the operating system schedules the reading or writing of disk tracks. Laboratory Disk Scheduling 11 Objectives Watch how the operating system schedules the reading or writing of disk tracks. References Software needed: 1) A web browser (Internet Explorer or Netscape) 2)

More information

Part IV I/O System. Chapter 12: Mass Storage Structure

Part IV I/O System. Chapter 12: Mass Storage Structure Part IV I/O System Chapter 12: Mass Storage Structure Disk Structure Three elements: cylinder, track and sector/block. Three types of latency (i.e., delay) Positional or seek delay mechanical and slowest

More information

Chapter 10: Mass-Storage Systems

Chapter 10: Mass-Storage Systems Chapter 10: Mass-Storage Systems Silberschatz, Galvin and Gagne Overview of Mass Storage Structure Magnetic disks provide bulk of secondary storage of modern computers Drives rotate at 60 to 200 times

More information

Chapter One: Getting Started With IBM SPSS for Windows

Chapter One: Getting Started With IBM SPSS for Windows Chapter One: Getting Started With IBM SPSS for Windows Using Windows The Windows start-up screen should look something like Figure 1-1. Several standard desktop icons will always appear on start up. Note

More information

Devices and Device Controllers. secondary storage (disks, tape) and storage controllers

Devices and Device Controllers. secondary storage (disks, tape) and storage controllers I/O 1 Devices and Device Controllers network interface graphics adapter secondary storage (disks, tape) and storage controllers serial (e.g., mouse, keyboard) sound co-processors... I/O 2 Bus Architecture

More information

Bus Architecture Example

Bus Architecture Example I/O 1 network interface graphics adapter Devices and Device Controllers secondary storage (disks, tape) and storage controllers serial (e.g., mouse, keyboard) sound co-processors... I/O 2 Bus Architecture

More information

GBA 334 Module 6 Lecture Notes Networks and Queues. These notes will cover network models and queuing theory.

GBA 334 Module 6 Lecture Notes Networks and Queues. These notes will cover network models and queuing theory. GBA Module Lecture Notes Networks and Queues These notes will cover network models and queuing theory. Have you ever wondered how your GPS knows the most efficient route to get you to your destination?

More information

Part IV I/O System Chapter 1 2: 12: Mass S torage Storage Structur Structur Fall 2010

Part IV I/O System Chapter 1 2: 12: Mass S torage Storage Structur Structur Fall 2010 Part IV I/O System Chapter 12: Mass Storage Structure Fall 2010 1 Disk Structure Three elements: cylinder, track and sector/block. Three types of latency (i.e., delay) Positional or seek delay mechanical

More information

Chapter-6. SUBJECT:- Operating System TOPICS:- I/O Management. Created by : - Sanjay Patel

Chapter-6. SUBJECT:- Operating System TOPICS:- I/O Management. Created by : - Sanjay Patel Chapter-6 SUBJECT:- Operating System TOPICS:- I/O Management Created by : - Sanjay Patel Disk Scheduling Algorithm 1) First-In-First-Out (FIFO) 2) Shortest Service Time First (SSTF) 3) SCAN 4) Circular-SCAN

More information

I/O Systems and Storage Devices

I/O Systems and Storage Devices CSC 256/456: Operating Systems I/O Systems and Storage Devices John Criswell! University of Rochester 1 I/O Device Controllers I/O devices have both mechanical component & electronic component! The electronic

More information

Chapter 10: Mass-Storage Systems

Chapter 10: Mass-Storage Systems Chapter 10: Mass-Storage Systems Silberschatz, Galvin and Gagne 2013 Chapter 10: Mass-Storage Systems Overview of Mass Storage Structure Disk Structure Disk Attachment Disk Scheduling Disk Management Swap-Space

More information

Chapter 10: Mass-Storage Systems. Operating System Concepts 9 th Edition

Chapter 10: Mass-Storage Systems. Operating System Concepts 9 th Edition Chapter 10: Mass-Storage Systems Silberschatz, Galvin and Gagne 2013 Chapter 10: Mass-Storage Systems Overview of Mass Storage Structure Disk Structure Disk Attachment Disk Scheduling Disk Management Swap-Space

More information

Operating Systems. Mass-Storage Structure Based on Ch of OS Concepts by SGG

Operating Systems. Mass-Storage Structure Based on Ch of OS Concepts by SGG Operating Systems Mass-Storage Structure Based on Ch. 10-11 of OS Concepts by SGG Mass Storage Devices Disks A r/w head flies above the spinning disk Each disk is divided into tracks and each track in

More information

Chapter 14: Mass-Storage Systems

Chapter 14: Mass-Storage Systems Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space Management RAID Structure Disk Attachment Stable-Storage Implementation Tertiary Storage Devices Operating System

More information

Devices and Device Controllers. secondary storage (disks, tape) and storage controllers

Devices and Device Controllers. secondary storage (disks, tape) and storage controllers I/O 1 Devices and Device Controllers network interface graphics adapter secondary storage (disks, tape) and storage controllers serial (e.g., mouse, keyboard) sound co-processors... I/O 2 Bus Architecture

More information

COS 318: Operating Systems. Storage Devices. Vivek Pai Computer Science Department Princeton University

COS 318: Operating Systems. Storage Devices. Vivek Pai Computer Science Department Princeton University COS 318: Operating Systems Storage Devices Vivek Pai Computer Science Department Princeton University http://www.cs.princeton.edu/courses/archive/fall11/cos318/ Today s Topics Magnetic disks Magnetic disk

More information

CSE 451: Operating Systems Winter Lecture 12 Secondary Storage. Steve Gribble 323B Sieg Hall.

CSE 451: Operating Systems Winter Lecture 12 Secondary Storage. Steve Gribble 323B Sieg Hall. CSE 451: Operating Systems Winter 2001 Lecture 12 Steve Gribble gribble@cs.washington.edu 323B Sieg Hall Secondary storage typically: is anything that is outside of primary memory does not permit direct

More information

Lecture 16: Storage Devices

Lecture 16: Storage Devices CS 422/522 Design & Implementation of Operating Systems Lecture 16: Storage Devices Zhong Shao Dept. of Computer Science Yale University Acknowledgement: some slides are taken from previous versions of

More information

Secondary storage. CS 537 Lecture 11 Secondary Storage. Disk trends. Another trip down memory lane

Secondary storage. CS 537 Lecture 11 Secondary Storage. Disk trends. Another trip down memory lane Secondary storage CS 537 Lecture 11 Secondary Storage Michael Swift Secondary storage typically: is anything that is outside of primary memory does not permit direct execution of instructions or data retrieval

More information

Department of Computer Engineering University of California at Santa Cruz. File Systems. Hai Tao

Department of Computer Engineering University of California at Santa Cruz. File Systems. Hai Tao File Systems Hai Tao File System File system is used to store sources, objects, libraries and executables, numeric data, text, video, audio, etc. The file system provide access and control function for

More information

Chapter 12: Mass-Storage

Chapter 12: Mass-Storage hapter 12: Mass-Storage Systems hapter 12: Mass-Storage Systems Overview of Mass Storage Structure Disk Structure Disk Attachment Disk Scheduling Disk Management RAID Structure Objectives Moving-head Disk

More information

Chapter 12: Mass-Storage

Chapter 12: Mass-Storage hapter 12: Mass-Storage Systems hapter 12: Mass-Storage Systems To explain the performance characteristics of mass-storage devices To evaluate disk scheduling algorithms To discuss operating-system services

More information

Homework 2: Implementing a Firewall with Load Sharing

Homework 2: Implementing a Firewall with Load Sharing Homework 2: Implementing a Firewall with Load Sharing The purpose of this homework is to simulate a redundant firewall to compare performance of one versus multiple processors, and various queue sizes.

More information

Disk Scheduling COMPSCI 386

Disk Scheduling COMPSCI 386 Disk Scheduling COMPSCI 386 Topics Disk Structure (9.1 9.2) Disk Scheduling (9.4) Allocation Methods (11.4) Free Space Management (11.5) Hard Disk Platter diameter ranges from 1.8 to 3.5 inches. Both sides

More information

EECS 482 Introduction to Operating Systems

EECS 482 Introduction to Operating Systems EECS 482 Introduction to Operating Systems Winter 2018 Baris Kasikci Slides by: Harsha V. Madhyastha OS Abstractions Applications Threads File system Virtual memory Operating System Next few lectures:

More information

CSE 451: Operating Systems Winter Secondary Storage. Steve Gribble. Secondary storage

CSE 451: Operating Systems Winter Secondary Storage. Steve Gribble. Secondary storage CSE 451: Operating Systems Winter 2005 Secondary Storage Steve Gribble Secondary storage Secondary storage typically: is anything that is outside of primary memory does not permit direct execution of instructions

More information

CSE 4/521 Introduction to Operating Systems. Lecture 27 (Final Exam Review) Summer 2018

CSE 4/521 Introduction to Operating Systems. Lecture 27 (Final Exam Review) Summer 2018 CSE 4/521 Introduction to Operating Systems Lecture 27 (Final Exam Review) Summer 2018 Overview Objective: Revise topics and questions for the final-exam. 1. Main Memory 2. Virtual Memory 3. Mass Storage

More information

Mass-Storage Structure

Mass-Storage Structure Operating Systems (Fall/Winter 2018) Mass-Storage Structure Yajin Zhou (http://yajin.org) Zhejiang University Acknowledgement: some pages are based on the slides from Zhi Wang(fsu). Review On-disk structure

More information

Review. Preview. Three Level Scheduler. Scheduler. Process behavior. Effective CPU Scheduler is essential. Process Scheduling

Review. Preview. Three Level Scheduler. Scheduler. Process behavior. Effective CPU Scheduler is essential. Process Scheduling Review Preview Mutual Exclusion Solutions with Busy Waiting Test and Set Lock Priority Inversion problem with busy waiting Mutual Exclusion with Sleep and Wakeup The Producer-Consumer Problem Race Condition

More information

Input/Output Management

Input/Output Management Chapter 11 Input/Output Management This could be the messiest aspect of an operating system. There are just too much stuff involved, it is difficult to develop a uniform and consistent theory to cover

More information

Module 13: Secondary-Storage

Module 13: Secondary-Storage Module 13: Secondary-Storage Disk Structure Disk Scheduling Disk Management Swap-Space Management Disk Reliability Stable-Storage Implementation Tertiary Storage Devices Operating System Issues Performance

More information

Last Class: Processes

Last Class: Processes Last Class: Processes A process is the unit of execution. Processes are represented as Process Control Blocks in the OS PCBs contain process state, scheduling and memory management information, etc A process

More information