Is it possible that one read-write head can do both copy and paste at the same time even on different tracks? How does that happen?
feedback
|
|
One step at a time.
| |||||||||
feedback
|
I/O requests are put in a queue, and handled one by one.There are various disk scheduling algorithms, picking the best one improves the time required to handle all the requests that are in the queue. A disk scheduling algorithm in general orders this queue in an attempt to more efficiently handle the request such that the head has to move less, the FIFO aka FCFS algorithm is an exception to this as it just reads the queue... Given that the seek time (the time to go to a location) is smaller if the head has to move less fast, multiple requests are handled fairly fast using the right disk scheduling algorithm. This is why it looks like if it was read/written very fast, but not in any case simultaneous... :) I'll list the most popular disk scheduling algorithms, more can be found at Wikipedia. Note: Files are usually fragmented, so to read one file multiple requests are put in the queue. Note 2: If you mean "why is moving a large file from one directory to another on the same volume so much faster than moving it to a different partition?" then the answer is because only the file's entry in the file table is altered rather than physically moving the file. — Comment by Amazed FIFO aka FCFS: First-In First-Out aka First Come First ServedAll requests are taken from the start of the queue without reordering them.
SSTF: Shortest Seek Time First.The request that takes the least move of the head is taken from the queue.
Note how the head has to move less, it stays still for the first three images. SCAN: Like an elevator.This always take the furthest away, then handling stuff it passes along the way.
In this picture it starts at track 2 and plans to go to track 4; so, it tries everything at track 2, then track 3 (nothing), then track 4, after which it goes to the furthest request which is track 1; so, it goes back and tries track 4, track 3 (nothing), track 2 (nothing) and then track 1. — Images: University of Wisconsin-Madison - CS 537 - Disk Scheduling (Originally might be by a book) | ||||
|
feedback
|
It isn't possible. Firstly read-write heads do not perform "copy" or "paste" operations. Those are much higher level concepts that apply in file-management applications such as Windows Explorer. The application and the operating system progressively break the copy and paste operation down into multiple smaller and smaller operations. Eventually the disk controller asks the disk to read some sectors. Later it asks the disks to write some data to certain other sectors. During and between these operations the actual disk-heads may also be performing lots of other unrelated operations and seeking back and forth across the physical columns or tracks. Optimisations are carried out at many levels in this process to maximise the amount of useful work that can be carried out by the disk every microsecond and to maximise the number of processes whose IO-operations can be progressed, according to their established priorities. | |||
|
feedback
|


