Ignore:
Timestamp:
Aug 16, 2022, 4:04:47 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master, pthread-emulation
Children:
aec2c022
Parents:
741e22c (diff), 17c6edeb (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/thierry_delisle_PhD/thesis/text/practice.tex

    r741e22c r71cf630  
    6060To achieve this goal requires each reader to have its own memory to mark as locked and unlocked.
    6161The 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.
     62The write acquires the global lock, guaranteeing mutual exclusion among writers, and then acquires each of the local reader locks.
    6363Acquiring 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 
    6564Figure~\ref{f:SpecializedReadersWriterLock} shows the outline for this specialized readers-writer lock.
    6665The lock in nonblocking, so both readers and writers spin while the lock is held.
    67 \todo{finish explanation}
     66This very wide sharding strategy means that readers have very good locality, since they only ever need to access two memory location.
    6867
    6968\begin{figure}
     
    113112However, this third challenge is outside the scope of this thesis because developing a general heuristic is complex enough to justify its own work.
    114113Therefore, the \CFA scheduler simply follows the ``Race-to-Idle''~\cite{Albers12} approach where a sleeping \proc is woken any time a \at becomes ready and \procs go to idle sleep anytime they run out of work.
     114
    115115An interesting sub-part of this heuristic is what to do with bursts of \ats that become ready.
    116116Since waking up a sleeping \proc can have notable latency, it is possible multiple \ats become ready while a single \proc is waking up.
     
    137137
    138138\subsection{Event FDs}
    139 Another interesting approach is to use an event file descriptor\cit{eventfd}.
     139Another interesting approach is to use an event file descriptor\cite{eventfd}.
    140140This Linux feature is a file descriptor that behaves like \io, \ie, uses @read@ and @write@, but also behaves like a semaphore.
    141141Indeed, all reads and writes must use a word-sized values, \ie 64 or 32 bits.
     
    217217\end{figure}
    218218
    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\cit{benaphore} in front of the event @fd@.
     219The 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@.
    220220The 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}.
    221221A \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.