Look and C Look - TarisMajor/5143-OpSystems GitHub Wiki

look-and-clook-algorithm-7

LOOK and C-LOOK are disk scheduling algorithms that are variations of the SCAN (Elevator) algorithm. These algorithms are designed to improve the efficiency and performance of disk I/O operations by reducing seek time and providing a more predictable service order.

Key Characteristics of LOOK Scheduling

  1. Bidirectional Movement with Limits: The disk arm moves in one direction, servicing requests until it reaches the last request in that direction. It then reverses and services requests in the opposite direction, but only as far as the last request in that direction.
  2. Dynamically Adjusted Bounds: Unlike SCAN, which goes to the end of the disk, LOOK adjusts its bounds based on the actual requests, reducing unnecessary movement.

Advantages of LOOK Scheduling

  1. Reduced Seek Time: By not traveling to the ends of the disk unless necessary, LOOK minimizes seek time and increases overall efficiency.
  2. Adaptive Movement: LOOK adapts to the current set of requests, making it more efficient than SCAN, especially when disk requests are clustered.
  3. Fair Access: Similar to SCAN, LOOK provides fair access to requests on both sides of the disk arm’s current position.

Disadvantages of LOOK Scheduling

  1. Complex Implementation: LOOK is more complex to implement than simpler algorithms like FCFS because it requires dynamically adjusting the bounds of disk arm movement.
  2. Longer Wait Times for Some Requests: While it generally reduces seek times, requests near the ends of the disk can still experience longer wait times.

Key Characteristics of C-LOOK Scheduling

  1. Unidirectional Service with Limits: C-LOOK moves in one direction, servicing requests only as far as the last request in that direction. It then returns to the beginning of the disk without servicing requests on the return trip.
  2. Circular Boundaries: Similar to C-SCAN, C-LOOK treats the disk as a circular entity but limits its movement to the bounds of the actual requests.

Advantages of C-LOOK Scheduling

  1. Uniform Wait Times: By servicing requests in one direction and quickly returning to the start, C-LOOK provides more uniform wait times compared to LOOK.
  2. Efficient Movement: C-LOOK reduces the overall movement of the disk arm, improving efficiency and reducing wear on the disk mechanism.
  3. Consistent Performance: The predictable pattern of C-LOOK ensures consistent performance across different sets of requests.

Disadvantages of C-LOOK Scheduling

  1. Return Trip Overhead: The quick return of the disk arm without servicing requests can introduce some overhead, although it is generally less than in SCAN or LOOK.
  2. Complexity: Implementing C-LOOK requires additional logic to manage the circular movement and ensure efficient handling of requests.

Use Cases for LOOK and C-LOOK Scheduling

  1. Multi-User Systems: Both algorithms are suitable for multi-user systems where fairness and efficiency are important.
  2. Database Systems: Effective in database systems requiring predictable and efficient disk access patterns.
  3. High-Performance Environments: Useful in high-performance computing environments where disk I/O efficiency and consistency are critical.

Sources for Further Reading