Question: 1 . Five batch jobs, A through E , arrive at a computer at essentially the same time. They have an esti - mated running

1. Five batch jobs, A through E, arrive at a computer at essentially the same time. They have an esti- mated running time of 15,9,3,6, and 12 seconds, respectively. Their (externally defined) priorities are 6,3,7,9, and 4, respectively, with a lower value corresponding to a higher priority. For each of the following scheduling algorithms, determine the turnaround time for each process and the average turnaround for all jobs. Ignore process switching overhead. Show how you arrived at your answers. In all cases assume the processes do no I/O: they are completely CPU bound. For the last three cases, assume only one job at a time runs, and runs until it finishes.(a) roundrobinwithatimequantumof1second, (b) priorityscheduling,(c) FCFS (run in arrival order as shown above: 15,9,3,6,12),(d) shortestjobfirst.
2. Giventheformula:show the order in which individual calculations have to be performed to determine the value for G.G = D +(A + C2)\times E/(D + B)3For example, the value of C2 has to be computed before A + C2 can be computed.(a) Break the problem into a sequence of steps, each performing only one calculation, and show the result of each step (introduce new letters as needed).(b) Showwhichofthestepsyouidentifycouldbeperformedatthesametimeonseparateproces- sors, i.e., how you could parallelize this calculation.(c) ifA=2,B=4,C=5,D=6andE=8,showwhatthevalueofGis.
3. Suppose you have a real-time OS on some computer controlling an autonmous train operating in Vermont. The computer running this OS uses interrupts to interact with devices; it has 8 priority levels, 0..7, with 7 the highest priority. One of the hard real-time requirements is that when a cow event is detected, i.e., a foreign body of significant size on the tracks, the code that decelerates the train must begin executing not later than 20 ms after detection, and finish executing not later than 1600 ms after detection. The handler, itself, needs 1340 ms to run. The detection is made known first to the CPU via a priority 7 interrupt.(a) AssumetheCPUhasjustfinishedaninstruction,soischeckingifthereareanypendinghigher priority interrupts and so instantly sees there is a priority 7 interrupt to handle. If the OS takes 14 ms to save the current process context before beginning the handler for the interrupt, and then x ms to switch to and begin executing the handler, what is the largest permitted value for x if the start deadline is to be met?(b) Suppose someone in management made a poor decision and chose to implement this real- time system on a general-purpose OS that uses virtual memory. This computer uses an ssd (as opposed to a hard drive). The maximum time to service a page fault is 250 ms. For a worst-case plan (i.e., page fault(s) all take the maximum time), how many page faults can be tolerated and have the handler still meet its finish-by deadline?(c) If the train is moving at 60 mph when the event is first detected, how far does it move in the 20 ms before the handler begins executing? (or, if you prefer, suppose the train is moving at 100 kph). Remember to provide correct units with your answer.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!