Tous les livres

Professionnel

Applis À propos Coach Connexion Commencer la lecture

Computer Science · Glossaire

Qu'est-ce que « Resource-allocation graph, lock ordering » ?

Aussi appelé : resource-allocation graph · lock ordering

Definition 13.3 University Computer Science — Year 3 · Chapitre 13 — Concurrency: Deadlock, Monitors and Lock-Free Structures

A resource-allocation graph has a node for each thread and each resource, an edge P→RP \to R when thread PP waits for resource RR, and an edge R→PR \to P when RR is held by PP. Lock ordering fixes a total order on the locks and requires every thread to acquire the locks it holds together in increasing order.

A resource-allocation graph with one instance of each resource. The cycle P1, R2, P2, R3, P3, R1 is a deadlock; P4 is not in it, but waits behind it for ever. The chapter’s rag_cycle.py finds the cycle by depth-first search; with P3’s request withdrawn, it finds none.
A resource-allocation graph with one instance of each resource. The cycle P1, R2, P2, R3, P3, R1 is a deadlock; P4 is not in it, but waits behind it for ever. The chapter’s rag_cycle.py finds the cycle by depth-first search; with P3’s request withdrawn, it finds none.
The whole state graph for two philosophers, the 6 states of . T thinks, H holds the left fork, E eats; an edge is labelled with the philosopher who moves. Every state can reach the deadlock.
The whole state graph for two philosophers, the 6 states of Output 13.1. T thinks, H holds the left fork, E eats; an edge is labelled with the philosopher who moves. Every state can reach the deadlock.
Lire dans le chapitre →