All Exams Test series for 1 year @ ₹349 only
Question

Consider the following disc Queue with requests for I/O to block on cylinders:
45, 81, 185, 33, 175, 99, 150, 77
(Consider that the head starts from location 58)

What shall be the total head movement of cylinders for the C-SCAN disc Scheduling technique if the head starts moving in the right direction from initial position?

The correct answer is
385

Understanding C-SCAN Disc Scheduling and Head Movement

This question asks us to calculate the total head movement for a disk scheduling algorithm called C-SCAN (Circular SCAN). We are given a list of I/O requests to different cylinders and the starting position of the disk head. We need to find the total distance the head travels.

C-SCAN Algorithm Explanation

The C-SCAN algorithm is a variation of the SCAN algorithm. It works as follows:

  • The disk head starts at a specified position.
  • It moves in a single direction (e.g., towards higher cylinder numbers) and services all requests in its path.
  • When it reaches the last cylinder (e.g., cylinder 199, assuming a maximum), it immediately jumps back to the first cylinder (e.g., cylinder 0).
  • It then starts moving in the same direction again, servicing any remaining requests. Crucially, it does not service requests on the return path like standard SCAN; it just seeks back to the beginning and starts a new sweep.

In this problem, the head starts at cylinder 58 and moves in the right direction (towards higher cylinder numbers).

Calculating Head Movement for C-SCAN

First, let's list the given I/O requests and the starting position:

  • Requests: 45, 81, 185, 33, 175, 99, 150, 77
  • Starting Position: 58
  • Direction: Right (towards higher numbers)
  • Disk Capacity: We'll assume a standard disk capacity, typically 0 to 199 cylinders, unless specified otherwise. So, the maximum cylinder is 199.

Step 1: Sort the Requests

Sorting the requests helps in determining the order of servicing:

Sorted Requests: 33, 45, 77, 81, 99, 150, 175, 185

Step 2: Trace the C-SCAN Path (Moving Right)

The head starts at 58 and moves towards the right (higher cylinder numbers).

  1. The head is initially at cylinder 58.
  2. It needs to service requests that are greater than or equal to 58. These are: 77, 81, 99, 150, 175, 185.
  3. The head moves from 58 to 185, servicing these requests in order.
  4. Movement in this first sweep: The total distance covered from the start position (58) to the last request serviced in this direction (185) is calculated as $185 - 58$.
  5. Calculation: $185 - 58 = 127$ cylinders.
  6. After reaching the last request (185), the head moves to the end of the disk, cylinder 199.
  7. Movement from 185 to 199: $199 - 185$.
  8. Calculation: $199 - 185 = 14$ cylinders.
  9. The head then immediately jumps from the end (199) to the beginning (0) of the disk.
  10. Movement for the jump: $199 - 0$.
  11. Calculation: $199 - 0 = 199$ cylinders.
  12. Now, the head moves right again from cylinder 0, servicing the remaining requests (those less than the starting position 58). These are: 33, 45.
  13. The head moves from 0 to 45, servicing these requests in order.
  14. Movement in this second sweep (from the beginning): The total distance covered from 0 to the last request serviced in this direction (45) is calculated as $45 - 0$.
  15. Calculation: $45 - 0 = 45$ cylinders.

Step 3: Calculate Total Head Movement

The total head movement is the sum of the movements in each step:

Total Movement = (Movement from 58 to 185) + (Movement from 185 to 199) + (Jump from 199 to 0) + (Movement from 0 to 45)

Total Movement = $(185 - 58) + (199 - 185) + (199 - 0) + (45 - 0)$

Total Movement = $127 + 14 + 199 + 45$

Total Movement = 385 cylinders.

Conclusion

Therefore, the total head movement for the C-SCAN disc scheduling technique, starting from cylinder 58 and moving in the right direction, is 385 cylinders.

Was this answer helpful?

Important Questions from Disk Scheduling

  1. Which of the following is the time taken to move an access arm to a certain track on a disk?

  2. Move the Read/Write head of disk in or out to position on a correct track is known as ______.

  3. _______ is a process of lifting the process from memory and placing it on disk.

  4. Match List I with List II
    List IList II
    A. RAID Level 2I. Block interleaved distribution parity
    B. RAID Level 3II. Also known as P+Q redundancy Scheme
    C. RAID Level 5III. Bit interleaved parity
    D. RAID Level 6IV. Also known as Memory style error correcting code organization

    Choose the correct answer from the options given below:
  5. What shall be the total head movement of cylinders if the FCFS disc scheduling method is used ?
Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App