Make your simulation run faster, Computer Engineering

Ameliorating the mechanical delays of seeks and rottion are usually regardeed as major aspects of device drivers for disks. The simplest way for a disk device driver to service disk IO requests is First Come First Served. However, most disk driver software instead uses the "elevator algorithm". If there is no IO request pending, the first request is serviced. If, however, there is at least one request pending, then the disk arm has a direction of movement: inward or outward from the ddisk spindle. Two ordered listsof pending IO requests are maintained: those that can sstill be serviced while the disk arm continues its current direction, and those that must be seerviced after the disk arm changes direction and sweeps back across the disk. IL requests are serviced in order of cylindr number, when there are no further pending IO requestts in the direction the disk arm has been moving, the disk arm reverses direction and starts servicing IO requests that had been behind it. IO requests may arrive while the arm is sweeping, and such requests are sorted into one of the two lists as appropriate.
A) To quantify the benefit of using the elevator algorithm, simulate the disk driver handling IO requests and compute the average and median service time if the requests were handled FCFS and the average and median time if the requests were handled by the elevator algorithm. Comment on the ratio between the FCFS and elevator algorithm results. 

Assume a typical modern disk has about 16000 cylkinders, that the time for the arm to seek the full width of the disk is 5 milliseconds, and that the disk rotates at 7200 rpm. but because of rotational position sensing, after seeking to the appropriate cylinder an IO request only needs to wait for otational delay from the end of where the previous IO request was serviced to the start of where the next IO request is to be serviced. Assume tht the seek time is proportional to the number of
cylinders that must be crossed from the cylinder where the previous IO request was serviced to the cylindeer where the next IO request is to be serviced. (Measurement on any real disk shows this model is incorrect, but close enough for our purpose.)
Assume that the load of IO requests arrive at exponentially distributed distributed time intervals with mean 1 millisecond, that the cylinder distribution is 25% from the swap space (and, for Unix File System, the inode space) that occupies a few cylinders in the middle of the disk but that otherwise the cylinder distribution of IO requests is uniform, and that the length of the dta transfer of an IO request is lognormal, with median 1k bytes and scale parameter 1. Simulate enough IO requests that your averages have less than 1% error.

B) One way to make your simulation run faster, expecially now that almost all personal computers have at least dual cores, would be to wrrite your program as multi-threadd. Regardless of whether you actually have access to a multi-thread environment, indicate where in your program you would have to insert concurrency control (say semaphores) in order to avoid critical races.

Posted Date: 3/16/2013 7:52:20 AM | Location : United States







Related Discussions:- Make your simulation run faster, Assignment Help, Ask Question on Make your simulation run faster, Get Answer, Expert's Help, Make your simulation run faster Discussions

Write discussion on Make your simulation run faster
Your posts are moderated
Related Questions
Consider the ReadRear Java method (a) Illustrate pictures that explain the data structure every time a checkpoint is reached for the problems of sizes one, two, three and four s

The do while Loop This is very similar to the while loop except that the test occurs at the end of the loop body. This guarantees that the loop is executed at least once before

Q. What is Bus arbitration? In this technique, I/O interface first needs to control bus and only after that it can request for an interrupt. In this technique because only one

Write the HTML code to accomplish the web page to insert the frame extending 300 pixels across the page from left side. The HTML code to accomplish the web page is given below

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example

What are the address-sequencing capabilities required in a control memory? i. Incrementing the control address register ii. Unconditional branch as specified by address fiel

Define asynchronous bus. Asynchronous buses are the ones in which every item being transferred is accompanied by a control signal that shows its presence to the destination uni

Define thread cancellation & target thread.  The thread cancellation is the task of terminating a thread before it has done. A thread that is to be cancelled is often referred

Recursive procedures are implemented by using Recursive procedures are executed by using stacks due to stacks are LIFO data structure and we require this feature to store retur

What is index register? In index mode the effective address of the operand is formed by adding a constant value to the contents of a register. The register used might be either