OSY Project

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Teacher Evaluation Sheet

Name of Student: Tope Akshay Ravindra


Enrolment No: 2100790246
Name of Program: Computer Technology Semester:-V
Course Title: Operating System (OSY) Code: -22516
Title of the Micro Project: Deadlock

Course Outcomes Achieved:-


a) CO-a Install operating system and configure it.
b) CO-b Use operating system tools to perform various functions.
c) CO-c Execute process commands for performing process management operations.

Evaluation as per Suggested Rubric for Assessment of Micro-Project:

Sr.
Characteristic to be Poor Average Good Excellent
No.
assessed (Marks 1-3) (Marks 4-5) (Marks 6 - 8) (Marks 9-10)
(A) Process and Product Assesssment (Convert above total marks out of 6 marks)
1 Relevance to the Course
Literature Survey /
2
Information Collection
Completion of the Target
3
as per project proposal
Analysis of data and
4
representation
Quality of Prototype /
5
Model
6 Report Preparation
(B) Individual Presentation / Viva (Convert above total marks out of 4 marks)
8 Presentation
9 Viva
Micro – Project Evaluation Sheet:
Process Assessment Product Assessment
Part Part Individual
Project
A– B – Project Presentation Total
Methodolog
project Report / / Marks
y
Name of Student Proposal Working Viva(4 10
(2 marks)
(2 marks Model(2 marks) marks)
Tope Akshay Ravindra
Comments / Suggestions about team work / leadership / inter – personal communication (if
any)
Any Other Comment

Name and designation of the faculty Member: Mrs. S. V. Shelke Signature

1
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION

SNJBs SHRI H. H. J. B. POLYTECHNIC,


CHANDWAD-423101 (Nashik)

MICRO PROJECT
Academic year: 2023-24

TITLE OF PROJECT

Deadlock

Program:Computer Technology Program Code:CM

Course: Operating System Course code: 22516

2
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

Sr.No. Name of Student Roll No Enrollment Seat


No No
1. Tope Akshay Ravindra 30 2100790246 379099

CERTIFICATE
This is to certify 1) Tope Akshay Ravindra

of 5th Semester of Diploma in Computer Technology of Institute, Shri H.H.J.B.


Polytechnic, Chandwad (Code: 0079) has completed the Micro-Project satisfactorily
in Subject Operating System (22516) for the academic year 2022-2023 as
prescribed in the curriculum.

Place: CHANDWAD

Date: 8/ 10/2023

Subject Teacher Head of Department Principal


(Mrs.S.V.Shelke) (Mr. P. R. Sali) (Dr. V. A. Wankhede)

Seal of
Institute

3
INDEX

SR_NO. CONTENT PAGE NO.

Part A

1 Brief Introduction 06

2 Aim of Micro Project 06

3 Action Plan 06

4 Resources Required 06

Part B

1 Brief Description 07

2 Aim of Micro Project 07

3 Course Outcome Integrated 07

4 Actual Procedure Followed 07

5 Actual Resource Used 07

6 Outputs of the Micro-projects 07

7 Skill Developed 11

8 Applications of Microproject 11

4
PART A-Plan

Title of micro-project: Deadlock

1. Aim/Benefits of the Micro-Project-

To generate report on deadlock that occeres in processes in operating


system.

2. Course Outcomes Addressed-


a) CO-a Install operating system and configure it.
b) CO-b Use operating system tools to perform various functions.
c) CO-c Execute process commands for performing process management operations.
d) CO-d Apply scheduling algorithms to calculate turnaround time and average waiting
time.
e) CO-e Calculate efficiency of different memory management techniques.
f) CO-f Apply file management techniques.

3. Proposed Methodology-
 Collect Data
 Study about deadlock
 Generate report for deadlock
4. Action Plan-

Planned Start Planned Finish


Sr no. Details of activity
Date Date
1. Finalization of topic 21/8/2023 24/8/2023
2. Preparation of Abstract 1/9/23 4/9/2023
3. Collection of data 23/9/23 25/9/2023
4. Preparation of concept 7/10/2023 10/10/2023
5. Seminar / Presentation 15/10/2023 20/10/2023
6. Submission of Micro Project 6/11/2023 8/11/2023

