ITEC 202 Operating Systems

Slides:



Advertisements
Similar presentations
I/O Management and Disk Scheduling
Advertisements

I/O Management and Disk Scheduling
Disks Disk Hardware (1) Disk parameters for the original IBM PC floppy disk and a Western Digital WD hard disk.
I/O Management and Disk Scheduling Chapter 11. I/O Driver OS module which controls an I/O device hides the device specifics from the above layers in the.
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
I/O Management and Disk Scheduling
Disk Scheduling Based on the slides supporting the text 1.
Day 30 I/O Management and Disk Scheduling. I/O devices Vary in many ways Vary in many ways –Data rate –Application –Complexity of control –Unit of transfer.
Input/Output Management and Disk Scheduling
University of Pennsylvania 10/24/00CSE 3801 Disk Scheduling CSE 380 Lecture Note 11a Insup Lee.
Based on the slides supporting the text
1 Chapter 11 I/O Management and Disk Scheduling –Operating System Design Issues –I/O Buffering –Disk Scheduling –Disk Cache.
Device Management.
1 Disk Scheduling Chapter 14 Based on the slides supporting the text.
04/21/2004CSCI 315 Operating Systems Design1 Disk Scheduling.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 12: Mass-Storage Systems.
12.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 12: Mass-Storage Systems.
Disk and I/O Management
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 10: Mass-Storage Systems.
Chapter 11 I/O Management and Disk Scheduling Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and.
Operating System Concepts and Techniques Lecture 7 Scheduling-3 M. Naghibzadeh Reference M. Naghibzadeh, Operating System Concepts and Techniques, First.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 12: Mass-Storage Systems.
Disk Structure Disk drives are addressed as large one- dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer.
1 I/O Management and Disk Scheduling Chapter Categories of I/O Devices Human readable Used to communicate with the user Printers Video display terminals.
1 IO Management and Disk Scheduling Chapter Categories of I/O Devices n Human readable u used to communicate with the user u video display terminals.
1 I/O Management and Disk Scheduling Chapter
1 I/O Management and Disk Scheduling Chapter Categories of I/O Devices Human readable  Used to communicate with the user  Printers  Video display.
CE Operating Systems Lecture 20 Disk I/O. Overview of lecture In this lecture we will look at: Disk Structure Disk Scheduling Disk Management Swap-Space.
I/O Management and Disk Structure Introduction to Operating Systems: Module 14.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space.
1 I/O Management and Disk Scheduling Chapter Categories of I/O Devices Human readable –Used to communicate with the user –Printers –Video display.
I/O Management and Disk Scheduling Chapter 11. Disk Performance Parameters To read or write, the disk head must be positioned at the desired track and.
I/O Management and Disk Scheduling Chapter 11. Categories of I/O Devices Human readable Used to communicate with the user  Printers, Display terminals,
1 I/O Management and Disk Scheduling Chapter I/O Devices Can be group into three categories: 1.Human readable Used to communicate with the computer.
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
1.  Disk Structure Disk Structure  Disk Scheduling Disk Scheduling  FCFS FCFS  SSTF SSTF  SCAN SCAN  C-SCAN C-SCAN  C-LOOK C-LOOK  Selecting a.
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 13 Mass-Storage Systems Slide 1 Chapter 13 Mass-Storage Systems.
Chapter 14: Mass-Storage Systems Disk Structure. Disk Scheduling. RAID.
Disk Average Seek Time. Multi-platter Disk platter Disk read/write arm read/write head.
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
1 Chapter 13 Mass-Storage Structure. 2 Disk Structure Disk drives are addressed as large 1- dimensional arrays of logical blocks, where the logical block.
I/O Scheduling Computer Organization II 1 Disk Scheduling Carrying out disk accesses in the order they are received will not always produce optimal performance.
M ASS S TORAGE S TRUCTURES Lecture: Operating System Concepts Lecturer: Pooja Sharma Computer Science Department, Punjabi University, Patiala.
Chapter 101 I/O Management and Disk Scheduling Chapter 11.
Chapter 11 I/O Management and Disk Scheduling Dave Bremer Otago Polytechnic, NZ ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
1 Chapter 11 I/O Management and Disk Scheduling Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and.
Chapter 10: Mass-Storage Systems
Operating System (013022) Dr. H. Iwidat
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
OPERATING SYSTEMS CS 3502 Fall 2017
Disk Scheduling Algorithms
DISK SCHEDULING FCFS SSTF SCAN/ELEVATOR C-SCAN C-LOOK.
Lecture 45 Syed Mansoor Sarwar
Chapter 14 Based on the slides supporting the text
Chapter 10 Mass-Storage Structure
There are many different ways that i/o scheduling can be done.
Operating Systems (CS 340 D)
Moving-head Disk Machanism
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
Chapter 6: CPU Scheduling
Chapter 37 Hard Disk Drives
Persistence: hard disk drive
Chapter 11 I/O Management and Disk Scheduling
Disk Scheduling Carrying out disk accesses in the order they are received will not always produce optimal performance. Seek time is the reason for differences.
Secondary Storage Management Hank Levy
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
Lecture 10: Magnetic Disks
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
Presentation transcript:

