22
http://raj- os.blogspot.in/ 1 Disk Scheduling , FCFS disk scheduling algorithms

Disk scheduling.49

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Disk scheduling.49

http://raj-os.blogspot.in/ 1

Disk Scheduling , FCFS disk scheduling algorithms

Page 2: Disk scheduling.49

http://raj-os.blogspot.in/ 2

HOME PREVIOUS TOPIC NEXTPREVIOUS QUESTION PAPERS FOR OSCPP TUTORIALS

Page 3: Disk scheduling.49

http://raj-os.blogspot.in/ 3

Recap

In the last class, you have learnt:

Various allocation methods

- Their advantages and disadvantages

Page 4: Disk scheduling.49

http://raj-os.blogspot.in/ 4

Objectives

On Completion of this period, you would be able to

know

• The Need for Disk Scheduling

• FCFS disk scheduling algorithm

Page 5: Disk scheduling.49

http://raj-os.blogspot.in/ 5

Need for Disk Scheduling

• Most jobs depend heavily on disk

• It is important that disk service be as fast as possible for

– Loading

– Input

– Output of files

Page 6: Disk scheduling.49

http://raj-os.blogspot.in/ 6

Need for Disk Scheduling

• The operating system can improve average disk

service time

– By scheduling the requests for disk access

Page 7: Disk scheduling.49

http://raj-os.blogspot.in/ 7

Need for Disk Scheduling

• Disk speed is composed of three parts

• First

– To access a block the system must move the head

to the appropriate track or cylinder

Page 8: Disk scheduling.49

http://raj-os.blogspot.in/ 8

Need for Disk Scheduling

• This head movement is called a SEEK

• The time to complete it is SEEK TIME

Page 9: Disk scheduling.49

http://raj-os.blogspot.in/ 9

Need for Disk Scheduling

• Once the head is at the right track

– It must wait until the desired block rotates under

read write head

• This operation is called LATENCY(ROTATIOAL)

• The delay is called LATENCY TIME

Page 10: Disk scheduling.49

http://raj-os.blogspot.in/ 10

Need for Disk Scheduling

• The Transfer Time

– The time required to transfer of data between the

disk and main memory

• The total time to service a disk request is the sum of

– Seek time

– Latency (rotational) time &

– Transfer time

Page 11: Disk scheduling.49

http://raj-os.blogspot.in/ 11

Need for Disk Scheduling

• The disk bandwidth is the ratio of

The total number of bytes transferred

The time between the first request of service and completion of transfer

Page 12: Disk scheduling.49

http://raj-os.blogspot.in/ 12

Disk Scheduling

• Whenever a process needs a I/O from the disk

– It issues a system call to the OS

• The request has several pieces of information

Page 13: Disk scheduling.49

http://raj-os.blogspot.in/ 13

Disk Scheduling

• Whether this operation is input or output

• What the disk address for the transfer is

• What is the memory address for the transfer

• What the number of sectors to be transferred

Page 14: Disk scheduling.49

http://raj-os.blogspot.in/ 14

Disk Scheduling

• If the desired disk drive and controller are available

– The service can be serviced immediately

• If the drive controller is busy

– Any new requests will be placed in the queue

Page 15: Disk scheduling.49

http://raj-os.blogspot.in/ 15

Disk Scheduling

• Multiprogramming system with many process

• The disk queue may often have several pending

requests

• Thus when one request is completed

• The operating system chooses which pending request is

to service next

Page 16: Disk scheduling.49

http://raj-os.blogspot.in/ 16

Disk Scheduling

• How does operating system makes this choice

– Any of the disk scheduling algorithms can be used

• We shall discuss various disk scheduling algorithms

Page 17: Disk scheduling.49

http://raj-os.blogspot.in/ 17

Various Disk Scheduling

• FCFS Scheduling

• SSTF Scheduling

• SCAN Scheduling

• C-SCAN Scheduling

• LOOK Scheduling

• C-LOOK Scheduling

Page 18: Disk scheduling.49

http://raj-os.blogspot.in/ 18

Disk Scheduling

• All these algorithms are based on criteria i.e.

– Minimize seek time

• Seek time Seek distance

Page 19: Disk scheduling.49

http://raj-os.blogspot.in/ 19

Quiz

1. The operating system can improve average disk service

time by scheduling the requests for disk access [T/F]

2. The time required to transfer of data between the disk

and main memory is called

TRUE

TRANSFER TIME

Page 20: Disk scheduling.49

http://raj-os.blogspot.in/ 20

Quiz

3. If the desired disk drive and controller are available

the service can be serviced immediately [T/F]

4. The disk scheduling algorithms are based on criteria Minimize seek time

TRUE

Page 21: Disk scheduling.49

http://raj-os.blogspot.in/ 21

Quiz

1. The FCFS algorithm does not provide best (average) access [T/F]

2. The head movement in the FCFS algorithm is minimal in all cases [T/F]

TRUE

FALSE

Page 22: Disk scheduling.49

Other subject materials

• Web designing

• Micro processors

• C++ tutorials

• java

home

22http://raj-os.blogspot.in/