Changeset c1b6bc6
- Timestamp:
- Jul 21, 2023, 11:58:18 AM (16 months ago)
- Branches:
- master
- Children:
- 374cdb66
- Parents:
- 1ae3f185
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/colby_parsons_MMAth/text/conclusion.tex
r1ae3f185 rc1b6bc6 4 4 % ====================================================================== 5 5 % ====================================================================== 6 This thesis presented a suite of safe and efficient concurrency tools that provide users with the means to write scalable programs in \CFA through many avenues. 6 7 This thesis presented a suite of safe and efficient concurrency tools that provide users with the means to write scalable programs in \CFA through multiple avenues. 7 8 If users prefer the message passing paradigm of concurrency, \CFA now provides message passing tools in the form of a performant actor system and channels. 8 For shared memory concurrency the mutex statement provides a safe and easy-to-use interface for mutual exclusion. 9 The waituntil statement provided by this works aids in writing concurrent programs in both the message passing and shared memory paradigms of concurrency. 10 Furthermore, no other language provides a synchronous multiplexing tool polymorphic over resources like \CFA's waituntil. 11 From the novel copy queue data structure in the actor system, to the plethora of user-supporting safety features, all these utilities build upon existing tools with value added. 9 For shared memory concurrency, the mutex statement provides a safe and easy-to-use interface for mutual exclusion. 10 The @waituntil@ statement aids in writing concurrent programs in both the message passing and shared memory paradigms of concurrency. 11 Furthermore, no other language provides a synchronous multiplexing tool polymorphic over resources like \CFA's @waituntil@. 12 From the novel copy-queue data structure in the actor system and the plethora of user-supporting safety features, all these utilities build upon existing tools with value added. 13 Performance results verify that each new feature is comparable or better than similar features in other programming languages. 14 15 \PAB{This part seems a little short.} 12 16 13 17 \section{Future Work} 18 14 19 \subsection{Further Implicit Concurrency} 15 This thesis scratches the surface of implicit concurrency by providing an actor system. 20 21 This thesis only scratches the surface of implicit concurrency by providing an actor system. 16 22 There is room for more implicit concurrency tools in \CFA. 17 User-defined implicit concurrency in the form of annotated loops or recursive functions exists in many other languages and libraries~\cite{uC++,OpenMP}. Similar implicit concurrency mechanisms could be implemented and expanded on in \CFA. 18 Additionally, the problem of automatic parallelism of sequential programs via the compiler is an interesting research space that other languages have approached~\cite{wilson94,haskell:parallel} that could also be explored in \CFA. 23 User-defined implicit concurrency in the form of annotated loops or recursive concurrent functions exists in many other languages and libraries~\cite{uC++,OpenMP}. 24 Similar implicit concurrency mechanisms could be implemented and expanded on in \CFA. 25 Additionally, the problem of automatic parallelism of sequential programs via the compiler is an interesting research space that other languages have approached~\cite{wilson94,haskell:parallel} and could be explored in \CFA. 19 26 20 27 \subsection{Advanced Actor Stealing Heuristics} 21 In this thesis, two basic victim selection heuristics were chosen when implementing the work stealing actor system. Good victim selection is an active area of work stealing research, especially when taking into account NUMA effects and cache locality~\cite{barghi18,wolke17}. The actor system in \CFA is modular and exploration of other victim selection heuristics for queue stealing in \CFA could constitute future work. The other question that arises with work stealing is: When should a worker thread steal? Work stealing systems can often be too aggressive when stealing, causing the cost of the steal to be higher than what is saved by sharing the work. In the presented actor system, a worker thread steals work after it checks all its work queues for work twice and sees them all empty. Given that thief threads often have cycles to spare, there is room for a more nuanced approach to choosing when to steal. 28 29 In this thesis, two basic victim-selection heuristics are chosen when implementing the work stealing actor system. 30 Good victim selection is an active area of work stealing research, especially when taking into account NUMA effects and cache locality~\cite{barghi18,wolke17}. 31 The actor system in \CFA is modular and exploration of other victim-selection heuristics for queue stealing in \CFA could be provided by pluggable modules. 32 Another question in work stealing is: when should a worker thread steal? 33 Work stealing systems can often be too aggressive when stealing, causing the cost of the steal to be have a negative rather positive effect on performance. 34 Given that thief threads often have cycles to spare, there is room for a more nuanced approaches when stealing. 35 Finally, there is the very difficult problem of blocking and unblocking idle threads for workloads with extreme oscillations in CPU needs. 22 36 23 37 \subsection{Synchronously Multiplexing System Calls} 24 There are many tools that try to sychronously wait for or asynchronously check I/O, since improvements in this area pay dividends in many areas of computer science~\cite{linux:select,linux:poll,linux:epoll,linux:iouring}. 38 39 There are many tools that try to synchronously wait for or asynchronously check I/O, since improvements in this area pay dividends in many areas of computer science~\cite{linux:select,linux:poll,linux:epoll,linux:iouring}. 25 40 Research on improving user-space tools to synchronize over I/O and other system calls is an interesting area to explore in the world of concurrent tooling. 41 Specifically, incorporating I/O into the @waituntil@ to allow a network server to work with multiple kinds of asynchronous I/O interconnects without using tradition event loops. 26 42 27 43 \subsection{Better Atomic Operations} 28 When writing low level concurrent programs, expecially lock/wait-free programs, low level atomic instructions need to be used. 44 45 When writing low-level concurrent programs, especially lock/wait-free programs, low-level atomic instructions need to be used. 29 46 In C, the gcc-builtin atomics~\cite{gcc:atomics} are commonly used, but leave much to be desired. 30 47 Some of the problems include the following. 31 48 Archaic and opaque macros often have to be used to ensure that atomic assembly is generated instead of locks. 32 49 The builtins are polymorphic, but not type safe since they use void pointers. 33 The semantics and safety of these builtins require careful navigation since they require the user to have a nuanced understanding of concurrent memory ordering models to pass via flags.50 The semantics and safety of these builtins require careful navigation since they require the user to have a deep understanding of concurrent memory-ordering models. 34 51 Furthermore, these atomics also often require a user to understand how to fence appropriately to ensure correctness. 35 52 All these problems and more could benefit from language support in \CFA. 36 Adding good language support for atomics is a difficult and nuanced problem, which if solved wellwould allow for easier and safer writing of low-level concurrent code.53 Adding good language support for atomics is a difficult problem, which if solved well, would allow for easier and safer writing of low-level concurrent code. 37 54
Note: See TracChangeset
for help on using the changeset viewer.