SlideShare a Scribd company logo
1 of 16
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

More Related Content

What's hot

Memory Management with Page Folios
Memory Management with Page FoliosMemory Management with Page Folios
Memory Management with Page FoliosAdrian Huang
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and AlgorithmDhaval Kaneria
 
Disk scheduling algorithms
Disk scheduling algorithms Disk scheduling algorithms
Disk scheduling algorithms Paresh Parmar
 
CS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsCS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsKrishnan MuthuManickam
 
Linked allocation 48
Linked  allocation 48Linked  allocation 48
Linked allocation 48myrajendra
 
malloc & vmalloc in Linux
malloc & vmalloc in Linuxmalloc & vmalloc in Linux
malloc & vmalloc in LinuxAdrian Huang
 
Disk Scheduling Algorithms
Disk Scheduling AlgorithmsDisk Scheduling Algorithms
Disk Scheduling Algorithmsali jawad
 
Cache memory
Cache memoryCache memory
Cache memoryAnuj Modi
 
Deadlocks in operating system
Deadlocks in operating systemDeadlocks in operating system
Deadlocks in operating systemSara Ali
 
Allocation of Frames & Thrashing
Allocation of Frames & ThrashingAllocation of Frames & Thrashing
Allocation of Frames & Thrashingarifmollick8578
 
Pipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture pptPipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture pptmali yogesh kumar
 
10.m way search tree
10.m way search tree10.m way search tree
10.m way search treeChandan Singh
 
Disk allocation methods
Disk allocation methodsDisk allocation methods
Disk allocation methodsajeela mushtaq
 

What's hot (20)

Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
Memory Management with Page Folios
Memory Management with Page FoliosMemory Management with Page Folios
Memory Management with Page Folios
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and Algorithm
 
Disk scheduling algorithms
Disk scheduling algorithms Disk scheduling algorithms
Disk scheduling algorithms
 
CS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsCS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of Algorithms
 
Linked allocation 48
Linked  allocation 48Linked  allocation 48
Linked allocation 48
 
malloc & vmalloc in Linux
malloc & vmalloc in Linuxmalloc & vmalloc in Linux
malloc & vmalloc in Linux
 
Floyd Warshall Algorithm
Floyd Warshall AlgorithmFloyd Warshall Algorithm
Floyd Warshall Algorithm
 
Disk Scheduling Algorithms
Disk Scheduling AlgorithmsDisk Scheduling Algorithms
Disk Scheduling Algorithms
 
Cache memory
Cache memoryCache memory
Cache memory
 
Quick sort
Quick sortQuick sort
Quick sort
 
Deadlocks in operating system
Deadlocks in operating systemDeadlocks in operating system
Deadlocks in operating system
 
Distributed and clustered systems
Distributed and clustered systemsDistributed and clustered systems
Distributed and clustered systems
 
Allocation of Frames & Thrashing
Allocation of Frames & ThrashingAllocation of Frames & Thrashing
Allocation of Frames & Thrashing
 
Stack
StackStack
Stack
 
Pipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture pptPipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture ppt
 
The Floyd–Warshall algorithm
The Floyd–Warshall algorithmThe Floyd–Warshall algorithm
The Floyd–Warshall algorithm
 
10.m way search tree
10.m way search tree10.m way search tree
10.m way search tree
 
Disk allocation methods
Disk allocation methodsDisk allocation methods
Disk allocation methods
 
Demand paging
Demand pagingDemand paging
Demand paging
 

Similar to C look scheduling 51 1

Sstf scheduling.50
Sstf scheduling.50Sstf scheduling.50
Sstf scheduling.50myrajendra
 
Disk scheduling algorithm.52
Disk scheduling algorithm.52Disk scheduling algorithm.52
Disk scheduling algorithm.52myrajendra
 
secondary storage structure :disk arm scheduling in OS
secondary storage structure :disk arm scheduling in OSsecondary storage structure :disk arm scheduling in OS
secondary storage structure :disk arm scheduling in OSPrincePrajapati22
 
Explained Disk Scheduling Algo ...
Explained Disk Scheduling Algo ...Explained Disk Scheduling Algo ...
Explained Disk Scheduling Algo ...Adarsh Kr Sinha
 

Similar to C look scheduling 51 1 (8)

Sstf scheduling.50
Sstf scheduling.50Sstf scheduling.50
Sstf scheduling.50
 
Disk Scheduling.pptx
Disk Scheduling.pptxDisk Scheduling.pptx
Disk Scheduling.pptx
 
Disk scheduling algorithm.52
Disk scheduling algorithm.52Disk scheduling algorithm.52
Disk scheduling algorithm.52
 
secondary storage structure :disk arm scheduling in OS
secondary storage structure :disk arm scheduling in OSsecondary storage structure :disk arm scheduling in OS
secondary storage structure :disk arm scheduling in OS
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
Explained Disk Scheduling Algo ...
Explained Disk Scheduling Algo ...Explained Disk Scheduling Algo ...
Explained Disk Scheduling Algo ...
 
Device Management
Device ManagementDevice Management
Device Management
 

More from myrajendra (20)

Fundamentals
FundamentalsFundamentals
Fundamentals
 
Data type
Data typeData type
Data type
 
Hibernate example1
Hibernate example1Hibernate example1
Hibernate example1
 
Jdbc workflow
Jdbc workflowJdbc workflow
Jdbc workflow
 
2 jdbc drivers
2 jdbc drivers2 jdbc drivers
2 jdbc drivers
 
3 jdbc api
3 jdbc api3 jdbc api
3 jdbc api
 
4 jdbc step1
4 jdbc step14 jdbc step1
4 jdbc step1
 
Dao example
Dao exampleDao example
Dao example
 
Sessionex1
Sessionex1Sessionex1
Sessionex1
 
Internal
InternalInternal
Internal
 
3. elements
3. elements3. elements
3. elements
 
2. attributes
2. attributes2. attributes
2. attributes
 
1 introduction to html
1 introduction to html1 introduction to html
1 introduction to html
 
Headings
HeadingsHeadings
Headings
 
Forms
FormsForms
Forms
 
Css
CssCss
Css
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Starting jdbc
Starting jdbcStarting jdbc
Starting jdbc
 

C look scheduling 51 1

  • 1. 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
  • 2. 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
  • 3. 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
  • 4. 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
  • 5. 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
  • 6. 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
  • 7. C-LOOK Scheduling Initial Head Position http://raj-os.blogspot.in/ 7
  • 8. C-LOOK Scheduling Head movement from 53rd to 65th track http://raj-os.blogspot.in/ 8
  • 9. C-LOOK Scheduling Head movement from 65th to 67th track http://raj-os.blogspot.in/ 9
  • 10. C-LOOK Scheduling Head movement from 98th track to 122 http://raj-os.blogspot.in/ 10
  • 11. C-LOOK Scheduling Head movement from 98th track top 122 http://raj-os.blogspot.in/ 11
  • 12. C-LOOK Scheduling Head movement from 122 to 124 http://raj-os.blogspot.in/ 12
  • 13. C-LOOK Scheduling Head movement from 124 to 183 http://raj-os.blogspot.in/ 13
  • 14. C-LOOK Scheduling Head movement 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