- Timestamp:
- Aug 5, 2022, 4:18:02 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation
- Children:
- 62c5a55
- Parents:
- 511a9368
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/thierry_delisle_PhD/thesis/text/practice.tex
r511a9368 r8040286 60 60 To achieve this goal requires each reader to have its own memory to mark as locked and unlocked. 61 61 The read acquire possibly waits for a writer to finish the critical section and then acquires a reader's local spinlock. 62 The write acquire acquires the global lock, guaranteeing mutual exclusion among writers, and then acquires each of the local reader locks.62 The write acquires the global lock, guaranteeing mutual exclusion among writers, and then acquires each of the local reader locks. 63 63 Acquiring all the local read locks guarantees mutual exclusion among the readers and the writer, while the wait on the read side prevents readers from continuously starving the writer. 64 65 64 Figure~\ref{f:SpecializedReadersWriterLock} shows the outline for this specialized readers-writer lock. 66 65 The lock in nonblocking, so both readers and writers spin while the lock is held. 67 \todo{finish explanation} 66 This very wide sharding strategy means that readers have very good locality, since they only ever need to access two memory location. 68 67 69 68 \begin{figure} … … 138 137 139 138 \subsection{Event FDs} 140 Another interesting approach is to use an event file descriptor\cit {eventfd}.139 Another interesting approach is to use an event file descriptor\cite{eventfd}. 141 140 This Linux feature is a file descriptor that behaves like \io, \ie, uses @read@ and @write@, but also behaves like a semaphore. 142 141 Indeed, all reads and writes must use a word-sized values, \ie 64 or 32 bits. … … 218 217 \end{figure} 219 218 220 The next optimization is to avoid the latency of the event @fd@, which can be done by adding what is effectively a binary benaphore\cit {benaphore} in front of the event @fd@.219 The next optimization is to avoid the latency of the event @fd@, which can be done by adding what is effectively a binary benaphore\cite{schillings1996engineering} in front of the event @fd@. 221 220 The benaphore over the event @fd@ logically provides a three state flag to avoid unnecessary system calls, where the states are expressed explicit in Figure~\ref{fig:idle:state}. 222 221 A \proc begins its idle sleep by adding itself to the idle list before searching for an \at.
Note: See TracChangeset
for help on using the changeset viewer.