5. Resources Required:

Sr.No Name of Resource/Material Specification Quantity Remarks


1. Computer i5,RAM 2GB
(Desktop/Laptop)
1
2. Microsoft office word 2010 1
3. Books
4. Websites
5. Softwares Notepad, Web
1
Browser

5
PART B-Plan

Title of micro-project: Deadlock

1. Brief Description:
A deadlock is a state in a multi-threaded or multi-process system in
which each member is waiting for a condition that will never be
satisfied. It is a situation where a set of processes or threads are
blocked because they are all trying to acquire resources that are
already held by other members of the set.

2. Aims/Benefits of Micro Project:

To generate report on deadlock that occeres in processes in operating


system.

3. Course Outcomes Achieved:


d) CO-a Install operating system and configure it.
e) CO-b Use operating system tools to perform various functions.
f) CO-c Execute process commands for performing process management operations.

4. Actual Methodology/Procedure Followed:


 Collect Data
 Study about deadlock
 Generate report for deadlock
5. Actual Resources Used:

Sr.No Name of Specification Quantity Remarks


Resource/Material
1. Computer i5,RAM 8GB 1
(Desktop/Laptop)
2. Microsoft office word 2010 1
3. Books
4. Websites
5. Softwares 1

6
6. Output of the Micro-Project:

Successfully generated report for deadlock in operating system.

Deadlocks are a complex topic in computer science and operating systems. A


deadlock occurs when two or more processes or threads are unable to
proceed because they are each waiting for the other to release a resource. In
this detailed explanation, we will cover various aspects of deadlock, including
its definition, necessary conditions, prevention and avoidance techniques,
detection, and recovery methods.

Definition of Deadlock:
A deadlock is a state in a multi-threaded or multi-process system in which
each member is waiting for a condition that will never be satisfied. It is a
situation where a set of processes or threads are blocked because they are all
trying to acquire resources that are already held by other members of the set.

Necessary Conditions for Deadlock:


For a deadlock to occur, four necessary conditions must be met. These
conditions are often referred to as the "Four Coffman Conditions" after
Edward G. Coffman Jr., who formulated them. The conditions are:

a. Mutual Exclusion: At least one resource must be held in a non-shareable


mode. Only one process or thread can use the resource at a time.

b. Hold and Wait: Processes must hold at least one resource and wait to
acquire additional resources.

c. No Preemption: Resources cannot be forcibly taken from a process. They


can only be released voluntarily.

d. Circular Wait: There must exist a circular chain of two or more processes,
each holding a resource needed by the next process in the chain.

If all these conditions are met simultaneously, a deadlock can occur.

Methods for Handling Deadlocks


There are several methods for dealing with deadlocks:

a. Prevention: Deadlock prevention involves designing the system in such a


way that at least one of the necessary conditions for deadlock is never
satisfied.

b. Avoidance: Deadlock avoidance uses resource allocation graphs or other


algorithms to dynamically decide whether a resource request should be
granted based on the potential for deadlock. This method is more flexible but
can be complex to implement.

c. Detection and Recovery: Deadlock detection periodically examines the


state of the system to determine whether a deadlock has occurred. If a

7
deadlock is detected, recovery actions are taken, such as terminating one or
more processes or rolling back their execution to a safe state.

d. Ignorance: Some systems choose to ignore the problem of deadlock and


rely on human intervention to resolve it when it occurs. This approach is often
seen in real-time systems where predictability is crucial.

4. Resource Allocation Graph:


In deadlock avoidance, the resource allocation graph is a commonly used tool.
It is a directed graph that represents the allocation of resources to processes
and shows the relationships between processes and resources. Nodes in the
graph represent processes and resources, and edges represent resource
requests and allocations. A cycle in this graph indicates a potential deadlock.

5. Deadlock Detection:
Deadlock detection algorithms periodically examine the state of the system to
identify deadlocks. Various techniques, such as wait-for graphs and resource
allocation graphs, can be employed to detect deadlock. Once detected, the
system can take corrective actions, such as terminating one or more
processes or rolling back their state.

