Sending commands to the controller

Sending commands to the controller Which algorithm is best

Tagged queuing is a technique initially developed in the realm of SCSI disk drives. It is sometimes called command queuing or native command queuing ( NCQ. ) It basically delegates all or part of the task of disk operation scheduling to the disk controller. Sending commands to the controller The device drivers for such drives pass all I/O requests directly to the drive controller and the controller does all the scheduling of the I/O operations. The theory is that the disk controller has a different level of information about the disk geometry and the current status of the disk mechanism and can therefore do a better job of scheduling multiple disk requests.

Such migration of functions closer to the hardware is a phenomenon we often see in the OS world. Once a technique proves useful in the OS we start thinking about putting the function into the hardware where it can often be done more cheaply and sometimes better and frees up valuable CPU and memory resources. In this case, the controller can do a better job because it is able to also consider rotational latency. Sending commands to the controller When much of the work was initially done on these disk scheduling algorithms the seek time was much greater than the rotational latency.

this depends highly on the details of the situation. Tagged queuing is implemented in most modern OSs. The technique is also now finding its way into the latest high-performance ATA disk drives.

Which algorithm is best?

After all this discussion of disk scheduling algorithms, it would seem reasonable to ask which algorithm is the best. Unfortunately, the answer to that question is one frequently heard in the computer business—“that depends.” In fact, there is no one algorithm that is the best in all situations. FCFS is the simplest and consumes the least resources. If a system is usually so lightly loaded that there are not multiple disk requests in the queue, then all algorithms behave the same as FCFS. In this case, no other algorithm would be justified.

However, many systems are moderate to heavily loaded, so we can’t get away with such an easy answer. In such cases, FCFS will give high service variability and is thus generally the worst choice. The next question that needs to be asked, then, is what parameter are we trying to optimize? In most cases, we are trying to optimize disk throughput. However, we saw earlier that the optimum throughput came at the expense of some unfairness to processes that were accessing files that were not in optimum places.

These requests would suffer either significantly delayed response time or variance in response time that was unpredictable and therefore unacceptable. Users can stand a long response if the program can warn them, but the high variance in the response time makes it impossible for the program to adequately warn the user. In most cases, then, some variation on the LOOK algorithm is probably the best. This assumes that your system does not contain new equipment that can handle the scheduling itself. If such hardware is available, then it can almost certainly do a better job than the OS can.

Also Read:-

Leave a Reply

Your email address will not be published. Required fields are marked *