wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock in operating system

profile
Dhruv Koladiya
Aug 11, 2024
0 Likes
0 Discussions
88 Reads

A deadlock in an operating system is a situation where a set of processes become stuck because each process is waiting for a resource that another process holds. Since no process can proceed until the resource it needs becomes available, and the resources are all tied up, the system effectively "locks up.

Conditions for Deadlock

For a deadlock to occur, four conditions must hold simultaneously:

Mutual Exclusion: At least one resource must be held in a non-shareable mode; only one process can use the resource at a time.

Hold and Wait: A process holding at least one resource is waiting to acquire additional resources that are currently being held by other processes.

No Preemption: Resources cannot be forcibly removed from the processes holding them until the process voluntarily releases the resource.

Circular Wait: There must be a circular chain of processes where each process holds at least one resource and is waiting for a resource held by the next process in the chain.

Example of Deadlock

Imagine two processes, P1 and P2, and two resources, R1 and R2

P1 holds R1 and is waiting to acquire R2.

P2 holds R2 and is waiting to acquire R1.


Comments ()


Sign in

Read Next

Diwali

Blog banner

Why Users Leave Your Website in 5 Seconds (And How UI/UX Fixes It)

Blog banner

A Complete Guide to Satvik Indian Powder Masalas and Their Everyday Uses

Blog banner

Operating system

Blog banner

Deadlock and starvation

Blog banner

Animal’s have my heart

Blog banner

How Unstructured Play Helps Children Become Creative Thinkers

Blog banner

MOBILE DEVICE FORENSIC

Blog banner

Penetration Testing

Blog banner

How Puppet Shows and Role Play Teach Empathy to Preschoolers

Blog banner

10 Reasons to Date a South Indian Girl

Blog banner

On-Page SEO

Blog banner

Life

Blog banner

Method of Evaluating Information Security Level in an Organization

Blog banner

Google App Engine

Blog banner

Artical on FreshBooks

Blog banner

CYBERBULLYING: Negative comments!

Blog banner

How College Events Build Real-world Skills You Can’t Learn From Textbooks

Blog banner

computer security

Blog banner

"Mahakali cave"

Blog banner

Photography

Blog banner

The Future of Cybersecurity: Trends, Challenges, and Strategies

Blog banner

The Five Steps of Data Science

Blog banner

Lifestyle of a photographer

Blog banner

Hash password! Is it really secured?

Blog banner

Malware Defense

Blog banner

A MODERN OPERATING SYSTEM

Blog banner

Types of Big Data

Blog banner

Cyber Crime Investigation In The Era Of Big Data

Blog banner

Krishna Rao SAP ID--53003230076

Blog banner

Business Engineering

Blog banner

CYBER FORENCIS: PAST, PRESENT AND FUTURE.

Blog banner

How to Encrypt and Decrypt Using GNU PGP

Blog banner

Why do you need a personalised bag tag for your kids' school bags?

Blog banner

Virtual memory in os

Blog banner

"Audit" In Data Science

Blog banner

Race Condition in Operating Theatre

Blog banner

Raising mental health burden: A global and Indian perspective

Blog banner

Data Visualization

Blog banner

Man In The Middle Attack

Blog banner

Delhi city

Blog banner

Deadlock

Blog banner