Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6797867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:39:42+00:00 2026-05-26T18:39:42+00:00

I am not sure how to properly detect deadlocks. My book provides this table

  • 0

I am not sure how to properly detect deadlocks. My book provides this table for five processes P0 to P4 and three resource types A, B, and C. Resource A has seven instances, resource type B has two instances, and resource type C has six instances. This is the resource-allocation state at time T0:

   Allocation    Request    Available
    A  B  C      A  B  C    A  B  C
P0  0  1  0      0  0  0    0  0  0
P1  2  0  0      2  0  2
P2  3  0  3      0  0  0
P3  2  1  1      1  0  0
P4  0  0  2      0  0  2

It goes on to state that the system is not in a deadlocked state, but does not provide much detail for the problem solving technique. Can anyone break it down for me so that I may follow along with the steps easily and attempt a similar problem?

Here is my attempt at understanding the problem:

P0 has 1 of resource B and requires no resources. P0 relinquishes its resources

    A  B  C      A  B  C    A  B  C
P0  0  0  0      0  0  0    0  1  0
P1  2  0  0      2  0  2
P2  3  0  3      0  0  0
P3  2  1  1      1  0  0
P4  0  0  2      0  0  2

P1 has 2 of resource A and requires 2 of resource A and C. There are not enough resources available. P2 has 3 of resource A and C and requires no resources. P2 relinquishes its resources.

    A  B  C      A  B  C    A  B  C
P0  0  0  0      0  0  0    3  1  3
P1  2  0  0      2  0  2
P2  0  0  0      0  0  0
P3  2  1  1      1  0  0
P4  0  0  2      0  0  2

Hope I’m on the right track thus far.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:39:42+00:00Added an answer on May 26, 2026 at 6:39 pm

    Deadlocks occur when you once process is in the state “have A, need B” and some other process is in “have B, need A”.

    if I’m reading your tables right, then this would indicate a deadlock:

       Allocation    Request    Available
        A  B  C      A  B  C    A  B  C
    P0  0  1  0      1  0  0    0  0  0
    P1  2  0  0      2  1  2
    

    P0 has resource B, and requires resource A, with no more resource A’s available
    P1 has 2 of resource A, and requires source B, with no more B’s available.

    The deadlock cannot be resolved until more of resources A or B become available. That’d mean P0 or P1 have to relinquish some of their allocations (or P2+ doing the same).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not sure if this question fits properly, but I'm wondering in tile-based games,
I'm not sure why the TSpeedButton has this property but when a TSpeedButton is
I'm not sure I understand the URI object completely to do this properly. I
I'm not exactly sure how to properly debug this but have tried a few
I'm not sure if anyone else has had trouble with this. I'm trying to
I'm not sure I understand it properly: does a 64 bit OS run/compile code
Not sure if this is possible or if I'm expressing correctly what I'm looking
Not sure how to ask a followup on SO, but this is in reference
I have several of these errors and I am not sure how to properly
I wasn't sure how to properly name this question, so if its better suited

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.