Disk Scheduling ,
FCFS disk
scheduling algorithms




           http://raj-os.blogspot.in/   1
HOME     PREVIOUS TOPIC NEXT
PREVIOUS QUESTION PAPERS FOR OS
CPP TUTORIALS




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

In the last class, you have learnt:
   Various allocation methods

    - Their advantages and disadvantages




                    http://raj-os.blogspot.in/   3
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/   4
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/          5
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/   6
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/       7
Need for Disk Scheduling


• This head movement is called a SEEK

• The time to complete it is SEEK TIME




                   http://raj-os.blogspot.in/   8
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/         9
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/           10
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/         11
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/   12
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/   13
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/          14
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/    15
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/        16
Various Disk Scheduling

• FCFS Scheduling
• SSTF Scheduling
• SCAN Scheduling
• C-SCAN Scheduling
• LOOK Scheduling
• C-LOOK Scheduling


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


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

   – Minimize seek time


• Seek time ≈ Seek distance




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

1. The operating system can improve average disk
  service time by scheduling the requests for disk
  access [T/F]
   TRUE
2. The time required to transfer of data between the
  disk and main memory is called
   TRANSFER TIME

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

3. If the desired disk drive and controller are available

  the service can be serviced immediately [T/F]
      TRUE


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


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

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


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




                    http://raj-os.blogspot.in/          21
Other subject materials

•   Web designing
•   Micro processors
•   C++ tutorials
•   java

home


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

Disk scheduling.49

  • 1.
    Disk Scheduling , FCFSdisk scheduling algorithms http://raj-os.blogspot.in/ 1
  • 2.
    HOME PREVIOUS TOPIC NEXT PREVIOUS QUESTION PAPERS FOR OS CPP TUTORIALS http://raj-os.blogspot.in/ 2
  • 3.
    Recap In the lastclass, you have learnt: Various allocation methods - Their advantages and disadvantages http://raj-os.blogspot.in/ 3
  • 4.
    Objectives On Completion ofthis period, you would be able to know • The Need for Disk Scheduling • FCFS disk scheduling algorithm http://raj-os.blogspot.in/ 4
  • 5.
    Need for DiskScheduling • 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/ 5
  • 6.
    Need for DiskScheduling • The operating system can improve average disk service time – By scheduling the requests for disk access http://raj-os.blogspot.in/ 6
  • 7.
    Need for DiskScheduling • 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/ 7
  • 8.
    Need for DiskScheduling • This head movement is called a SEEK • The time to complete it is SEEK TIME http://raj-os.blogspot.in/ 8
  • 9.
    Need for DiskScheduling • 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/ 9
  • 10.
    Need for DiskScheduling • 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/ 10
  • 11.
    Need for DiskScheduling • 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/ 11
  • 12.
    Disk Scheduling • Whenevera 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/ 12
  • 13.
    Disk Scheduling • Whetherthis 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/ 13
  • 14.
    Disk Scheduling • Ifthe 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/ 14
  • 15.
    Disk Scheduling • Multiprogrammingsystem 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/ 15
  • 16.
    Disk Scheduling • Howdoes 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/ 16
  • 17.
    Various Disk Scheduling •FCFS Scheduling • SSTF Scheduling • SCAN Scheduling • C-SCAN Scheduling • LOOK Scheduling • C-LOOK Scheduling http://raj-os.blogspot.in/ 17
  • 18.
    Disk Scheduling • Allthese algorithms are based on criteria i.e. – Minimize seek time • Seek time ≈ Seek distance http://raj-os.blogspot.in/ 18
  • 19.
    Quiz 1. The operatingsystem can improve average disk service time by scheduling the requests for disk access [T/F] TRUE 2. The time required to transfer of data between the disk and main memory is called TRANSFER TIME http://raj-os.blogspot.in/ 19
  • 20.
    Quiz 3. If thedesired disk drive and controller are available the service can be serviced immediately [T/F] TRUE 4. The disk scheduling algorithms are based on criteria Minimize seek time http://raj-os.blogspot.in/ 20
  • 21.
    Quiz 1. The FCFSalgorithm does not provide best (average) access [T/F] TRUE 2. The head movement in the FCFS algorithm is minimal in all cases [T/F] FALSE http://raj-os.blogspot.in/ 21
  • 22.
    Other subject materials • Web designing • Micro processors • C++ tutorials • java home http://raj-os.blogspot.in/ 22