ITEC 202 Operating Systems EASTERN MEDITERRANEAN UNIVERSITY SCHOOL OF COMPUTING AND TECHNOLOGY Disk Scheduling ITEC 202 Operating Systems

Disk Performance Parameters Normally the disk I/O operation depends on the computer system, the nature of the I/O channel and disk controller hardware.

When a disk drive is operating, it is rotating at a constant speed. Disk Performance Parameters When a disk drive is operating, it is rotating at a constant speed. To read or write from the disk the head must be positioned over the track and at the beginning of the desired sector. The time that takes to position head on top of the track is known as “seek time”.

Disk Performance Parameters The time it takes for the beginning of the sector to reach the head is known as “rotational delay” or “rotational latency”. Sum of these two times is known as “access time” (seek time + rotational delay). It is the time it takes to get in position to read or write. Once the head is on top of the track as well as sector the data transfer (read or write) operation begins.

When disk drive is operating, disk is rotating at constant speed. Disk Performance Parameters Performance Parameters When disk drive is operating, disk is rotating at constant speed. On a movable-head system, time it takes to position head at track is known as seek time. Time it takes for beginning of sector to reach head is known as rotational delay or rotational latency.

Timing of a Disk I/O transfer A general timing line diagram of disk I/O transfer is shown below:

Timing of a Disk I/O transfer When an I/O operation is requested, it may have to wait in queue if the device is not ready. Also in some cases there is a single channel for different I/O devices; therefore, it may have to wait till that channel is available.

Disk Arm Scheduling Policies The order in which sectors are read form the disk has great effect on I/O performance. In a multiprogramming systems, a number of I/O requests may be competing for the same disk and if random approach is used, then performance of such systems will be poor Therefore, some improvement has to be done in order to improve the disk access time.

Disk Arm Scheduling Policies First-In-First-Out (FIFO) Priority Last In First Out (LIFO) Shortest Service Time First (SSTF) Scan C-Scan N-Scan F-Scan

example: Assume that the disk head is initially located at track 100. We also assume a disk with 200 tracks and the disk request queue has random requests in it. The requested tracks, in the order received by the disk scheduler, are 55, 58, 39, 18, 90, 160, 150, 38 and 184.

Random Scheduling 184 38 150 160 90 18 39 58 55 Read Queue of Requested Tracks If we select items from the queue in random order, than we can expect that the tracks to be visited will occur randomly, giving poor performance. That is called random scheduling and is useful as a benchmark against which to evaluate other techniques.

First-In-First-Out (FIFO) The simplest policy could be scheduling the requests on first come first serve base.

