Home > Back-end >  CLH interpretation of the illustrations
CLH interpretation of the illustrations

Time:10-12

See a article about CLH, the original I think speaks very good overall, just some little details some flaws, easily confused, in order to facilitate reading here is copy of the original and make adjustments, hope the author don't mind

No special situations we face are basically the SMP system architecture, here only analysis of the most basic is to FIFO queue of lock, the priority queue locked and for NUMA systems do not parse,

Request: the lock Request, including the Process object, and a state of the state (Granted said lock can be authorized to his monitoring Process, Pending says his monitoring Process should be hung waiting)
Lock: Lock object, contains a pointer to tail, initialization time pointing to the request of a state=G
Process: need to request a lock Process, consists of two request Pointers for myreq and watch, myreq pointing in the direction of the current Process corresponding lock requests, when the Process for acquiring a lock or acquiring a lock but did not release, myreq. State=P; When a process to release the lock, myreq. State=G, watch points to the process of precursor myreq request, monitor the change of state,

Structure diagram as shown in figure 3 (a) :
Original:

Figure 3 CLH queue lock structure??????
  • Related