preview

Nt1330 Final Paper

Satisfactory Essays

Consider the following preemptive priority-scheduling algorithm based on dynamically changing priorities. Larger priority numbers indicate higher priority (e.g., priority 3 is higher priority than priority 1; priority 0 is higher priority than priority -1, etc.). When a process is waiting for the CPU in the ready queue, its priority changes at the rate of  per unit of time; when it is running, its priority changes at the rate of  per unit of time. All processes are assigned priority 0 when they enter the ready queue. Answer the following questions:
(a) What is the scheduling algorithm that results when  >  > 0? Explain.
(b) What is the scheduling algorithm that results when  <  < 0? Explain.

Somebody proposed a CPU scheduling algorithm …show more content…

For calculating the CPU time of a process in the recent past, a time window of size t is maintained and the recent CPU time used by a process at time T is calculated as the sum of the CPU times used by the process between time T and T- t. It is argued that this particular scheduling algorithm (a) will favor I/O-bound processes, and (b) will not permanently starve CPU-bound processes. Do you agree/disagree with (a) and (b)? Explain.
Q.3 [10 marks] Consider a variant of the round robin (RR) scheduling algorithm in which the entries in the ready queue are pointers to the Process Control Blocks (PCBs), rather than the PCBs. A malicious user wants to take advantage and somehow, through a security loophole in the system, manages to put two pointers to the PCB of his/her process with the intention that it can run twice as much. Explain what serious consequence(s) it could have if the (malicious) intention goes undetected by the OS.

Q.4 [10 marks] Consider the version of the dining philosopher’s problem in which the chopsticks are placed in the centre of the table and any two of them can be used by a philosopher. Assume that requests for chopsticks are made one chopstick at a time. Describe a simple rule for

Get Access