OS Test 1
To remember:
Max - Allocation = Need
for the new system, IF the resources shit is LESS OR EQUALS TO THE NEED
AND AVAIL
then + allocation, need - resource and available - resource
and then redo the whole sequende again bitch
Dining philosopher
What to expect:
30% of your grade!!!
2 Questions on calculation (Lect 4 scheduling and Lect 6 deadlock)
2 Questions on theory (Lect 3, 5 and 6)
Short questions apparently?
In lecture notes, there’s homework. After bankers algortihm
if you want to score test 1 do your homework
THEORY QUESTION HAVE TO FOCUS ON ALL LECTURE 3-6 !!!!
OS Test 1 1
, What to know:
Explain the four conditions that must hold for deadlock to occur.
Mutual exclusion: one process at a time
Hold and wait: A process holding a resource waiting for other processes to
release more resources the process needs.
No preemption: Resources cannot be preempted
Circular wait: There exists a set {P0, P1, ..., P0} of waiting processes such that
P0 is waiting for a resource that is held by P1, P1 is waiting for a resource that
is held by P2
Consider a system consisting of four resources of the same type that are shared by
three processes, each of which needs at most two resources. Show that the system
is deadlock-free.
Suppose the system is deadlocked.
Then each process is holding one resource and is waiting for one more. Since
there are three processes and four resources, one process must be able to
obtain two resources. This process requires no more resources and, therefore it
will return its resources when done.
Answer the following questions using the banker's algorithm:
a) What is the content of the matrix Need?
max - allocation
Is the system in a safe state?
yes if all processes are in safe. no if some are safe
c) If a higher priority request made by process P1 for (0,4,2,0) resources, can the
request be
granted immediately?
OS Test 1 2
To remember:
Max - Allocation = Need
for the new system, IF the resources shit is LESS OR EQUALS TO THE NEED
AND AVAIL
then + allocation, need - resource and available - resource
and then redo the whole sequende again bitch
Dining philosopher
What to expect:
30% of your grade!!!
2 Questions on calculation (Lect 4 scheduling and Lect 6 deadlock)
2 Questions on theory (Lect 3, 5 and 6)
Short questions apparently?
In lecture notes, there’s homework. After bankers algortihm
if you want to score test 1 do your homework
THEORY QUESTION HAVE TO FOCUS ON ALL LECTURE 3-6 !!!!
OS Test 1 1
, What to know:
Explain the four conditions that must hold for deadlock to occur.
Mutual exclusion: one process at a time
Hold and wait: A process holding a resource waiting for other processes to
release more resources the process needs.
No preemption: Resources cannot be preempted
Circular wait: There exists a set {P0, P1, ..., P0} of waiting processes such that
P0 is waiting for a resource that is held by P1, P1 is waiting for a resource that
is held by P2
Consider a system consisting of four resources of the same type that are shared by
three processes, each of which needs at most two resources. Show that the system
is deadlock-free.
Suppose the system is deadlocked.
Then each process is holding one resource and is waiting for one more. Since
there are three processes and four resources, one process must be able to
obtain two resources. This process requires no more resources and, therefore it
will return its resources when done.
Answer the following questions using the banker's algorithm:
a) What is the content of the matrix Need?
max - allocation
Is the system in a safe state?
yes if all processes are in safe. no if some are safe
c) If a higher priority request made by process P1 for (0,4,2,0) resources, can the
request be
granted immediately?
OS Test 1 2