- Timestamp:
- Sep 13, 2022, 3:07:25 PM (22 months ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation
- Children:
- 3606fe4
- Parents:
- 1c334d1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/thierry_delisle_PhD/thesis/text/practice.tex
r1c334d1 rfc96890 55 55 A simpler approach is to use a \newterm{Readers-Writer Lock}~\cite{wiki:rwlock}, where the resizing requires acquiring the lock as a writer while simply enqueueing/dequeuing \ats requires acquiring the lock as a reader. 56 56 Using a Readers-Writer lock solves the problem of dynamically resizing and leaves the challenge of finding or building a lock with sufficient good read-side performance. 57 Since this approach is not a very complex challenge and an ad -hoc solution is perfectly acceptable, building a Readers-Writer lock was the path taken.57 Since this approach is not a very complex challenge and an ad hoc solution is perfectly acceptable, building a Readers-Writer lock was the path taken. 58 58 59 59 To maximize reader scalability, readers should not contend with each other when attempting to acquire and release a critical section. … … 61 61 The read-acquire possibly waits for a writer to finish the critical section and then acquires a reader's local spinlock. 62 62 The writer acquires the global lock, guaranteeing mutual exclusion among writers, and then acquires each of the local reader locks. 63 Acquiring all the local read 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 64 Figure~\ref{f:SpecializedReadersWriterLock} shows the outline for this specialized readers-writer lock. 65 65 The lock in nonblocking, so both readers and writers spin while the lock is held. … … 113 113 Therefore, 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 114 115 An interesting sub -part of this heuristic is what to do with bursts of \ats that become ready.115 An interesting subpart of this heuristic is what to do with bursts of \ats that become ready. 116 116 Since waking up a sleeping \proc can have notable latency, multiple \ats may become ready while a single \proc is waking up. 117 117 This fact begs the question, if many \procs are available, how many should be woken? 118 118 If the ready \ats will run longer than the wake-up latency, waking one \proc per \at will offer maximum parallelization. 119 If the ready \ats will run for a shortvery short time, waking many \procs may be wasteful.119 If the ready \ats will run for a very short time, waking many \procs may be wasteful. 120 120 As mentioned, a heuristic to handle these complex cases is outside the scope of this thesis, the behaviour of the scheduler in this particular case is left unspecified. 121 121 … … 173 173 174 174 This approach also simplifies notification. 175 Indeed, \procs not only need to be notified when a new \at is readied, but also mustbe notified during manual resizing, so the \gls{kthrd} can be joined.175 Indeed, \procs not only need to be notified when a new \at is readied, but must also be notified during manual resizing, so the \gls{kthrd} can be joined. 176 176 These requirements mean whichever entity removes idle \procs from the sleeper list must be able to do so in any order. 177 177 Using a simple lock over this data structure makes the removal much simpler than using a lock-free data structure.
Note: See TracChangeset
for help on using the changeset viewer.