Changeset bfd5512 for doc/theses/thierry_delisle_PhD/thesis
- Timestamp:
- Apr 14, 2022, 4:37:28 PM (3 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- 3e36b1d8
- Parents:
- 365c8dcb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/thierry_delisle_PhD/thesis/text/practice.tex
r365c8dcb rbfd5512 95 95 96 96 \section{Idle-Sleep} 97 In addition to users manually changing the number of \procs, it is desireable to support ``removing'' \procs when there is not enough \ats for all the \procs to be useful. 98 While manual resizing is expected to be rare, the number of \ats is expected to vary much more which means \procs may need to be ``removed'' for only short periods of time. 99 Furthermore, race conditions that spuriously lead to the impression no \ats are ready are actually common in practice. 100 Therefore \procs should not be actually \emph{removed} but simply put into an idle state where the \gls{kthrd} is blocked until more \ats become ready. 101 This state is referred to as \newterm{Idle-Sleep}. 97 102 98 \subsection{Tracking Sleepers} 103 Idle sleep effectively encompasses several challenges. 104 First some data structure needs to keep track of all \procs that are in idle sleep. 105 Because of idle sleep can be spurious, this data structure has strict performance requirements in addition to the strict correctness requirements. 106 Next, some tool must be used to block kernel threads \glspl{kthrd}, \eg \texttt{pthread\_cond\_wait}, pthread semaphores. 107 The complexity here is to support \at parking and unparking, timers, \io operations and all other \CFA features with minimal complexity. 108 Finally, idle sleep also includes a heuristic to determine the appropriate number of \procs to be in idle sleep an any given time. 109 This third challenge is however outside the scope of this thesis because developping a general heuristic is involved enough to justify its own work. 110 The \CFA scheduler simply follows the ``Race-to-Idle'\cit{https://doi.org/10.1137/1.9781611973099.100}' approach where a sleeping \proc is woken any time an \at becomes ready and \procs go to idle sleep anytime they run out of work. 111 112 113 \section{Tracking Sleepers} 114 Tracking which \procs are in idle sleep requires a data structure holding all the sleeping \procs, but more importantly it requires a concurrent \emph{handshake} so that no \at is stranded on a ready-queue with no active \proc. 115 The classic challenge is when a \at is made ready while a \proc is going to sleep, there is a race where the new \at may not see the sleeping \proc and the sleeping \proc may not see the ready \at. 116 117 Furthermore, the ``Race-to-Idle'' approach means that there is some 118 119 \section{Sleeping} 99 120 100 121 \subsection{Event FDs} … … 104 125 \subsection{\texttt{io\_uring}} 105 126 106 \s ubsection{Reducing Latency}127 \section{Reducing Latency}
Note: See TracChangeset
for help on using the changeset viewer.