Turnaround time for preemptive priority scheduling algorithm


Question 1)a) Describe the concept of virtual machines. Write a program in C to create a new process that lists the users currently logged on to the system and parent waits till the child process terminates.

b) With the help of diagrams, describe the current activities of a process when it executes and PCB of that process.

Question 2)a) Distinguish between a Process and a Thread. Describe the following threading issues to be considered in multithreaded programs:

i) fork() and exec() system calls

ii) Thread cancellation

iii) Thread pools

b) With essential diagram describe multilevel queue scheduling. For the following set of processes with the length of CPU burst time and arrival time in milliseconds is given:

1395_Process of cpu.jpg

Draw the Gantt chart and calculate average waiting time, average turnaround time for Preemptive Priority scheduling algorithm.

Question 3)a) Clearly show that with the general definition of semaphores with busy waiting, the value is never negative but with spinlock may have negative semaphore values.

b) What are two methods incurred to eliminate deadlocks in a system using process termination method. Consider a system with P0 through P4 and three resource types A, B, C. Assume resource type A has 10 instances, resource type B has 5 instances and resource type C has 7 instances. Following is the Maximum and Allocation matrices to the processes:

1562_Allocation matrix.jpg

i) Check whether the system remains in safe state or not at time t=t0. Give the safe sequence.

ii) At time t1>t0, Process P4 requests additional resources ( 3 3 0). Check whether this request could be granted and safety of the system.

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: Turnaround time for preemptive priority scheduling algorithm
Reference No:- TGS06632

Expected delivery within 24 Hours