source: doc/theses/lynn_tran_SE499/Chapters/uCPP.tex @ 585d910

Last change on this file since 585d910 was 1b34b87, checked in by Peter A. Buhr <pabuhr@…>, 6 years ago

Lynn's GDB essay

  • Property mode set to 100644
File size: 2.4 KB
1\chapter{\uC} \label{uC}
4\uC \cite{Reference10} extends the \CC programming language with new
5mechanisms to
6facilitate control flow, and adds new objects to enable lightweight concurrency
7on uniprocessor and parallel execution on multiprocessor computers. Concurrency has tasks
8that can context switch, which is a control transfer from one execution state to
9another that is different from a function call. Tasks are selected to run on a
10processor from a ready queue of available tasks, and tasks may need to wait for an occurrence of an event.
13A \textcolor{ForestGreen}{task} behaves like a class object, but it maintains its own
14thread and execution state, which is the state information required to allow
15independent execution. A task provides mutual exclusion by default for calls to its
16public members. Public members allow communication among tasks.
18\section{\uC Runtime Structure}
19\uC introduces two new runtime entities for controlling concurrent execution:
21    \item Cluster
22    \item Virtual processor
26A cluster is a group of tasks and virtual processors (discussed next) that
27execute tasks. The objective of a cluster is to control the amount of possible
28parallelism among tasks, which is only feasible if there are multiple
29hardware processors (cores).
31At the start of a \uC program, two clusters are created. One is the system
32cluster and the other is the user cluster. The system cluster has a processor
33that only performs management work such as error detection and correction from
34user clusters, if an execution in a user cluster results in errors, and cleans
35up at shutdown. The user cluster manages and executes user tasks on its
36processors. The benefits of clusters are maximizing utilization of processors
37and minimizing runtime through a scheduler that is appropriate for a particular
38workload. Tasks and virtual processors may be migrated among clusters.
40\subsection{Virtual Processor}
41A virtual processor is a software emulation of a processor that executes
42threads. Kernel threads are used to implement a virtual processor, which are
43scheduled for execution on a hardware processor by the underlying operating
44system. The operating system distributes kernel threads across a number of
45processors assuming that the program runs on a multiprocessor architecture. The
46usage of kernel threads enables parallel execution in \uC.
Note: See TracBrowser for help on using the repository browser.