Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C PROGRAMMING In this assignment you will write a program that simulates scheduling processes. Your program needs to implement the SJF and SJF live algorithms.
C PROGRAMMING
In this assignment you will write a program that simulates scheduling processes. Your program needs to implement the SJF and SJF live algorithms. Your simulation should be divided into ticks' where each process is sched uled (based on tn or Tn values), and allowed to execute. The values of tn represent the CPU burst times required by a process over it 's lifetime. Note that a tick is different than the current time. A tick is simulating running a batch of processes, whereas time globally increases as each process in a batch runs. The first few ticks of the SJF on the processes given in Data File section are illustrated below SJF: Tick= 0 Tick= 1 Tick-2 PO P1 PO P1 PO P1 t-19 t-36 For the live algorithm, you should rely on ? each iteration not tnwhich is the actual time the process takes in that tick and a value unknown to the algoritht is trying to guess it!). At the end of each simulation, display the turnaround and waiting times. For the live algorithm, also compute the "estimation error" which is the sum of the absolute differences between each Tn and tn When you calculate turnaround and waiting times, do so with respect to the beginning of the latest tick. That is, don't include waiting on the previous ticks since the process was executing at those times and is only waiting within the current tick Sample out put --Shortest -Job -First-- Simulating oth round of processes time o: Process o took 6 Process 1 took 13. Simulating 1th round of pr ocesses time 19Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started