Final-Assignment Cse
Final-Assignment Cse
Final-Assignment Cse
Department: CSE
ID: 181071019
Batch: 17th
Semester: 7th
Date of Submission: 11June 2020.
Operating System Final Assignment
Deadlock :
Deadlock detection is the process of actually determining that a deadlock exists and
identifying the processes and resources involved in the deadlock.
The basic idea is to check allocation against resource availability for all possible
allocation sequences to determine if the system is in deadlocked state a. Of course, the
deadlock detection algorithm is only half of this strategy. Once a deadlock is detected,
there needs to be a way to recover several alternatives exists:
These methods are expensive in the sense that each iteration calls the detection
algorithm until the system proves to be deadlock free. The complexity of algorithm
is O(N2) where N is the number of proceeds. Another potential problem is starvation;
same process killed repeatedly.
Coffman (1971) identified four (4) conditions that must hold simultaneously for there
to be a deadlock.
The simple rule to avoid traffic deadlock is that a vehicle should only enter an
intersection if it is assured that it will not have to stop inside the intersection.
It is not possible to have a deadlock involving only one single process. The deadlock
involves a circular “hold-and-wait” condition between two or more processes, so
“one” process cannot hold a resource, yet be waiting for another resource that it is
holding. In addition, deadlock is not possible between two threads in a process,
because it is the process that holds resources, not the thread that is, each thread has
access to the resources held by the process.
Disk scheduling is done by operating systems to schedule I/O requests arriving for the disk.
Disk scheduling is also known as I/O scheduling.
Virtual memory:
Single-level directory,
Advantages:
Disadvantages:
There may chance of name collision because two files can not
have the same name.
Two-level directory –
Advantages:
Disadvantages:
Still it not very scalable, two files of the same type cannot be
grouped together in the same user.
Tree-structured directory –
Advantages:
Disadvantages:
Every file does not fit into the hierarchical model, files may be
saved into multiple directories.
Advantages:
Disadvantages:
If the link is softlink then after deleting the file we left with a
dangling pointer.
Advantages:
It allows cycles.
Disadvantages:
allocate the 1st hole that is big enough for a first feat 40K is
preferred.
Best feet,
Worst feet,
So, first feet and best fit bit turned them was then worst feat in
terms of speed and storage utilization.
Grouping,
Counting.
Solutions,
Mutual Exclusion
Mutual exclusion implies that only one process can be inside the
critical section at any time. If any other processes require the critical
section, they must wait until it is free.
Progress
Progress means that if a process is not using the critical section, then
it should not stop any other process from accessing it. In other words,
any process can enter a critical section if it is free.
Bounded Waiting
Bounded waiting means that each process must have a limited
waiting time. It should not wait endlessly to access the critical section.
2 Printers.
4 Scanners.
3 Hard disks.