Preview

Deadlock and Deadlocks General Strategies

Good Essays
Open Document
Open Document
1034 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Deadlock and Deadlocks General Strategies
OPERATING SYSTEMS DEADLOCKS
Jerry Breecher

7: Deadlocks

1

OPERATING SYSTEM Deadlocks
What Is In This Chapter?
• What is a deadlock? • Staying Safe: Preventing and Avoiding Deadlocks • Living Dangerously: Let the deadlock happen, then detect it and recover from it.

7: Deadlocks

2

DEADLOCKS
EXAMPLES:
• • "It takes money to make money". You can't get a job without experience; you can't get experience without a job.

BACKGROUND:
The cause of deadlocks: Each process needing what another process has. This results from sharing resources such as memory, devices, links. Under normal operation, a resource allocations proceed like this:: 1. 2. 3. Request a resource (suspend until available if necessary ). Use the resource. Release the resource.
7: Deadlocks

3

DEADLOCKS

Bridge Crossing Example

• • • • •

Traffic only in one direction. Each section of a bridge can be viewed as a resource. If a deadlock occurs, it can be resolved if one car backs up (preempt resources and rollback). Several cars may have to be backed up if a deadlock occurs. Starvation is possible.

7: Deadlocks

4

DEADLOCKS

DEADLOCK CHARACTERISATION

NECESSARY CONDITIONS ALL of these four must happen simultaneously for a deadlock to occur: Mutual exclusion One or more than one resource must be held by a process in a non-sharable (exclusive) mode. Hold and Wait A process holds a resource while waiting for another resource. No Preemption There is only voluntary release of a resource - nobody else can make a process give up a resource. Circular Wait Process A waits for Process B waits for Process C .... waits for Process A.
7: Deadlocks 5

DEADLOCKS

RESOURCE ALLOCATION GRAPH

A visual ( mathematical ) way to determine if a deadlock has, or may occur. G = ( V, E ) The graph contains nodes and edges. V Nodes consist of processes = { P1, P2, P3, ...} and resource types { R1, R2, ...} Edges are ( Pi, Rj ) or ( Ri, Pj )

E

An arrow from the process

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Nt1310 Unit 1 Study Guide

    • 378 Words
    • 2 Pages

    Multiple threads can interfere with each other when sharing hardware resources such as caches or translation lookaside buffers (TLBs). As a result, execution times of a single thread are not improved but can be degraded, even when only one thread is executing, due to lower frequencies or additional pipeline stages that are necessary to accommodate thread-switching hardware.…

    • 378 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Nt1310 Unit 3 Os

    • 1341 Words
    • 6 Pages

    +• Synchronization: With multiple active processes having potential access to shared address spaces or shared I/O resources, care must be taken to provide effective synchronization. Synchronization is a facility that enforces mutual exclusion and event…

    • 1341 Words
    • 6 Pages
    Good Essays
  • Good Essays

    The big point in all of this is if we work we can learn we can succeed. Mike Rose’s article is great to show those getting a job for the first time what can happen if they work there are many places that hire new workers and the worker just sit around not really working. This is not good for must companies. This is a problem with just wishing for a dream.…

    • 531 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Filures Paper

    • 498 Words
    • 2 Pages

    There will be a discussion of four different failures within this paper. The failures are as follows: crash failures, timing failures, network failures, and byzantine failures.…

    • 498 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    EN110

    • 495 Words
    • 2 Pages

    My work experience alone will not prepare me for an advancement in my career or provide me…

    • 495 Words
    • 2 Pages
    Satisfactory Essays
  • Better Essays

    Will Dropouts Save America

    • 2197 Words
    • 9 Pages

    Ellsberg provides an array of reasons why students should drop out of college. He argues that our education system is hindering future entrepreneurs by not teaching them skill sets to be used in the real world. “Street-smart,” as is he says, cannot be taught in a classroom. Given the National Bureau of Economic Research’s findings that nearly all job creation in America come from startup businesses, Ellsberg feels skills like sales, networking, and creativity cannot be learned in the classroom. In addition, without a wide network of advisers, clients, vendors and talent, a start-up business will not get off the ground. You do not learn how to network “crouched over a desk studying for multiple-choice exam” as he puts it. Finally he states entrepreneurs must embrace failure; without knowing what is not going to work, one cannot succeed.…

    • 2197 Words
    • 9 Pages
    Better Essays
  • Good Essays

    "College is not a place to go to make money, it's where you learn how to make money."…

    • 754 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Money is the priority. However, all the money in the world can’t make you prosper, but it’s the experience you’ve been through that makes you prosperous.…

    • 791 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Returning to School

    • 570 Words
    • 3 Pages

    have sold myself short. If I get a college education, I will have something to help me get the job…

    • 570 Words
    • 3 Pages
    Good Essays
  • Good Essays

    On January 11th 2014, the president of the United States Barak Obama said that “ folks can make a lot more by learning a trade, than they might with an…

    • 661 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    I was questioning myself when I read about the four job options from Joanne B. Ciulla’s Work and Life. I chose the “a well-paying position in an accounting firm” with a little surprised (Ciulla, 83). I know I want to earn more money, but I do not expect that I put money in the first place when I choose a job. However, it is true and I cannot ignore it. Money is quite important when we live in this world. As Epicurus said, “Wherefore both when young and old a man must study philosophy, that as he grows old he may be young in blessings through the grateful recollection of what has been, and that fin youth he may be old as well, since he will know no fear of what is to come” (Epicurus, 84). How a youth can no fear of what is to come? I can think…

    • 258 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Secondly, working for something that someone finds fulfilling gives more chances to the person compared to a person who works for something that pays well. For example, if a person likes doing something, he will get excited about it, which will boost up his capabilities and skills, and help him succeed in getting a higher position, or get more things out from the job. But, if a person works for something just to get more money, he will dislike the things he is doing compared to the person before, and because he dislikes the work, his performances will drop, which will lead to a decline of the person, and eventually come to an end where the person does not even get the high amount of money he had hoped to get through the job.…

    • 428 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    People who decide their job without concerning the pays, they are pursing fulfilling rather than money. This theme applies in my personal story. I saw a documentary about a mastery craftsman. His work is making potteries. His payment was extremely low and he was really poor; however, he had continued his work. An interviewer asked him why he did such a hard-work. The craftsman answered:”I do this work, because I really want to do. I have been dreaming to become a person who makes potteries. And now I am doing it. Even though, I do not get a lot of money, I am proud of myself. The fulfilment comes from my spirit is really powerful and it conveys happiness every single moment in my life”. It was such an impressive reply; however, I cannot accept his opinion. Nowadays, without money, it is really hard to live. Food, house, cloth and respect towards people are decided by your property. Moreover, without money how can people help their parents and families? Thus, people pursue the job what they really want who decide their jobs depend on their fulfilment can be good for their mind, but it is not realistic and a self-fish decision.…

    • 613 Words
    • 3 Pages
    Good Essays
  • Good Essays

    In Steve Jobs’ Commencement speech at Stanford in 2005, he suggested finding what you love, and the money will come after. Luckily he found what he loved to do early and opened his extremely successful business. Although, there were a few bumps in the road along the way to his success, it was all worth it in the end and encourages young people to do the same. Jobs says, “You can’t connect the dots looking forward; you can only connect them looking backwards.” You have to trust that the dots will connect in the future, and this approach worked for him and made all the difference in his life.…

    • 557 Words
    • 3 Pages
    Good Essays

Related Topics