Question: Scheduler | C Language Write a scheduler and an infrastructure to demonstrate your schedulers functionality. This infrastructure will require: Process File Generator: A process must

Scheduler | C Language

Write a scheduler and an infrastructure to demonstrate your schedulers functionality. This infrastructure will require:

  • Process File Generator:
    • A process must have a memory requirement, a maximum allowable run time, and one of four priorities of equal probability.
    • A process will execute from 1000, to 100,000 I/O operations with from 1 to 20 instruction blocks, each of which represents 1us of execution time between each I/O.
    • A process is granted from 400ms to 40,000ms of execution time.
    • A process requires from 10mB to 200mB of memory.
  • Virtual Process Execution Engine:
    • There is a 2% likelihood that an I/O will block
    • 90% of the time a process I/O will stall/block/wait for 4ms to 100ms using an exponential delay [hint: x = (rand() % 9) + 2); delay = x * x;]
    • 10% of the time a process will stall for 100ms to 100,000ms using an exponential delay.
    • A process is not allowed to execute continuously for more than a 10ms quantum. [note: this does not mean that it must execute for 10ms.]
    • The system has 100mB of memory, each process has a working set size that requires 10% of its memory size (only 20 processes fit in memory). If you choose to execute a program that is not in memory, it costs 100ms of clock time during which nothing happens.

Once the infrastructure is in place, write a scheduler that will:

  • Issue a new process into the system randomly every 20ms to 10,000ms
  • Be fair
    • Each execution priority should be given twice as much execution time as the next lower priority
  • Not starve any given process
    • Every process should execute at least every second
  • For each processing priority calculate the average clock-time of each process and its standard deviation
  • Make 3 improvements in your initial scheduling algorithm and show its impact on performance.

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!