FIFO First-In-First-Out FIFO 55.3 55 45 58 3 39 19 18 21 90 72 160 70 55 45 58 3 39 19 18 21 90 72 160 70 150 10 38 112 184 146 track number the arm movement 55.3

Priority Basically in a system based on priority mechanism the scope is outside the control of disk management software. e.g., often small jobs are given priority over longer jobs, this way basically lots of smaller jobs are finished quickly and the good response is observed by the system.

Last In First Out (LIFO) It is very interesting to note that system always taking the most recent observation performs quite well. In transaction processing system, normally there is little arm movement during the sequential file access, so it increases the throughput and reduces the queue lengths. However, this type of mechanism leads to starvation problem. Once a system enters in an I/O request and fallen back from the head of the line, the job can never regain the head of the line unless the queue in front of it empties.

Shortest Service Time First (SSTF) In this type of policy: disk I/O request is selected which requires the least movement of the arm from its current position. Therefore, basically we are selecting a request with minimum seek time. But it should be remembered that minimum seek time dose not always guarantee that it will have minimum arm movement. In any case this performs better than FIFO.

Shortest Service Time First SSTF SSTF 90 10 58 32 55 3 39 16 38 1 18 20 150 132 160 10 184 24 track number 27.5 the arm movement

Scan (Look Policy) This policy scans in the direction of increasing track number satisfying all the requests in route until it reaches the last track in that direction. The arm movement is allowed only in one direction. It starts from 100 to 150, 160, 184 after that there is no track on this side so it goes to the maximum which is 90 and so on. It is also called LOOK policy.

Scan Policy SCAN 150 50 160 10 184 24 90 94 58 32 55 3 39 16 38 1 18 20 track number 27.8 the arm movement

Circular Scan (C-Scan) The only difference in this case is that the arm is restricted to one direction only. Therefore, when the last track in one direction is visited (in our case it is 184), the arm is returned to the opposite end of the disk and scan begins again. This reduces the delay experienced by new requests.

Circular Scan C-SCAN C-Scan 35.8 150 50 160 10 184 24 18 166 38 20 150 50 160 10 184 24 18 166 38 20 39 1 55 16 58 3 90 32 track number 35.8 the arm movement

N-Scan and F-Scan In the cases of SSTF, SCAN & CSCAN the arm may not move for a considerable time, that is one or more processes may have high access rate to one particular track, so they monopolize the entire disk by repeated requests. In order to avoid such problem the entire queue can be segmented, and after processing one segment completely and we can move to another segment.

N-step-Scan (N-Scan) The N-step-SCAN policy segments the disk request queue into sub queues of length N. Sub queues are processed using SCAN policy With large values of N this policy gives performance equal to SCAN, also with N=1 FIFO is adopted. 184 38 150 160 90 18 39 58 55 N=3

F-Scan F-SCAN policy has basically two queues, when a scan begins all requests are in one queue and the new requests are added to the other queue. It processes new requests when the first queue requests are completely finished. New requests wait in this queue Queue 1 184 38 150 160 90 18 39 58 55 Queue 2

example Given requests for a single sector in tracks 25, 70, 35, 5 and 20. The head at track 40 moving towards track 41. Indicate in which order the following disk scheduling techniques will process the requests: FIFO, SSTF, SCAN, C-SCAN and N-SCAN (N=2). Also calculate average seek length for each of the following scheduling policies.

FIFO FIFO 16 70 45 35 35 5 30 20 15 28.2

SSTF SSTF 35 6 25 10 20 5 5 15 70 65 20.2

SCAN SCAN 70 29 35 35 25 10 20 5 5 15 18.8

C-SCAN C-SCAN 70 29 5 65 20 15 25 5 35 10 24.8

N-SCAN (N=2) C-SCAN 70 29 25 45 5 20 35 30 20 15 27.8

End of Chapter Prepared by, Ahmet Rizaner 05 May 2008