FCFS Scheduling

• The First Come First Serve Scheduling

Advantages
   – Simplest form of disk scheduling algorithm

   – Easy to program

   – Intrinsically fair




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

• Consider for example an ordered disk queue with
  requests involving
   – Tracks 98, 183, 37, 122, 14, 124, 65, 67

   – “Head pointer” 53

• The request queue (0-199)




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

• If the disk head is initially at cylinder 53,

   – it will first move from 53 to 98,

   – then to 183, 37, 122, 14, 124, 65 and 67 as shown in the
     next slides

• The total head movement of 640 tracks


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




  Initial Position
   http://raj-os.blogspot.in/   4
FCFS Scheduling




  Head is at 98th track
    http://raj-os.blogspot.in/   5
FCFS Scheduling




  Head is at 183rd track
   http://raj-os.blogspot.in/   6
FCFS Scheduling




Head movement from 183 to 37th track

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




Head movement from 37 to 122

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




Head movement from 122 to 14th track

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




Head movement from 14th to 124th track

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




Head movement from 124 to 65

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




Head movement from 65 to 67th track

          http://raj-os.blogspot.in/   12
http://raj-os.blogspot.in/   13
FCFS Scheduling


Disadvantages:

• It does not provide best service

• Wild swing from 122 to 14 and then back to 124

• If the requests for tracks 37 and 124 could be serviced
  together


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


• Before or after the requests at 122 and 124

• The average head movement would decrease total
  head movement &

• Thus Improving disk throughput



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

In this class , you have learnt
   Disk scheduling-Need
   FCFS disk scheduling algorithm




                      http://raj-os.blogspot.in/   16
Frequently asked questions

1. Define seek time and latency time
2.Explain the need for disk scheduling
3.List different disk scheduling algorithms
4.List the advantages and disadvantages of FCFS disk
  scheduling algorithm
5.List the advantages and disadvantages of FCFS
  algorithm


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

Fcfs scheduling

  • 1.
    FCFS Scheduling • TheFirst Come First Serve Scheduling Advantages – Simplest form of disk scheduling algorithm – Easy to program – Intrinsically fair http://raj-os.blogspot.in/ 1
  • 2.
    FCFS Scheduling • Considerfor example an ordered disk queue with requests involving – Tracks 98, 183, 37, 122, 14, 124, 65, 67 – “Head pointer” 53 • The request queue (0-199) http://raj-os.blogspot.in/ 2
  • 3.
    FCFS Scheduling • Ifthe disk head is initially at cylinder 53, – it will first move from 53 to 98, – then to 183, 37, 122, 14, 124, 65 and 67 as shown in the next slides • The total head movement of 640 tracks http://raj-os.blogspot.in/ 3
  • 4.
    FCFS Scheduling Initial Position http://raj-os.blogspot.in/ 4
  • 5.
    FCFS Scheduling Head is at 98th track http://raj-os.blogspot.in/ 5
  • 6.
    FCFS Scheduling Head is at 183rd track http://raj-os.blogspot.in/ 6
  • 7.
    FCFS Scheduling Head movementfrom 183 to 37th track http://raj-os.blogspot.in/ 7
  • 8.
    FCFS Scheduling Head movementfrom 37 to 122 http://raj-os.blogspot.in/ 8
  • 9.
    FCFS Scheduling Head movementfrom 122 to 14th track http://raj-os.blogspot.in/ 9
  • 10.
    FCFS Scheduling Head movementfrom 14th to 124th track http://raj-os.blogspot.in/ 10
  • 11.
    FCFS Scheduling Head movementfrom 124 to 65 http://raj-os.blogspot.in/ 11
  • 12.
    FCFS Scheduling Head movementfrom 65 to 67th track http://raj-os.blogspot.in/ 12
  • 13.
  • 14.
    FCFS Scheduling Disadvantages: • Itdoes not provide best service • Wild swing from 122 to 14 and then back to 124 • If the requests for tracks 37 and 124 could be serviced together http://raj-os.blogspot.in/ 14
  • 15.
    FCFS Scheduling • Beforeor after the requests at 122 and 124 • The average head movement would decrease total head movement & • Thus Improving disk throughput http://raj-os.blogspot.in/ 15
  • 16.
    Summary In this class, you have learnt Disk scheduling-Need FCFS disk scheduling algorithm http://raj-os.blogspot.in/ 16
  • 17.
    Frequently asked questions 1.Define seek time and latency time 2.Explain the need for disk scheduling 3.List different disk scheduling algorithms 4.List the advantages and disadvantages of FCFS disk scheduling algorithm 5.List the advantages and disadvantages of FCFS algorithm http://raj-os.blogspot.in/ 17