operating-systemdisk-partitioning

SCAN and CSCAN algorithm in Operating system


With

SCAN

and

CSCAN

I've gone through some notes and coursebook regarding the drawing of SCAN and CSCAN algorithm, given a queue of requests and the position of head starts in the example.

I wonder if it is a must to move from the starting position to the position zero first, then the head reverse its direction to another end (which is the non-zero side)...

Is it OK if I move from the starting point to the non-zero side first (if the starting point given is closer to the non-zero side eg.124). After that, the head reverse it's direction back to the side of position zero.


Solution

  • It depends on the given direction of disk arm movement.

    You can choose either Towards the beginning of the disk or Towards the end of the disk.

    There is a Github project about Disk Scheduling Program, take a look if you want to know more about it