Description:
Discussion Board for CSE430 Operating Systems
|
|
|
Midterm Question 2
|
| |
Professor,
process i:
flag[i]=true;
turn=j;
while((flag[j] || flag[k]) && turn != i) do no op;
CS
flag[i] = false;
This was the question and to find out whether the algorithm satisfies
all 3 condition
Mutual exclusion is violated.
I have a doubt in Progress
Suppose a scenario... more »
|
|
Round robin Scheduling
|
| |
Suppose the time quanta in round robin is 2 ms but the first process
P1 which starts executing from 0 sec has CPU burst of only 1 sec so
the process releases the CPU at 1 sec. So now the next process starts,
P2 which has longer CPU burst than the time quanta. The question is
whether the time quanta adjust itself to start from this 1 sec for... more »
|
|
Monitor using semaphore
|
| |
We have implemented a monitor using semaphore in which the signalling
process blocks and the process which the signalling process wak up
executes. The signalling process resumes when the woken up process
either executes or exits the monitor.
I have written the routine in which signalling process continues and... more »
|
|
Milk Problem
|
| |
A synchronization problem called "too much milk problem is as follows"
Several people share a fridge, and the fridge contains milk (and other
things).
One person wants to drink milk.
-- check fridge, and there is no milk.
-- goes to shop to get milk
-- puts milk in fridge.
While the person was getting milk anotehr person checkd, found no milk... more »
|
|
CCR doubt
|
| |
Professor,
In CCR as you mentioned if the boolean is true the thread which was
blocked enters the CS where again it confirms Boolean condition is
true or not. I have a doubt that who checks the boolean condition
outside CS and if it is true why does it check again while in CS?
One more doubt is in Dining Philosophers:... more »
|
|
Assignment 3(problem 4)
|
| |
Professsor can you provide the some hint for the 4th problem. I am
having problem in how do I decrement the variable and then check for
it to become 0 for a process to get block.
|
|
Assignment 3(problem 3)
|
| |
Professor I cant understand the 3rd problem. How can we use semaphore
and implement it. ENQ checks the value to be equal to 1 but semaphore
always checks whether it is less than 0 and blocks if it is. But ENQ
blocks it if it is 1..
|
|
Assignment 3(problem 1)
|
| |
Is the whole shift function atomic or only the *A=*B part is atomic?
I think the whole function should be atomic because if not, suppose 2
process come at the same time.
Initially we consider *A=1;
//Considering *B as key for each process and *A as lock
1. P1 executes *B=*A; //key of P1 is set... more »
|
|
Scheduling question
|
| |
Suppose a process has some time for computation and some I/O process
for its completion. (lets say for 5ms for CPU computation and 2 ms of
I/O). So does it context switch every time when it come across its I/O
execution part even though it is a non preemptive OR
does the CPU is idle for the I/O execution part and the process... more »
|
|
|