- Operating System Tutorial
- OS - Home
- OS - Overview
- OS - Components
- OS - Types
- OS - Services
- OS - Properties
- OS - Processes
- OS - Process Scheduling
- OS - Scheduling algorithms
- OS - Multi-threading
- OS - Memory Management
- OS - Virtual Memory
- OS - I/O Hardware
- OS - I/O Software
- OS - File System
- OS - Security
- OS - Linux
- OS - Exams Questions with Answers
- OS - Exams Questions with Answers
- Operating System Useful Resources
- OS - Quick Guide
- OS - Useful Resources
- OS - Discussion
C-LOOK Disk Scheduling Algorithm
What is C-LOOK Disc Scheduling Algorithm?
In operating systems, C-LOOK or Circular-LOOK is a type of disk scheduling algorithm which is used to increase the efficiency of accessing data on a disk. C-LOOK algorithm is basically an improved version of the LOOK disc scheduling algorithm. The main purpose of designing the C-LOOK algorithm is to reduce the seek time and improve the throughput of the system.
The C-LOOK algorithm is a type of circular algorithm because it treats the disc as if it were circular. That means it has the last request in each direction being adjacent to the first request in the opposite direction. Consequently, the disc arm does not require to move all the way to the end of the disc before returning to the starting point. This greatly reduces the seek time required to access data on the disc.
The C-LOOK algorithm scans the requests only in the direction of the disc arm movement. Therefore, In the case of C-LOOK algorithm, when a request is processed, the disc arm continues to move in the same direction until it reaches the last request in that direction. After that it immediately moves to the beginning of the disc and starts processing requests in the same direction again. This process is continuously followed until all the requests have been processed.
How Does the C-LOOK Disk Scheduling Algorithm Work?
Let us understand the working of C-LOOK disc scheduling algorithm with the help of an example. For that consider an I/O request as (25, 90, 135, 40, 180).
Let say the disc arm/head starts at the number 100. Therefore, the disc arm movement will be from 100 to 90 because 90 comes on its way while moving to the other end, then the movements will be as from 90 to 40, from 40 to 25, from 23 to 180, and finally from 180 to 135. So, we can draw the graph to represent these disc arm movements as shown in the following figure.
From this figure, we can calculate the total head movements and average head movements as follows −
Total head movements are −
= |(100 – 90)| + |(90 – 40)| + |(40 – 25)| + |(25 – 180)| + |(180 – 135)| = 10 + 50 + 15 + 155 + 45 = 275 Cylinders
The average head movements are −
= 275 / 5 = 55 Cylinders
Advantages of C-LOOK Algorithm
The C-LOOK algorithm has several advantages as compared to other disc scheduling algorithms. Some important advantages are listed below −
C-LOOK algorithm is a highly efficient scheduling algorithm, especially for the systems having high I/O workloads.
C-LOOK algorithm has a comparatively shorter average seek time as it only processes requests in the direction of the disc arm movement.
C-LOOK algorithm ensures that all the requests are eventually served. Hence, CLOOK algorithm is able to prevent the problem of starvation of requests.
Limitation of C-LOOK Algorithm
The C-LOOK algorithm has some limitations too, which are listed below −
Since the C-LOOK algorithm only services requests in the direction of the disc arm movement. Thus, this algorithm is not suitable for systems having a large number of requests located near the beginning or end of the disc.
C-LOOK algorithm cannot be used for systems with heavy read and write workloads. This is because it can cause increased latency and reduced throughput of the system.
In conclusion, C-LOOK algorithm is a highly effective and efficient disc scheduling algorithm in operating systems. This disc scheduling algorithm can increase the performance of disc I/O operations in operating systems.
- Related Articles
- C-LOOK vs C-SCAN Disk Scheduling Algorithm
- FCFS vs SSTF Disk scheduling Algorithm
- Disk Scheduling and Management
- FCFS Disk Scheduling Algorithms
- Longest Job First (LJF) CPU Scheduling Algorithm
- Least Slack Time (LST) scheduling Algorithm in real-time systems
- Longest Remaining Time First (LRTF) or Preemptive Longest Job First CPU Scheduling Algorithm
- C++ Program for Priority Scheduling
- C Program for FCFS Scheduling
- Two City Scheduling in C++
- C Program for Round Robin scheduling
- Maximum Profit in Job Scheduling in C++
- Find free disk space using C#
- Checking data disk, log disk and Trace disk in SAP HANA
- FCFS Scheduling