Rev 140 | Rev 159 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 140 | Rev 142 | ||
|---|---|---|---|
| Line 7... | Line 7... | ||
| 7 | <para>One of the key aims of the operating system is to create and support |
7 | <para>One of the key aims of the operating system is to create and support |
| 8 | the impression that several activities are executing contemporarily. This is |
8 | the impression that several activities are executing contemporarily. This is |
| 9 | true for both uniprocessor as well as multiprocessor systems. In the case of |
9 | true for both uniprocessor as well as multiprocessor systems. In the case of |
| 10 | multiprocessor systems, the activities are trully happening in parallel. The |
10 | multiprocessor systems, the activities are trully happening in parallel. The |
| 11 | scheduler helps to materialize this impression by planning threads on as |
11 | scheduler helps to materialize this impression by planning threads on as |
| 12 | many processors as possible and, where this means reaching its limits, by |
12 | many processors as possible and, when this strategy reaches its limits, by |
| 13 | quickly switching among threads executing on a single processor.</para> |
13 | quickly switching among threads executing on a single processor.</para> |
| 14 | 14 | ||
| 15 | <section> |
15 | <section> |
| 16 | <title>Contexts</title> |
16 | <title>Contexts</title> |
| 17 | 17 | ||
| Line 106... | Line 106... | ||
| 106 | </section> |
106 | </section> |
| 107 | 107 | ||
| 108 | <section> |
108 | <section> |
| 109 | <title>Threads</title> |
109 | <title>Threads</title> |
| 110 | 110 | ||
| 111 | <para>A thread is the basic executable entity with a code and a stack. |
111 | <para>A thread is the basic executable entity with some code and a stack. |
| 112 | While the code, implemented by a C language function, can be shared by |
112 | While the code, implemented by a C language function, can be shared by |
| 113 | several threads, the stack is always private to each instance of the |
113 | several threads, the stack is always private to each instance of the |
| 114 | thread. Each thread belongs to exactly one task through which it shares |
114 | thread. Each thread belongs to exactly one task through which it shares |
| 115 | address space with its sibling threads. Threads that execute purely in the |
115 | address space with its sibling threads. Threads that execute purely in the |
| 116 | kernel don't have any userspace memory allocated. However, when a thread |
116 | kernel don't have any userspace memory allocated. However, when a thread |