Tous les livres

Professionnel

Applis À propos Coach Connexion Commencer la lecture

Computer Science · Glossaire

Qu'est-ce que « Wait-for graph, wound–wait, wait–die » ?

Aussi appelé : wait-for graph · wait--die · wound--wait

Definition 23.5 University Computer Science — Year 3 · Chapitre 23 — Concurrency Control and Recovery

The wait-for graph has one node per active transaction and an edge Ti→TjT_i \to T_j when TiT_i waits for a lock that TjT_j holds; with one lock per request, the transactions are in deadlock exactly when the graph has a cycle. Two schemes prevent the cycles instead, by giving each transaction a timestamp at its start, the smaller the older, kept when it restarts. Under wait–die an older transaction asking for a lock held by a younger one waits, and a younger one asking for a lock an older one holds aborts (dies). Under wound–wait an older transaction asking for a lock held by a younger one aborts the younger (wounds it), and a younger one asking waits.

Lire dans le chapitre →