View
2.197
Download
4
Category
Preview:
DESCRIPTION
Citation preview
http://raj-os.blogspot.in/ 1
Disk Scheduling , FCFS disk scheduling algorithms
http://raj-os.blogspot.in/ 2
HOME PREVIOUS TOPIC NEXTPREVIOUS QUESTION PAPERS FOR OSCPP TUTORIALS
http://raj-os.blogspot.in/ 3
Recap
In the last class, you have learnt:
Various allocation methods
- Their advantages and disadvantages
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
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
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
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
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
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
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
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
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
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
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
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
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
http://raj-os.blogspot.in/ 17
Various Disk Scheduling
• FCFS Scheduling
• SSTF Scheduling
• SCAN Scheduling
• C-SCAN Scheduling
• LOOK Scheduling
• C-LOOK Scheduling
http://raj-os.blogspot.in/ 18
Disk Scheduling
• All these algorithms are based on criteria i.e.
– Minimize seek time
• Seek time Seek distance
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
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
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
Other subject materials
• Web designing
• Micro processors
• C++ tutorials
• java
home
22http://raj-os.blogspot.in/
Recommended