summaryrefslogtreecommitdiff
path: root/microkernel/mach/thread.mdwn
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@schwinge.name>2010-12-13 20:22:52 +0100
committerThomas Schwinge <thomas@schwinge.name>2010-12-13 20:22:52 +0100
commit4eea3efc13acccfb613571f604f17e0ec68e5bed (patch)
tree9c72a7790d6eb1602614971853131e3cc3f68174 /microkernel/mach/thread.mdwn
parentcfccdc1bdbee7fb25ef0aa9639a3ffec926bf690 (diff)
``Some'' Mach documentation.
Parts have been rescued from 4b382d8daa5a9e2d54e78c18beeff76bc54dc16b:Mach/MachConcepts.mdwn.
Diffstat (limited to 'microkernel/mach/thread.mdwn')
-rw-r--r--microkernel/mach/thread.mdwn37
1 files changed, 37 insertions, 0 deletions
diff --git a/microkernel/mach/thread.mdwn b/microkernel/mach/thread.mdwn
new file mode 100644
index 00000000..e27bb117
--- /dev/null
+++ b/microkernel/mach/thread.mdwn
@@ -0,0 +1,37 @@
+[[!meta copyright="Copyright © 2002, 2003, 2010 Free Software Foundation,
+Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+A Mach *thread* belongs to exactly one [[task]], and is the means of execution.
+The task supplies the resources.
+
+Mach threads are implemented inside the [[kernel]], as opposed to other
+systems' user-level thread packages.
+
+A thread (theoretically) runs concurrently with all the other threads of a
+system. If the system provides several processors, they can be used for
+simultaneously running either several threads of the same task, or several
+threads of different tasks. <!-- This is called SMP; the processors use
+*shared memory*. --> [[!tag open_issue_documentation]] <!-- This needs a new
+page, also covering Mach's `processor_set`s, and non-SMP, but still
+multiprocessor systems. --> (But this is currently not support in [[GNU
+Mach|gnumach]].)
+
+It is easy for the kernel to switch execution from one thread to another one
+inside the same task: essentially, it only involves exchanging a few processor
+registers' state.
+
+Threads have scheduling parameters and maintain various statistics about
+themselves.
+
+On GNU/Hurd, APIs for Mach threads and thereabouts are provided by the
+[[hurd/libthreads]] (cthreads), and [[libpthread]] (POSIX Threads) packages.
+
+A task backing a thread is the basis for a [[UNIX process|unix/process]].