5. Banker's Algorithm:
The Banker's algorithm is a well-known method for deadlock avoidance. It is
used to determine whether a resource request should be granted based on a
series of checks and calculations. The system's safety can be determined by
simulating the allocation of resources to various processes and checking if
the system can reach a safe state.

Steps of Banker’s Algorithm:

This algorithm calculates resources allocated, required and available before


allocating resources to any process to avoid deadlock. It contains two matrices on a
dynamic basis. Matrix A contains resources allocated to different processes at a
given time. Matrix B maintains the resources which are still required by different
processes at the same time.
Algorithm F: Free resources
Step 1: When a process requests for a resource, the OS allocates it on a trial basis.
Step 2: After trial allocation, the OS updates all the matrices and vectors. This
updating can be done by the OS in a separate work area in the memory.
Step 3: It compares F vector with each row of matrix B on a vector to vector basis.
Step 4: If F is smaller than each of the row in Matrix B i.e. even if all free resources
are allocated to any process in Matrix B and not a single process can complete its
task then OS concludes that the system is in unstable state.
Step 5: If F is greater than any row for a process in Matrix B the OS allocates all
required resources for that process on a trial basis. It assumes that after completion
of process, it will release all the recourses allocated to it. These resources can be
added to the free vector.
Step 6: After execution of a process, it removes the row indicating executed process
from both matrices.
Step 7: This algorithm will repeat the procedure step 3 for each process from the
matrices and finds that all processes can complete execution without entering

8
unsafe state. For each request for any resource by a process OS goes through all
these trials of imaginary allocation and updation. After this if the system remains in
the safe state, and then changes can be made in actual matrices.

7. Recovery from Deadlock:


Recovery from deadlock can involve several methods, including:

a. Process Termination: Terminate one or more processes involved in the


deadlock. This can free up resources and resolve the deadlock. However, care
must be taken to choose which processes to terminate to minimize the
impact on the overall system.

b. Process Rollback: Rollback the state of one or more processes to a


previously defined safe state. This is useful in situations where processes can
be restarted from a known checkpoint.

c. Wait-Die and Wound-Wait Schemes: These are two concurrency control


mechanisms that can be used to resolve deadlocks by either allowing older
transactions to wait (Wound-Wait) or allowing younger transactions to wait
(Wait-Die).

8. Example of Deadlock:
Consider a scenario where two processes, P1 and P2, each need two
resources to complete their execution. If P1 holds Resource A and requests
Resource B, while P2 holds Resource B and requests Resource A, they may
enter a deadlock state because they are both waiting for a resource held by
the other.

9. Impact of Deadlock:
Deadlocks can lead to a loss of system resources, reduced throughput, delays
in process execution, and a degradation of system performance. They are a
significant concern in real-time and safety-critical systems where timely
execution is essential.

In conclusion, understanding deadlocks and their management is crucial for


designing and operating reliable and efficient computer systems. Effective
deadlock prevention, avoidance, detection, and recovery mechanisms are
essential to ensure that systems can continue to operate even in the presence
of potentially conflicting resource demands from multiple processes or
threads.

9
7. Skill Developed:

 We learn to develop report for any project.


 As technology evolves, so do the methods and tools for dealing with
deadlocks. Developing the skill of continuous learning to stay up-to-date
with the latest practices in deadlock management is important.

 Gain knowledge about real-time systems and how to guarantee timely


resource allocation and prevent deadlocks.

10
8. Applications of Microproject:

 Financial Systems: In financial trading systems, deadlocks can affect


the execution of orders or trading strategies. Careful design and testing
of the trading algorithms are required to avoid financial losses due to
deadlocks.

 Game Development: In the context of video game development,


deadlocks can occur when multiple game entities or characters
compete for access to resources, such as shared game objects or AI
decision-making. Game developers employ strategies to prevent and
resolve such deadlocks to ensure smooth gameplay.

 Resource Allocation in Data Centers: In data centers and server farms,


where multiple servers run applications or virtual machines, ensuring
resource allocation without causing deadlocks is crucial for
maintaining high availability and performance.

11

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy