I am having hard time understanding the working of SCAN and CSCAN algorithm of disk scheduling.I understood FCFS,Closest Cylinder Next but heard that SCAN resembles elevator mechanism and got confused. My book says that for the incoming order :[10 22 20 2 40 6 38] (while the disk currently at 20) the SCAN moving at the start serves [(20) 20 22 38 40 10 6 2]; this requires moves of [0 2 16 2 30 4 4] cylinders, a total of 58 cylinders. How does the pattern [(20) 20 22 38 40 10 6 2] came?
Related Questions in OPERATING-SYSTEM
- Why two threads accessing one resource crashes one thread?
- How to tell the difference between linux and mac
- Can a single thread be shared among multiple processes ? If yes how?
- /usr/lib/* files had been deleted, how to restore these files
- What does a POSIX interface refer to in terms of microkernels?
- Is zero copy principle supported in Mac
- Why segment files into chunks for HTTP streaming?
- Add/remove process from kernel runqueue
- How does my computer know to which character a char corresponds?
- Who starts the OS process scheduler?
Related Questions in COMPUTER-SCIENCE
- 2D array - making it "torus" like
- How to get samples of different paths?
- How do I keep track of path in TSP?
- Need workaround to treat float values as tuples when updating "list" of float values
- How does a loop work at the lowest level
- Solving a complex recurrence relation for the Traveling Salesman
- Would this function be O(n^2log_2(n))?
- Watermark in a textbox c#/cs/aspx
- Writing a Recurrence Equation
- How to run Athena | Coq | Isabelle codes remotely?
Related Questions in DISK
- Detect volume mount and get its path
- Implementing Tree Structure in disk memory
- Trying to read from file within existing for loop
- Java file IO slows down with large consecutive writes
- Is it true that PE files map directly into memory?
- Low level page manager in C/C++
- I use freebsd11 but iops is very very poor ('fio' tools)
- How can I find the total disk size of the device my app is running on?
- Copying docker image folder between partition with rsync
- Invalid Directory Item Count (It should be 3*673 instead of 3*674) while MacBook partition using Disk Utility
Related Questions in DISK-IO
- Per file disk usage statistics C#
- Improve performance of first query
- SCAN and CSCAN algorithm
- Best way to write logs to SSD
- fio -numjobs bigger, the iops will be smaller, the reason is?
- Efficient way of file logging
- Secondary IDE channel in QEMU does not seem to work
- C++ - Managing References in Disk Based Vector
- Debug int 13h 02h function of boot sector in bochs
- How to get a disk IO time rate from prometheus
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Let's know what the SCAN(Elevator) disk-scheduling algorithm says:-
So, in your case, the current position of disk is at 20. So, as per the SCAN algorithm, it'll scan towards the nearest end, and just after hitting bottom, it scans up servicing the requests back up.
The order is :-
____
So, as per the given data, the order will be
[(20) 20 22 38 40 10 6 2];EDIT :-
The only difference between SCAN and CSCAN is that in CSCAN,
As per CSCAN,the direction of movement would be same uptil bottom and then it'll reverse the path.
So, as per the given data, the order will be
[(20) 20 22 38 40 2 6 10];Notice the change in last three disk positions.I hope it is clear. Feel free to ask remaining doubts.