Question: Consider the following task set ( also given in the input.txt file ) Task Name Priority ( when applicable ) CPU burst ( ms )

Consider the following task set (also given in the input.txt file) Task Name Priority (when applicable) CPU burst (ms) T1215 T245 T3225 T4315 T5110. Task Set. Priorities range from 1 to 4, where a higher numeric value indicates a higher relative priority. Any ties in CPU burst times (or priorities) are to be broken randomly. The following three scheduling algorithms should be implemented in three different threads created using POSIX Threads (i.e., pthreads) Library. The main thread in your program will finally print on console the generated schedule using a modified Gantt chart, average waiting time, and average turnaround time for each algorithm. Task set should be taken as an input from the input.txt file. 1. First-come, first-served (FCFS) assuming all the tasks arrive at the same time in the order listed in the task set. 2. Shortest-job-first (SJF) assuming all the tasks arrive at the same time. 3. Preemptive priority scheduling (PS) using the priorities given in the task set and using a random arrival time (in ms) in the interval [0,100] for each task. You should generate random arrival times using a random number generator function of the programming language you use. You must also print the arrival times generated by your program before you print this schedule.

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 Programming Questions!