Changeset 6726a3a for doc/theses/thierry_delisle_PhD/thesis
- Timestamp:
- Jul 20, 2022, 2:37:57 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- 6bf35d1, e6662f5
- Parents:
- d677355 (diff), 2fd0de0 (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. - Location:
- doc/theses/thierry_delisle_PhD/thesis/text
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/thierry_delisle_PhD/thesis/text/existing.tex
rd677355 r6726a3a 14 14 15 15 \section{Naming Convention} 16 Scheduling has been studied by various communities concentrating on different incarnation of the same problems. As a result, there are no standard naming conventions for scheduling that is respected across these communities. This document uses the term \newterm{\Gls{at}} to refer to the abstract objects being scheduled and the term \newterm{\Gls{proc}} to refer to the concrete objects executing these \ats. 16 Scheduling has been studied by various communities concentrating on different incarnation of the same problems. 17 As a result, there are no standard naming conventions for scheduling that is respected across these communities. 18 This document uses the term \newterm{\Gls{at}} to refer to the abstract objects being scheduled and the term \newterm{\Gls{proc}} to refer to the concrete objects executing these \ats. 17 19 18 20 \section{Static Scheduling} … … 26 28 \section{Dynamic Scheduling} 27 29 \newterm{Dynamic schedulers} determine \ats dependencies and costs during scheduling, if at all. 28 Hence, unlike static scheduling, \ats dependencies are conditional and detected at runtime. This detection takes the form of observing new \ats(s) in the system and determining dependencies from their behaviour, including suspending or halting a \ats that dynamically detects unfulfilled dependencies. 30 Hence, unlike static scheduling, \ats dependencies are conditional and detected at runtime. 31 This detection takes the form of observing new \ats(s) in the system and determining dependencies from their behaviour, including suspending or halting a \ats that dynamically detects unfulfilled dependencies. 29 32 Furthermore, each \ats has the responsibility of adding dependent \ats back into the system once dependencies are fulfilled. 30 33 As a consequence, the scheduler often has an incomplete view of the system, seeing only \ats with no pending dependencies. -
doc/theses/thierry_delisle_PhD/thesis/text/io.tex
rd677355 r6726a3a 1 1 \chapter{User Level \io} 2 As mentioned in Section~\ref{prev:io}, user- Level \io requires multiplexing the \io operations of many \glspl{thrd} onto fewer \glspl{proc} using asynchronous \io operations.2 As mentioned in Section~\ref{prev:io}, user-level \io requires multiplexing the \io operations of many \glspl{thrd} onto fewer \glspl{proc} using asynchronous \io operations. 3 3 Different operating systems offer various forms of asynchronous operations and, as mentioned in Chapter~\ref{intro}, this work is exclusively focused on the Linux operating-system. 4 4 … … 72 72 73 73 \paragraph{\lstinline{poll}} is the next oldest option, and takes as input an array of structures containing the FD numbers rather than their position in an array of bits, allowing a more compact input for interest sets that contain widely spaced FDs. 74 (For small interest sets with densely packed FDs, the @select@ bit mask can take less storage, and hence, copy less information into the kernel.) 74 For small interest sets with densely packed FDs, the @select@ bit mask can take less storage, and hence, copy less information into the kernel. 75 75 Furthermore, @poll@ is non-destructive, so the array of structures does not have to be re-initialize on every call. 76 76 Like @select@, @poll@ suffers from the limitation that the interest set cannot be changed by other \gls{kthrd}, while a manager thread is blocked in @poll@. … … 277 277 While this example is artificial, in the presence of many \glspl{thrd}, it is possible for this problem to arise ``in the wild''. 278 278 Furthermore, this pattern is difficult to reliably detect and avoid. 279 Once in this situation, the only escape is to interrupted the spinning \gls{thrd}, either directly or via some regular preemption (\eg time slicing).279 Once in this situation, the only escape is to interrupted the spinning \gls{thrd}, either directly or via some regular preemption, \eg time slicing. 280 280 Having to interrupt \glspl{thrd} for this purpose is costly, the latency can be large between interrupts, and the situation may be hard to detect. 281 % However, a more important reason why interrupting the \gls{thrd} is not a satisfying solution is that the \gls{proc} is using the instance it is tied to.282 % If it were to use it, then helping could be done as part of the usage.283 281 Interrupts are needed here entirely because the \gls{proc} is tied to an instance it is not using. 284 282 Therefore, a more satisfying solution is for the \gls{thrd} submitting the operation to notice that the instance is unused and simply go ahead and use it. … … 301 299 Free SQEs, \ie, SQEs that are not currently being used to represent a request, can be written to safely and have a field called @user_data@ that the kernel only reads to copy to @cqe@s. 302 300 Allocation also requires no ordering guarantee as all free SQEs are interchangeable. 303 % This requires a simple concurrent bag.304 301 The only added complexity is that the number of SQEs is fixed, which means allocation can fail. 305 302 … … 310 307 311 308 Once an SQE is filled in, it is added to the submission ring buffer, an operation that is not thread-safe, and then the kernel must be notified using the @io_uring_enter@ system call. 312 The submission ring buffer is the same size as the pre-allocated SQE buffer, therefore pushing to the ring buffer cannot fail because it is invalid to have the same \lstinline{sqe} multiple times in a ring buffer.309 The submission ring buffer is the same size as the pre-allocated SQE buffer, therefore pushing to the ring buffer cannot fail because it would mean a \lstinline{sqe} multiple times in the ring buffer, which is undefined behaviour. 313 310 However, as mentioned, the system call itself can fail with the expectation that it can be retried once some submitted operations complete. 314 311 … … 346 343 While instance borrowing looks similar to work sharing and stealing, I think it is different enough to warrant a different verb to avoid confusion.} 347 344 348 In this approach, each cluster (see Figure~\ref{fig:system})owns a pool of @io_uring@ instances managed by an \newterm{arbiter}.345 In this approach, each cluster, see Figure~\ref{fig:system}, owns a pool of @io_uring@ instances managed by an \newterm{arbiter}. 349 346 When a \gls{thrd} attempts to issue an \io operation, it ask for an instance from the arbiter and issues requests to that instance. 350 347 This instance is now bound to the \gls{proc} the \gls{thrd} is running on. 351 348 This binding is kept until the arbiter decides to revoke it, taking back the instance and reverting the \gls{proc} to its initial state with respect to \io. 352 349 This tight coupling means that synchronization can be minimal since only one \gls{proc} can use the instance at a time, akin to the private instances approach. 353 However, it differs in that revocation by the arbiter (an interrupt)means this approach does not suffer from the deadlock scenario described above.350 However, it differs in that revocation by the arbiter means this approach does not suffer from the deadlock scenario described above. 354 351 355 352 Arbitration is needed in the following cases: … … 377 374 378 375 \paragraph{External Submissions} are handled by the arbiter by revoking the appropriate instance and adding the submission to the submission ring. 379 However, 376 However, there is no need to immediately revoke the instance. 380 377 External submissions must simply be added to the ring before the next system call, \ie, when the submission ring is flushed. 381 378 This means whoever is responsible for the system call, first checks if the instance has any external submissions. … … 453 450 454 451 \section{Interface} 455 456 452 The last important part of the \io subsystem is its interface. 457 453 There are multiple approaches that can be offered to programmers, each with advantages and disadvantages.
Note: See TracChangeset
for help on using the changeset viewer.