C-LOOK Scheduling


• SCAN and C-SCAN algorithms move the disk arm
  across the full width of the disk
• In practice neither of the algorithm is implemented
  this way




                       http://raj-os.blogspot.in/       1
C-LOOK Scheduling

• In C-LOOK Scheduling the arm goes only as far as
  final request in each direction
• Then it reverses direction immediately without going
  all the way to the end of the disk




                       http://raj-os.blogspot.in/    2
C-LOOK Scheduling

• When the head reaches the other end,
   – It immediately returns to the beginning of the disk

   – Without servicing any requests on the return trip

• Treats the cylinders as a circular list that wraps
  around from the last cylinder to the first one



                         http://raj-os.blogspot.in/        3
C-LOOK Scheduling

• It is a version of C-SCAN

• Arm only goes as far as the last request in each
  direction
   – then reverses direction immediately, without first going all
     the way to the end of the disk




                         http://raj-os.blogspot.in/             4
C-LOOK 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/   5
C-LOOK Scheduling


• If the disk head is initially at cylinder 53,

   – it will first move from 53 to 65, (towards right)

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




                          http://raj-os.blogspot.in/     6
C-LOOK Scheduling




   Initial Head Position


     http://raj-os.blogspot.in/   7
C-LOOK Scheduling




Head movement from 53rd to 65th track


        http://raj-os.blogspot.in/      8
C-LOOK Scheduling




Head movement from 65th to 67th track


         http://raj-os.blogspot.in/     9
C-LOOK Scheduling




Head movement from 98th track to 122


         http://raj-os.blogspot.in/    10
C-LOOK Scheduling




Head movement from 98th track top 122


         http://raj-os.blogspot.in/     11
C-LOOK Scheduling




 Head movement from 122 to 124


       http://raj-os.blogspot.in/   12
C-LOOK Scheduling




 Head movement from 124 to 183


       http://raj-os.blogspot.in/   13
C-LOOK Scheduling




 Head movement 183 to 14


    http://raj-os.blogspot.in/   14
C-LOOK Scheduling




  Head from 14 to 37th track


     http://raj-os.blogspot.in/   15
C-LOOK Scheduling


• Advantages

  – Better than the C-SCAN algorithm in terms of head
    movement




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

C look scheduling 51 1

  • 1.
    C-LOOK Scheduling • SCANand C-SCAN algorithms move the disk arm across the full width of the disk • In practice neither of the algorithm is implemented this way http://raj-os.blogspot.in/ 1
  • 2.
    C-LOOK Scheduling • InC-LOOK Scheduling the arm goes only as far as final request in each direction • Then it reverses direction immediately without going all the way to the end of the disk http://raj-os.blogspot.in/ 2
  • 3.
    C-LOOK Scheduling • Whenthe head reaches the other end, – It immediately returns to the beginning of the disk – Without servicing any requests on the return trip • Treats the cylinders as a circular list that wraps around from the last cylinder to the first one http://raj-os.blogspot.in/ 3
  • 4.
    C-LOOK Scheduling • Itis a version of C-SCAN • Arm only goes as far as the last request in each direction – then reverses direction immediately, without first going all the way to the end of the disk http://raj-os.blogspot.in/ 4
  • 5.
    C-LOOK 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/ 5
  • 6.
    C-LOOK Scheduling • Ifthe disk head is initially at cylinder 53, – it will first move from 53 to 65, (towards right) – then to 67, 98, 122, 124, 183, 14 and 37 as shown in the next slides http://raj-os.blogspot.in/ 6
  • 7.
    C-LOOK Scheduling Initial Head Position http://raj-os.blogspot.in/ 7
  • 8.
    C-LOOK Scheduling Head movementfrom 53rd to 65th track http://raj-os.blogspot.in/ 8
  • 9.
    C-LOOK Scheduling Head movementfrom 65th to 67th track http://raj-os.blogspot.in/ 9
  • 10.
    C-LOOK Scheduling Head movementfrom 98th track to 122 http://raj-os.blogspot.in/ 10
  • 11.
    C-LOOK Scheduling Head movementfrom 98th track top 122 http://raj-os.blogspot.in/ 11
  • 12.
    C-LOOK Scheduling Headmovement from 122 to 124 http://raj-os.blogspot.in/ 12
  • 13.
    C-LOOK Scheduling Headmovement from 124 to 183 http://raj-os.blogspot.in/ 13
  • 14.
    C-LOOK Scheduling Headmovement 183 to 14 http://raj-os.blogspot.in/ 14
  • 15.
    C-LOOK Scheduling Head from 14 to 37th track http://raj-os.blogspot.in/ 15
  • 16.
    C-LOOK Scheduling • Advantages – Better than the C-SCAN algorithm in terms of head movement http://raj-os.blogspot.in/ 16