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
The process needs many resources to complete certain tasks these resources include CPU time, memory, files and I/O devices for its task to be complete. These resources are either allocated to the process when it is running or is given to the process when it is created.
6.2) Preemptive scheduling allows a process to be invoked/disturbed in the middle of its execution by taking the CPU and assigning it to another process which is in queue where as in case of NonPreemptive scheduling, process will give up on CPU only when the current process is executed and finished.
Medium-term scheduler: It selects processes from the ready or blocked queue and removes them from memory. Then it reinstates them later to continue running.
for the next time slot of a core can consume a lot of time in
13 Solution of task D2...................................................................................... 14 Reference...................................................................................................15
It involves a reference to a sequence of steps or events and the allotted time for each one.
I considered several different possibilities when deciding on these scheduling procedures. First, I considered a deontological approach. In this
for (i = 0; i < N; i++) { //search for ID in the blocked queue
After running a process flow [see Exhibit 2], it becomes apparent that a main bottleneck exists at the
Also since cpk is less then 0, the process is centered outside of the specification limits and since C_P≠C_pk it can be stated that this process is not centered inside the specifications With this new information, it has come to the companies attention that they are not meeting their promise of service within 2 minutes so a new company directive is formed, workers are to try harder to get to the cars faster. Again, data is collected of the time it takes to reach each car.
a. Imagine an alarm going off, waking you from a deep sleep. It’s 8 am on a Monday morning and, after much reluctance, you stumble out of bed, take a shower, brush your teeth, and trudge to your kitchen for your morning cup of coffee. Realizing it’s time to head off to work, you start your car and start making your way onto the interstate, only to be slowed down by a mile long stretch of heavy traffic. Looks like you might just be late for work and have to hear a long rant about it from your boss.
Problem 5. (20 points) What is the difference between multiprogramming and multiprocessing? Multiprogramming and multithreading?
Once processing begins, they move directly from process to process (or sit in mini-queues). The result is very fast throughput.
1) Short-term scheduling: It selects from jobs in memory, those jobs which are ready to execute, and allocates the CPU to one of them. CPU selects
and so processes it, changing the final result into 20 (10100B) as seen in figures 1.1 and 2.2 (time 130