From 217998d56f5b6424a685f8c87f2c0e924d1c89da Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Mon, 17 Sep 2007 00:17:05 +0200 Subject: Fix some wiki markup, typos, and so on while reading through it. --- microkernel/mach/external_pager_mechanism.mdwn | 157 +++++++++++++------------ 1 file changed, 82 insertions(+), 75 deletions(-) (limited to 'microkernel') diff --git a/microkernel/mach/external_pager_mechanism.mdwn b/microkernel/mach/external_pager_mechanism.mdwn index 169745fb..67c10713 100644 --- a/microkernel/mach/external_pager_mechanism.mdwn +++ b/microkernel/mach/external_pager_mechanism.mdwn @@ -17,79 +17,79 @@ redistribute your contributions. Mach provides a so-called external pager [[mechanism]]. This mechanism serves to separate *managing memory* from *managing -content*. Mach does the former while user space tasks do the +content*. Mach does the former while [[user_space]] [[task]]s do the latter. # Introduction -In Mach, a task's [[Mach/AddressSpace]] consists of references -to [[Mach/MemoryObjects]]. A memory object is designated using +In Mach, a [[task]]'s [[address_space]] consists of references +to [[memory_object]]s. A memory object is [[designated|designation]] using a [[port]] (a port is just a [[capability]]) and -implemented by a normal process. +implemented by a normal [[process]]. To associate a memory object with a portion of a task's -address space, vm\_map is invoked a capability designating +address space, `vm_map` is invoked on a capability designating the task and passing a reference to the memory object and the offset at which to install it. (The first time a task maps an object, Mach sends an initialization message to the server including a control capability, which it uses to supply pages to the kernel.) This is essentially the same as mapping a file into an address space on Unix -using mmap. +using `mmap`. -When a task faults, Mach checks to see if there is a memory +When a task [[faults|page_fault]], Mach checks to see if there is a memory object associated with the fault address. If not, the task -is sent an exception, which is normally further propagated +is sent an [[exception]], which is normally further propagated as a segmentation fault. If there is an associated memory -object, Mach checks whether the corresponding page is in core. -If it is, it installs the page and resumes the task. Mach -then invokes the memory object with the memory\_object\_request +object, Mach checks whether the corresponding [[page]] is in core. +If it is, it installs the page and resumes the task. Mach +then invokes the memory object with the `memory_object_request` method and the page to read. The memory manager then fetches or creates the content as appropriate and supplies it to -Mach using the memory\_object\_supply method. +Mach using the `memory_object_supply` method. # Creating and Mapping a Memory Object The following illustrates the basic idea: -> ________ -> / \ -> | Mach | -> \________/ -> /| / |\ \ -> (C) vm_map / / m_o_ready (E)\ \ (D) memory_object_init -> / |/ (F) return \ \| -> ________ ________ -> / \ -----> / \ -> | Client | (A) open | Server | -> \________/ <----- \________/ -> (B) memory_object - -(A) The client sends an "open" rpc to the server. + ________ + / \ + | Mach | + \________/ + /| / |\ \ + (C) vm_map / / m_o_ready (E)\ \ (D) memory_object_init + / |/ (F) return \ \| + ________ ________ + / \ -----> / \ + | Client | (A) open | Server | + \________/ <----- \________/ + (B) memory_object + +(A) The client sends an `open` [[RPC]] to the server. (B) The server creates a memory object (i.e., a port receive right), adds it to the port set that it is listening on and returns a capability (a port send right) to the client. (C) The client attempts to map the object into its address space using -the vm\_map rpc. It passes a reference to the port that the server gave +the `vm_map` RPC. It passes a reference to the port that the server gave it to the vm server (typically Mach). (D) Since Mach has never seen the object before, it queues a -memory\_object\_init on the given port along with a send right (the +`memory_object_init` on the given port along with a send right (the memory control port) for the manager to use to send messages to the kernel and also as an authentication mechanism for future interactions: the port is supplied so that the manager will be able to -identify from which kernel a given memory\_object\_* IPC is from. +identify from which kernel a given `memory_object_*` IPC is from. (E) The server dequeues the message, initializes internal data structures to manage the mapping and then invokes the -memory\_object\_ready method on the control object. +`memory_object_ready` method on the control object. (F) The kernel sees that the manager is ready, sets up the appropriate -mappings in the client and then replies to the vm\_map rpc indicating +mappings in the client's address space and then replies to the `vm_map` RPC indicating success. There is nothing stopping others from playing "the kernel." This is @@ -102,37 +102,37 @@ mappings etc. # Resolving Page Faults -> (G) Client ________ -> resumed / \ -> | Mach | -> (A) Fault +----|------+ | \ (B) m_o_request (C) store_read -> ____|___ \_____|__/ |\ \| ________ _________ -> / +---\-------+ \ / \ / \ -> | Client | (F) | Server |<===>| storeio | -> \________/ m_o_supply \________/ \_________/ -> (E) return data | ^ -> | | (D) device_read -> v | -> ________ -> / Device \ -> | Driver | -> \________/ -> | ^ -> | | -> v -> ____________ -> / Hardware \ - -(A) The client does a memory access and faults. The kernel catches + (G) Client ________ + resumed / \ + | Mach | + (A) Fault +----|------+ | \ (B) m_o_request (C) store_read + ____|___ \_____|__/ |\ \| ________ _________ + / +---\-------+ \ / \ / \ + | Client | (F) | Server |<===>| storeio | + \________/ m_o_supply \________/ \_________/ + (E) return data | ^ + | | (D) device_read + v | + ________ + / Device \ + | Driver | + \________/ + | ^ + | | + v + ____________ + / Hardware \ + +(A) The client does a memory access and [[faults|page_fault]]. The kernel catches the fault and maps the address to the appropriate memory object. It -then invokes the memory\_object\_request method on the associated +then invokes the `memory_object_request` method on the associated capability. (In addition to the page to supply, it also supplies the control port so that the server can determine which kernel sent the message.) -(B) The manager dequeues the message. On the Hurd, this is translated -into a store\_read: a function in the libstore library which is used to -transparently manage block devices. The storeio server starts off as +(B) The manager dequeues the message. On the [[Hurd]], this is translated +into a `store_read`: a function in the [[hurd/libstore]] library which is used to +transparently manage block devices. The [[hurd/storeio]] server starts off as a separate process, however, if the server has the appropriate permission, the backing object can be contacted directly by the server. This layer of indirection is desirable when, for instance, a @@ -140,37 +140,37 @@ storeio running as root may want to only permit read only access to a resource, yet it cannot safely transfer its handle to the client. In this case, it would proxy the requests. -(C) The storeio server contacts, for instance, a device driver to do +(C) The storeio server contacts, for instance, a [[device_driver]] to do the read. This could also be a network block device (the NBD server in GNU/Linux), a file, a memory object, etc. -(D) The device driver allocates an anonymous page from the default -pager and reads the data into it. Once all of the operations are +(D) The device driver allocates an [[anonymous_page]] from the +[[default_pager]] and reads the data into it. Once all of the operations are complete, the device returns the data to the client unmapping it from its own address space at the same time. -(E) The storeio transfers the page to the server. The page is still +(E) The storeio server transfers the page to the server. The page is still anonymous. -(F) The manager does a memory\_object\_supply transferring the page to +(F) The manager does a `memory_object_supply` transferring the page to the kernel. Only now is the page not considered to be anonymous but managed. (G) The kernel caches the page, installs it in the client's virtual -address space and finally, resumes the client. +[[address_space]] and finally, resumes the client. # Paging Data Out -> Change manager Pager m_o_return store_write -> \ _________ (B) __(A)__ (C) ________ (D) _______ -> S | / Default \ / \ / \ / \ -> W |<=>| Pager |<=>| Mach |==>| server |<=>| storeio |<=> -> A | \_________/ \________/ \________/ \_______/ -> P | -> / + Change manager Pager m_o_return store_write + \ _________ (B) __(A)__ (C) ________ (D) _______ + S | / Default \ / \ / \ / \ + W |<=>| Pager |<=>| Mach |==>| server |<=>| storeio |<=> + A | \_________/ \________/ \________/ \_______/ + P | + / -(A) The paging [[policy]] is implemented by Mach: servers just implement +(A) The [[paging]] [[policy]] is implemented by Mach: servers just implement the [[mechanism]]. (B) Once the kernel has selected a page that it would like to evict, it @@ -179,10 +179,17 @@ if the server does not deallocate the page quickly enough, it cannot cause a denial of service: the kernel will just later double page it to swap (the default pager is part of the [[tcb]]). -(C) Mach then invokes memory\_object\_return method on the control -object. The server is expected to save the page free it in a timely +(C) Mach then invokes `memory_object_return` method on the control +object. The server is expected to save the page free it in a timely fashion. The server is not required to send a response to the kernel. -(D) The manager then transfers the data to the storeio which +(D) The manager then transfers the data to the storeio server which eventually sends it to disk. The device driver consumes the memory -doing the equivalent of a vm\_deallocate. +doing the equivalent of a `vm_deallocate`. + + +# Sources + +This text is based on a [June 2002 +email](http://lists.gnu.org/archive/html/l4-hurd/2002-06/msg00001.html) by +[[NealWalfield]]. -- cgit v1.2.3 From 849619f219c6b10e511cbada826df342360ed03b Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Sun, 24 Oct 2010 00:39:29 +0200 Subject: microkernel/mach/gnumach/projects/clean_up_the_code: Tag open_issue_gnumach. --- microkernel/mach/gnumach/projects/clean_up_the_code.mdwn | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'microkernel') diff --git a/microkernel/mach/gnumach/projects/clean_up_the_code.mdwn b/microkernel/mach/gnumach/projects/clean_up_the_code.mdwn index e865e61a..2a9b4b60 100644 --- a/microkernel/mach/gnumach/projects/clean_up_the_code.mdwn +++ b/microkernel/mach/gnumach/projects/clean_up_the_code.mdwn @@ -1,5 +1,5 @@ -[[!meta copyright="Copyright © 2005, 2006, 2007, 2008 Free Software Foundation, -Inc."]] +[[!meta copyright="Copyright © 2005, 2006, 2007, 2008, 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 @@ -9,6 +9,8 @@ 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]]."]]"""]] +[[!tag open_issue_gnumach]] + # Restructure the tree in a sane way Merge `linux/src` and `linux/dev`. But only if using a sane RCS, so leave it -- cgit v1.2.3 From 0a0e0a2f57ed8d1ed6def70aa429c6685136e818 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Sun, 24 Oct 2010 00:39:43 +0200 Subject: microkernel/mach/gnumach/projects/gdb_stubs: Link to Linux Kernel GDB tracepoint module, Hui Zhu, 2010-10-09. --- microkernel/mach/gnumach/projects/gdb_stubs.mdwn | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'microkernel') diff --git a/microkernel/mach/gnumach/projects/gdb_stubs.mdwn b/microkernel/mach/gnumach/projects/gdb_stubs.mdwn index ef1b4909..064da7bf 100644 --- a/microkernel/mach/gnumach/projects/gdb_stubs.mdwn +++ b/microkernel/mach/gnumach/projects/gdb_stubs.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2008 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2008, 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 @@ -8,6 +8,12 @@ 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]]."]]"""]] +[[!tag open_issue_gnumach open_issue_gdb]] + * * [ChangeLog.gdb](http://cvs.savannah.gnu.org/viewvc/gnumach/ChangeLog.gdb?root=hurd&view=markup&pathrev=gnumach-1-branch-gdb-branch) + +This may be another follow-up project: [*Linux Kernel GDB tracepoint +module*](http://thread.gmane.org/gmane.comp.gdb.devel/29369), Hui Zhu, +2010-10-09. -- cgit v1.2.3 From 46b77fd2236b97c9d9c7ecd9a86b7d1ee9cd2527 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Sun, 5 Dec 2010 18:22:15 +0100 Subject: microkernel/viengoos: Update status. Mostly from Neal Walfield's 2010-12-05 email to . --- challenges.mdwn | 5 ++++- microkernel/viengoos.mdwn | 21 ++++++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) (limited to 'microkernel') diff --git a/challenges.mdwn b/challenges.mdwn index 5368ae4e..a3a8a7e6 100644 --- a/challenges.mdwn +++ b/challenges.mdwn @@ -10,12 +10,15 @@ License|/fdl]]."]]"""]] The GNU Hurd has a lot of [[advantages]], but there are challenges, too. +Some of these are explained in the [[hurd/critique]]. + Even though they're quite popular in the simpler embedded space, there is no successful true multi-server [[microkernel]] system for general-purpose desktop use yet. This is still an ongoing research effort. (TODO: add references.) Likewise, resource scheduling in distributed operating system kernels is a research topic. For example, read more about it on the relevant [[Open Issues -page|open_issues/multiprocessing]]. +page|open_issues/multiprocessing]]. Also, the [[microkernel/Viengoos]] +research kernel project strives to explore these. TODO: more to come. [[!tag open_issue_documentation]] diff --git a/microkernel/viengoos.mdwn b/microkernel/viengoos.mdwn index 2b9fee03..66c6ff36 100644 --- a/microkernel/viengoos.mdwn +++ b/microkernel/viengoos.mdwn @@ -1,15 +1,26 @@ -[[!meta copyright="Copyright © 2008, 2009 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2008, 2009, 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]]."]]"""]] +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] -*viengoos* is a new kernel currently being designed and written by Neal -Walfield. +*Viengoos* is a research kernel, designed and written by Neal Walfield. + +As of late 2009, the project is on hold, due to time constraints. + +Viengoos is not really meant to be a successor to [[Mach]]. It is highly +experimental; some of the techniques it employs, in particular, those related +to [[memory_management]] and [[IPC]], are unproven. These were motivated by +[[shortcomings_in_Mach|hurd/critique]] as well as current operating systems. A +research system is unlikely the best base for a product. A better approach is +to view Viengoos as an experimental platform whose goal is to explore solutions +to some of the [[issues_uncovered_by_the_Hurd|challenges]]. Knowledge gained +can then be integrated into something like [[Mach]]. The source can be downloaded from the *viengoos.git* repository, cf. . You can -- cgit v1.2.3 From 238c43499c4e08562024c3ef59e50aa365b5f1b2 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 7 Dec 2010 14:26:40 +0100 Subject: Some bits about L4 and Coyotos. --- history/port_to_l4.mdwn | 10 ++- hurd/ng.mdwn | 2 - hurd/ng/choiceofmicrokernel.mdwn | 4 - hurd/ng/issues_with_mach.mdwn | 12 --- hurd/ng/microkernelcoyotos.mdwn | 11 --- hurd/what_is_the_gnu_hurd.mdwn | 23 ++++-- kernel.mdwn | 21 +++++ microkernel.mdwn | 32 ++++++-- microkernel/coyotos.mdwn | 30 +++++++ microkernel/l4.mdwn | 21 +++++ unix.mdwn | 2 + unsorted/HurdOnL4.mdwn | 173 --------------------------------------- unsorted/HurdOnL4/menu.lst | 55 ------------- unsorted/PortToL4.mdwn | 42 ---------- 14 files changed, 123 insertions(+), 315 deletions(-) delete mode 100644 hurd/ng/choiceofmicrokernel.mdwn delete mode 100644 hurd/ng/issues_with_mach.mdwn delete mode 100644 hurd/ng/microkernelcoyotos.mdwn create mode 100644 kernel.mdwn create mode 100644 microkernel/coyotos.mdwn create mode 100644 microkernel/l4.mdwn delete mode 100644 unsorted/HurdOnL4.mdwn delete mode 100644 unsorted/HurdOnL4/menu.lst delete mode 100644 unsorted/PortToL4.mdwn (limited to 'microkernel') diff --git a/history/port_to_l4.mdwn b/history/port_to_l4.mdwn index cdf048e6..b58c0d91 100644 --- a/history/port_to_l4.mdwn +++ b/history/port_to_l4.mdwn @@ -1,5 +1,5 @@ -[[!meta copyright="Copyright © 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009 -Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, +2009, 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 @@ -100,3 +100,9 @@ A lange number of discussion threads can be found in the archives of the > that we had come to envision in terms of interfaces and description of the > system's structure. The new name was selected, if I recall correctly, as it > clearly wasn't the Hurd nor the Hurd based on L4. + + +The source code is still available in [CVS module +`hurd-l4`](http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/) (note that +this repository has in the beginning also been used for Neal's +[[microkernel/Viengoos]]). diff --git a/hurd/ng.mdwn b/hurd/ng.mdwn index fb4d742f..de33949d 100644 --- a/hurd/ng.mdwn +++ b/hurd/ng.mdwn @@ -10,7 +10,6 @@ These pages try to summarize the major discussions and ideas. This section explains the motivations behind the new design: - * [[Issues_with_Mach]] * [[Issues_with_L4_Pistachio]] * [[Limitations_of_the_original_Hurd_design]] @@ -64,7 +63,6 @@ A [[critique]] of the original Hurd is available. ## Implementation -* [[ChoiceOfMicrokernel]] * [[HurdInterafaces]] * [[PosixLayer]] * [[SystemStructure]] diff --git a/hurd/ng/choiceofmicrokernel.mdwn b/hurd/ng/choiceofmicrokernel.mdwn deleted file mode 100644 index 20ee6f05..00000000 --- a/hurd/ng/choiceofmicrokernel.mdwn +++ /dev/null @@ -1,4 +0,0 @@ -TBD - -* [[MicrokernelL4]] -* [[MicrokernelCoyotos]] diff --git a/hurd/ng/issues_with_mach.mdwn b/hurd/ng/issues_with_mach.mdwn deleted file mode 100644 index 9fac498f..00000000 --- a/hurd/ng/issues_with_mach.mdwn +++ /dev/null @@ -1,12 +0,0 @@ -[[!meta copyright="Copyright © 2008, 2009 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]]."]]"""]] - - * [[open issues/Resource Management Problems]] - * [[Critique]] diff --git a/hurd/ng/microkernelcoyotos.mdwn b/hurd/ng/microkernelcoyotos.mdwn deleted file mode 100644 index 2340901d..00000000 --- a/hurd/ng/microkernelcoyotos.mdwn +++ /dev/null @@ -1,11 +0,0 @@ -# The Coyotos microkernel - -[Coyotos](http://www.coyotos.org/index.html) is a microkernel and OS and the successor of EROS, that itself is the successor of KeyKOS. A more complete history can be found [here](http://www.coyotos.org/history.html). Its main objectives are to correcte some shortcomings of EROS, demonstrate that an atomic kernel design scales well, and (eventually) to completely formally verify both the kernel and critical system components by writing them in a new language called [bitc](http://www.bitc-lang.org/). [See [l4.verified](http://nicta.com.au/research/projects/l4.verified) for work on formally verifying an L4 microkernel.] - -Coyotos is an orthogonally persistent pure capability system. It uses -continuation based unbuffered asynchronous IPC (actually it's synchronous IPC -with asynchronous [[system calls]]). - -TODO: explain these terms and (more important) their consequences on system design. - -The coyotos microkernel specification can be found [here](http://www.coyotos.org/docs/ukernel/spec.html) diff --git a/hurd/what_is_the_gnu_hurd.mdwn b/hurd/what_is_the_gnu_hurd.mdwn index 0b8f7ef6..7a7f3d43 100644 --- a/hurd/what_is_the_gnu_hurd.mdwn +++ b/hurd/what_is_the_gnu_hurd.mdwn @@ -1,17 +1,18 @@ -[[!meta copyright="Copyright © 2001, 2002, 2003, 2004, 2005, 2007, 2008 Free -Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, +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]]."]]"""]] +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] [[!meta title="What Is the GNU Hurd?"]] -The Hurd is the GNU project's replacement for the [[Unix]] kernel. +The Hurd is the GNU project's replacement for [[UNIX]], a popular operating +system [[kernel]]. The Hurd is firstly a collection of protocols formalizing how different components may interact. The protocols are designed to reduce the mutual @@ -22,11 +23,19 @@ process to implement a file system. The only requirement is that it have access to its backing store and that the [[principal]] that started it own the file system node to which it connects. -The Hurd is also a set of servers that implement these protocols. -They include file systems, network protocols and authentication. +The Hurd is also a set of [[servers|translator]] that implement these +protocols. They include file systems, network protocols and authentication. The servers run on top of the [[microkernel/Mach]] [[microkernel]] and use Mach's [[microkernel/mach/IPC]] mechanism to transfer information. +The Hurd provides a compatibility layer such that compiling higher level +programs is essentially transparent; that is, by means of the [[glibc]], it +provides the same standard interfaces known from other [[UNIX]]-like systems. +Thus, for a typical user, the Hurd is intended to silently work in the +background providing the services and infrastructure which the [[microkernel]] +itself has no business implementing, but that are required for higher level +programs and libraries to operate. + The Hurd supplies the last major software component needed for a complete [[GNU_operating_system|running/gnu]] as originally conceived by Richard M. Stallman (RMS) in 1983. The GNU vision directly drove the creation and has diff --git a/kernel.mdwn b/kernel.mdwn new file mode 100644 index 00000000..8190660e --- /dev/null +++ b/kernel.mdwn @@ -0,0 +1,21 @@ +[[!meta copyright="Copyright © 2004, 2006, 2007, 2008, 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]]."]]"""]] + +The kernel of an operating system is a fundamental program which provides +essential resources from the hardware of the computer to other programs. + +A kernel typically runs all the time and remains resident in main memory. + +The amount of functionality and resources which it provides vary tremendously. + + * [[microkernel]] + + * [[UNIX]] diff --git a/microkernel.mdwn b/microkernel.mdwn index e2d70c01..17344689 100644 --- a/microkernel.mdwn +++ b/microkernel.mdwn @@ -1,12 +1,15 @@ -[[!meta copyright="Copyright © 2007, 2008 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2007, 2008, 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]]."]]"""]] +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +A *microkernel* is one kind of a [[kernel]] implementation. [[Liedtke]] explains in [On Microkernel Construction](http://l4ka.org/publications/paper.php?docid=642) that a microkernel attempts to minimize the mandatory part of the operating @@ -19,12 +22,10 @@ The idea of a microkernel as explained above was first explored by Per Brinch-Hansen in 1970 in [The Nucleus of a Multiprogramming System](http://brinch-hansen.net/papers/1970a.pdf). -Other notable microkernels include [[Hydra]], [[KeyKOS]], [[Eros]] and [[L4]]. - An [introduction](http://www.cs.cornell.edu/Info/People/ulfar/ukernel/ukernel.html) by Úlfar Erlingsson and Athanasios Kyparlis (from 1996) to microkernel concepts. -[[Research]]. [[Viengoos]]. +[[Research]]. [[Microkernels_for_beginners|for_beginners]]. @@ -32,4 +33,21 @@ A 2002 article about [[microkernel_FUD|FUD]] (Fear, Uncertainty, Doubt). [[FAQ]]. -[[Mach]]. + +# Implementations + + * [[Hydra]] + + * [[KeyKOS]] + + * [[Mach]] -- used by the GNU/Hurd + + * [[EROS]] + + * [[CapROS]] + + * [[Coyotos]] + + * [[L4]] + + * [[Viengoos]] diff --git a/microkernel/coyotos.mdwn b/microkernel/coyotos.mdwn new file mode 100644 index 00000000..5ecea688 --- /dev/null +++ b/microkernel/coyotos.mdwn @@ -0,0 +1,30 @@ +[[!meta copyright="Copyright © 2006, 2007, 2008, 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]]."]]"""]] + +[[!meta title="Coyotos"]] + +[*Coyotos*](http://www.coyotos.org/) is a microkernel and OS and the successor +of [[EROS]], that itself is the successor of [[KeyKOS]]. A more complete +history can be found [here](http://www.coyotos.org/history.html). Its main +objectives are to correcte some shortcomings of [[EROS]], demonstrate that an +atomic kernel design scales well, and (eventually) to completely formally +verify both the kernel and critical system components by writing them in a new +language called [bitc](http://www.bitc-lang.org/). + +Coyotos is an orthogonally [[persistent|persistency]] pure [[capability]] +system. It uses [[continuation]]-based unbuffered asynchronous [[IPC]] +(actually it's synchronous [[IPC]] with asynchronous [[system calls]]). + +TODO: explain these terms and (more important) their consequences on system +design. + +The coyotos microkernel specification can be found +[here](http://www.coyotos.org/docs/ukernel/spec.html). diff --git a/microkernel/l4.mdwn b/microkernel/l4.mdwn new file mode 100644 index 00000000..970407be --- /dev/null +++ b/microkernel/l4.mdwn @@ -0,0 +1,21 @@ +[[!meta copyright="Copyright © 2004, 2006, 2007, 2008, 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]]."]]"""]] + +The [*L4* microkernel](http://l4ka.org/) is an attempt to create a very small +high performace core which provides basic memory management, task and context +switching, and little else. + +[L4Ka Pistachio Home](http://l4ka.org/projects/pistachio/). + +See [l4.verified](http://nicta.com.au/research/projects/l4.verified) for work +on formally verifying an L4 microkernel. + +There was a GNU/Hurd [[history/port_to_L4]], which is now stalled. diff --git a/unix.mdwn b/unix.mdwn index bf361e2e..3cfe7771 100644 --- a/unix.mdwn +++ b/unix.mdwn @@ -10,6 +10,8 @@ License|/fdl]]."]]"""]] [[!meta title="UNIX"]] +*UNIX* is a [[kernel]] implementation. + # External diff --git a/unsorted/HurdOnL4.mdwn b/unsorted/HurdOnL4.mdwn deleted file mode 100644 index 79e7a714..00000000 --- a/unsorted/HurdOnL4.mdwn +++ /dev/null @@ -1,173 +0,0 @@ -# GNU/Hurd on L4 wiki - -## Introduction - -This page is a place for information pertaining to the efforts towards realizing the migration and porting of the [[Hurd]] such that it uses the [L4 Microkernel](http://l4ka.org/). The GNU/Hurd Operating System, sometimes just referred to as the _GNU Operating System_ is a rich and robust collection of programs and utilities which enable you to use your computer to do usefull and or entertaining things. The intent is that most any applicable software package available on the [GNU Website](http://www.gnu.org) (and many others also) will be able to be compiled and run under the resultant operating system. - -At this point (06/20/2004) this is not yet possible. Indeed, the preliminary foundations are still being developed. Nevertheless, this is a volunteer created operating system so those with the knowledge, interest, and spare time are encouraged to study and if possible contribute to the project. - -In [CVS module hurd-l4](http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/), there is a [comprehensive list of items that need to be done](http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/TODO). - -## Components of the System - -### The L4 Microkernel - -The kernel of an operating system is a fundamental program which provides essential resources from the hardware of the computer to other programs. A kernel typically runs all the time and remains resident in main memory. The amount of functionality and resources which it provides vary tremendously. The [L4 Microkernel](http://l4ka.org/) is an attempt to create a very small high performace core which provides basic memory management, task and context switching, and little else. - -### The Hurd - -The [Hurd](http://www.gnu.org/software/hurd/hurd.html) is a conglomeration of servers and programs which add additional functionality to a microkernel such that it is capable of utilizing additional hardware resources of the computer. It also provides a compatibility layer such that compiling higher level programs is essentially transparent; i.e. when you write a C program and compile it, you need only include standard headers and libraries and for all intents and purposes your generic program will build and run and you need never resort to unportable coding or access to hardware specific methods. - -For a typical user, The Hurd is intended to silently work in the background providing the services and infrastructure which are lacking in the microkernel but are required for higher level programs and libraries to operate. - -### GNU Programs - -For the user, this is what is desired: to run [GNU Software](http://www.gnu.org/). These programs provide a full featured, robust, and extremely effective operating system. A L4/Hurd system should be capable of compiling and executing most any software package available from GNU with little or no modification. - -Some readers may be familiar with GNU/Linux systems. When GNU/L4 is complete it should highly resemble the functionality of such systems as L4 and Hurd effectively replace the Linux kernel. The bulk of the software should be expected to run much as it does presently under the Linux kernel (or gnumach based GNU/Hurd systems). - -## Preparations - -### Build System - -There are no precompiled binaries for Hurd on L4 that I am aware of, so you will need to be able to compile the source code packages in order to experiment with it. While L4Ka will likely build on a variety of compilers and systems, the Hurd may prove troublesome unless it is built using recent GNU compilers and tools. - -I recently used [Debian Unstable](http://www.debian.org) (Sarge) with GNU gcc version 3.3, autoconf version 2.50, and automake version 1.8 to build the system with good results, although other similarly equipped systems with a good development environment, such as [Gentoo](http://www.gentoo.org) or [Slackware](http://www.slackware.com) are reported to work fine also. - -Generally, I would recommend building the packages using any very up-to-date GNU development system. I'm not going to say that you can't compile them using more exotic platforms, but I wouldn't be overly hopefull about it. I have no idea if Pistachio can be compiled under current gnuMach/Hurd systems it might be interesting to try it. - -### Making a Home for L4/Hurd - -Obviously you want to have a home for this little embryonic operating system. Currently, mine is using about 5M for the binaries and headers. If you want the source to reside with the binaries, then allow perhaps another 50M or so, but this is purely optional. - -At the moment, Hurd on L4 can't even see your hard drive, so all you need is a directory on some partition which is visible to the GRUB bootloader. A `/l4hurd` directory on your existing GNU/Linux system is probably fine for now. - -Howevever, if you have some spare disk space or an unused partition, you could optionally create a small partition for the system. This is totally unnecessary at the moment because L4/Hurd lacks hard disk drivers right now, but it is an option. Assuming that you have made some partition **X** with linux _fdisk_, set it to type 83 - Linux and use the following command to initialize it with the classic Hurd extensions: - - - -As noted, this is purely optional, in fact right now you can use any filesystem that GRUB can understand. You can even use TFTP to netboot the system. My current setup takes about 5M for the full install so obviously you don't need much space for this. - -### Boot Loader - -Just like regular GNU/Hurd, you need to use [GNU GRUB](http://www.gnu.org/software/grub/), the _GRand Unified Bootloader_ in order to boot the system. Hopefully you already have it installed, in which case adding the commands for L4/Hurd to your `menu.lst` is quite trivial. - -If you don't have GRUB installed, then you should probably take some time to get it set up. A good place to look for help is on the regular [Debian GNU/Hurd Installation Page](http://www.debian.org/ports/hurd/hurd-install) at the **3\. The Boot Loader** section. - -This is probably a bit superfluous, but you can even display a snazzy little graphic of some type on your GRUB boot menu. Here's a snip from the header of my `menu.lst` which demonstrates how to do this. - - # menu for grub - splashimage (hd0,0)/boot/grub/debian.xpm - foreground bfbfe7 - background 3f3f7f - -In the above example, my `debian.xpm` is just a 640x480 graphic in xpm format (which you can easily create with GIMP). It does add a bit of pizazz to your boot screen :-) - -In fact, I will attach a sample copy of my `menu.lst` here. It has lots of examples for booting a variety of operating systems in it. Remember that my hard drive partitions are unique to my system. - -* [[ATTACHURLmenulst]]: Sample GRUB boot menu - -## Building Hurd on L4 - -### L4Ka Pistachio - -#### Getting the Sources - -I used the latest version of L4Ka, Pistachio version 0.4. It can be obtained from the following website: - -[L4Ka Pistachio Home](http://l4ka.org/projects/pistachio/) - -#### Compiling - -Pistachio is designed to be compiled in a build directory which is independant from the source directory, so you need to create your build directory after unpacking the tarball. Furthermore, you need to pass a couple of special parameters to the configure program to set it up for use with Hurd. Here is what I did on my ia32 system: - -Note: I have my installation set up in `/l4hurd` and I am starting from within the Pistachio source top-level directory. - - $ mkdir build - $ cd build - Building and installing user-level libraries and servers/applications - $ ../user/configure --with-s0-linkbase=0x40000 --prefix=/l4hurd - $ make - $ make install - Building and installing the kernel - $ make -C ../kernel BUILDDIR=`pwd`/kernel - $ cd kernel - $ make menuconfig - $ make - $ mkdir /l4hurd/boot - $ cp ia32-kernel /l4hurd/boot - -Hopefully everything worked and there were no problems. As usual, if the build fails then scrutinize the output from `configure` and install any missing libraries or development packages. - -### CVS l4hurd - -#### Getting the sources - - You need to pull the L4 Hurd sources from the CVS tree on Savannah. The CVS access page is [The GNU/Hurd - CVS (module hurd-l4)](http://savannah.gnu.org/cvs/?group=hurd). In a nutshell, the following commands should retrieve the sources for you: - - $ cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/hurd co hurd-l4 - -#### Compiling - -Take a look at the README, compiling should be quite simple on any state of the art GNU development system. As per the README, and for my example, you would: - - $ autoreconf -f -i -s - $ ./configure --enable-maintainer-mode --prefix=/l4hurd - $ make - $ make install - $ strip physmem/physmem - - $ mkdir /l4hurd/boot - $ cp laden/laden /l4hurd/boot - $ cp wortel/wortel /l4hurd/boot - $ cp physmem/physmem /l4hurd/boot - -Currently (2004/08/09), physmem needs to be stripped to to avoid a memory conflict with wortel; this requirement may be fixed in the future. - -In my case it was slightly more complicated as Debian uses a wrapper system to enable the use of multiple versions of the GNU Autotools. In this case, the trick is to utilize some environment variables on the command line as follows: - - $ ACLOCAL=aclocal-1.8 AUTOMAKE=automake-1.8 autoreconf -f -i -s - -As above, hopefully this will compile cleanly; otherwise, scroll up, read any error messages, and correct them by installing required packages of the proper version. Any bad compilation problems are most likely due to you either missing or using a wrong version of something. - -## Installing - -The binaries are now installed into `/l4hurd`. All that remains is to add an entry into GRUB's `menu.lst` in order to test it out. Here's an example from my system where I have `/l4hurd` on `/dev/hda9` in my Linux system: - - title GNU Hurd on L4Ka Pistachio 0.4 - root (hd0,8) - kernel /boot/laden -D - module /boot/ia32-kernel - module /libexec/l4/sigma0 - module /boot/wortel -D - module /boot/physmem -D - module /boot/physmem - module /boot/physmem - module /boot/physmem - module /boot/physmem - -It might strike you a little odd that there are five physmem modules. This is done because wortel currently (2004/08/09) expects exactly five modules and the other modules (like the task server, auth server, etc.) have not been implemented yet. Therefore the physmem module is used as a dummy module. - -## Booting - -For me at least, I got some nifty messages and then it dropped into a simple debugging mode. As far as I know, thats all there is right now. - -Read, build, learn, code... - ---todo: add more here. - -## Experimenting - -Well, thats why you did all of this, certainly not to do anything else. Use that debugger and get experimenting. - ---todo: things to do wth the debugger - -## Conclusion - -If you followed these steps, you most likely have built and booted the latest version of Hurd on L4. I would encourage you to subscribe to the mailing list at the following URL and help in the efforts to get this nifty system up to speed: - -[l4-hurd mailing list](http://lists.gnu.org/mailman/listinfo/l4-hurd) - -And finally, this is a wiki, meaning that **you** have the ability to edit and modify this page. If you want to fix something, add more information, new sub-pages, whatever, feel free to do so. This is a great way to get a doc base up fast and keep it current, so use it like its supposed to be and have fun with Hurd on L4! - --- [[Main/BDouglasHilton]] - 20 Jun 2004 diff --git a/unsorted/HurdOnL4/menu.lst b/unsorted/HurdOnL4/menu.lst deleted file mode 100644 index 3129ea74..00000000 --- a/unsorted/HurdOnL4/menu.lst +++ /dev/null @@ -1,55 +0,0 @@ -# menu for grub -splashimage (hd0,0)/boot/grub/debian.xpm -foreground bfbfe7 -background 3f3f7f - -timeout 30 -default 0 - -title Debian Sid with Linux kernel 2.6.5 -root (hd0,1) -kernel /vmlinuz root=/dev/hda2 vga=0x318 - -title Debian Sid with old kernel -root (hd0,1) -kernel /vmlinuz.old root=/dev/hda2 vga=9 - -title Microsoft Windows 2000 -rootnoverify (hd0,3) -chainloader (hd0,3)+1 - -title FreeDOS BETA 8.0 -root (hd0,0) -chainloader +1 - -title GNU Hurd on L4Ka Pistachio 0.4 -root (hd0,8) -kernel /boot/laden -D -module /boot/ia32-kernel -module /libexec/l4/sigma0 -module /boot/wortel -D -module /boot/physmem - -title Debian GNU/Hurd (gnumach) -root (hd0,7) -kernel /boot/kernel.gz root=device:hd0s8 -module /hurd/ext2fs.static --readonly \ - --multiboot-command-line=${kernel-command-line} \ - --host-priv-port=${host-port} \ - --device-master-port=${device-port} \ - --exec-server-task=${exec-task} \ - -T typed ${root} $(task-create) $(task-resume) -module /lib/ld.so.1 /hurd/exec $(exec-task=task-create) - -# title Debian GNU/Hurd (oskit-mach) -# root (hd3,0) -# kernel /boot/kernel-ide -- root=hd0s1 -# module /hurd/ext2fs.static --multiboot-command-line=${kernel-command-line} --host-priv-port=${host-port} --device-master-port=${device-port} --exec-server-task=${exec-task} -T device ${root-device} $(task-create) $(task-resume) -# module /lib/ld.so.1 /hurd/exec $(exec-task=task-create) - -# title Debian GNU/Hurd (oskit-mach w/ remote debugging) -# root (hd3,0) -# kernel /boot/kernel-ide -d GDB_COM=1 BAUD=9600 -- root=hd0s1 -# module /hurd/ext2fs.static --multiboot-command-line=${kernel-command-line} --host-priv-port=${host-port} --device-master-port=${device-port} --exec-server-task=${exec-task} -T device ${root-device} $(task-create) $(task-resume) -# module /lib/ld.so.1 /hurd/exec $(exec-task=task-create) - diff --git a/unsorted/PortToL4.mdwn b/unsorted/PortToL4.mdwn deleted file mode 100644 index fb7f0004..00000000 --- a/unsorted/PortToL4.mdwn +++ /dev/null @@ -1,42 +0,0 @@ -**_The Hurd-L4 port has an [official page](http://www.gnu.org/software/hurd/hurd-l4.html) with more up-to-date information_** -- [[Main/OgnyanKulev]] - 05 Feb 2005 - -A group of one being led by Neal H. Walfield is working on porting the Hurd to the pistachio version of the L4 microkernel. This second generation microkernel provides a significantly different API than the one offered by the Mach microkernel, a first generation microkernel. One of the primary goals of the project, outside of porting the Hurd to L4, is to reevaluate the current Hurd abstractions and consider how they can be modified to be more general. - -I have no web page describing my efforts. There is a mailing list[1]. - -[1] - --- Neal Walfield, 18 Sep 2002 - -Neal noted [1] that there are licensing issues being worked out so no code is yet released. His work was performed in the summer of 2002 at Karlsruhe. - -[1] - --- [[Main/GrantBow]] - 21 Sep 2002 - -There are several important pages that are of interest for the L4 & hurd communities. - -* Main L4 home page - -* Hurd on L4 - -* Hurd on L4 - -* - --- [[Main/GrantBow]] - 22 May 2002 - - - --- [[Main/GrantBow]] - 24 Oct 2002 - -There was [discussion in October 2002](http://mail.gnu.org/pipermail/l4-hurd/2002-October/000727.html) about the differences between Hurd on Mach and Hurd on L4 with some interesting URLs. In the thread Okuji [responds](http://mail.gnu.org/pipermail/l4-hurd/2002-October/000728.html) confirming his document is two years old and outdated by the directions that Neal is taking in furthering this effort. The URLs in that email might be helpful to those learning more about Hurd and L4 ideas that were considered yet abandoned. - --- [[Main/GrantBow]] - 04 Jan 2003 - -A "Porting GNU Hurd to L4" website: - -* - --- [[Main/SebastianGabriel]] - 29 Sep 2003 - -The only valid L4-Hurd link on is - --- [[Main/JoachimNilsson]] - 29 Sep 2003 -- cgit v1.2.3 From 8fb130c6315264ff44d86c1d06b8b2d83035bdbe Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Mon, 13 Dec 2010 17:14:28 +0100 Subject: microkernel/mach/external_pager_mechanism: Based on a 2002-06 email by Neal Walfield. --- microkernel/mach/external_pager_mechanism.mdwn | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'microkernel') diff --git a/microkernel/mach/external_pager_mechanism.mdwn b/microkernel/mach/external_pager_mechanism.mdwn index 7b6015bb..2040f4ba 100644 --- a/microkernel/mach/external_pager_mechanism.mdwn +++ b/microkernel/mach/external_pager_mechanism.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2002, 2007, 2008 Free Software Foundation, +[[!meta copyright="Copyright © 2002, 2007, 2008, 2010 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable @@ -6,8 +6,8 @@ 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]]."]]"""]] +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] Mach provides a so-called external pager [[mechanism]]. This mechanism serves to separate *managing memory* from *managing @@ -180,10 +180,3 @@ fashion. The server is not required to send a response to the kernel. (D) The manager then transfers the data to the storeio server which eventually sends it to disk. The device driver consumes the memory doing the equivalent of a `vm_deallocate`. - - -# Sources - -This text is based on a [June 2002 -email](http://lists.gnu.org/archive/html/l4-hurd/2002-06/msg00001.html) by -[[NealWalfield]]. -- cgit v1.2.3 From 4eea3efc13acccfb613571f604f17e0ec68e5bed Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Mon, 13 Dec 2010 20:22:52 +0100 Subject: ``Some'' Mach documentation. Parts have been rescued from 4b382d8daa5a9e2d54e78c18beeff76bc54dc16b:Mach/MachConcepts.mdwn. --- hurd/faq/old_hurd_faq.txt | 2 +- idl.mdwn | 22 +++-- ipc.mdwn | 15 ++-- microkernel/fud.mdwn | 14 ++- microkernel/mach/concepts.mdwn | 27 +++++- microkernel/mach/documentation.mdwn | 6 +- microkernel/mach/external_pager_mechanism.mdwn | 14 ++- microkernel/mach/ipc.mdwn | 19 ++--- microkernel/mach/memory_object.mdwn | 31 +++++++ microkernel/mach/message.mdwn | 31 +++++++ microkernel/mach/mig.mdwn | 33 ++++--- microkernel/mach/mig/documentation.mdwn | 14 +-- microkernel/mach/mig/gnu_mig.mdwn | 12 ++- microkernel/mach/port.mdwn | 114 +++++++++++++++++-------- microkernel/mach/rpc.mdwn | 16 ++-- microkernel/mach/task.mdwn | 23 +++++ microkernel/mach/thread.mdwn | 37 ++++++++ microkernel/mach/virtual_address_space.mdwn | 36 ++++++++ 18 files changed, 364 insertions(+), 102 deletions(-) create mode 100644 microkernel/mach/memory_object.mdwn create mode 100644 microkernel/mach/message.mdwn create mode 100644 microkernel/mach/task.mdwn create mode 100644 microkernel/mach/thread.mdwn create mode 100644 microkernel/mach/virtual_address_space.mdwn (limited to 'microkernel') diff --git a/hurd/faq/old_hurd_faq.txt b/hurd/faq/old_hurd_faq.txt index c7e0ffe8..e6c6cb5a 100644 --- a/hurd/faq/old_hurd_faq.txt +++ b/hurd/faq/old_hurd_faq.txt @@ -89,7 +89,7 @@ Q4. What's all this about Mach 3.0 (and Mach 4.0)? As mentioned above, Mach is a micro-kernel, written at Carnegie Mellon University. A more descriptive term might be a greatest-common-factor kernel, since it provides facilities common to all ``real'' operating -systems, such as memory management, interprocess communication, +systems, such as memory management, inter-process communication, processes, and a bunch of other stuff. Unfortunately, the system calls used to access these facilities are only vaguely related to the familiar and cherished Unix system calls. There are no "fork", diff --git a/idl.mdwn b/idl.mdwn index db58f789..adfd9b93 100644 --- a/idl.mdwn +++ b/idl.mdwn @@ -1,15 +1,19 @@ -[[!meta copyright="Copyright © 2007, 2008 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2002, 2003, 2007, 2008, 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]]."]]"""]] - -An IDL is an interface definition language. The most well-known is -CORBA. An IDL compiler takes a specification and generates stubs -that hide the transport details. In the case of [[microkernel/mach/MIG]], this -hides the marshalling and unmarshalling of parameters according -to [[microkernel/Mach]]'s semantics. +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +An *IDL* is an *interface definition language*. The most well-known is CORBA. + +An IDL compiler takes a specification and generates stub code that hides the +transport details, and by this implements a [[RPC]] system. + +In the case of [[Mach's MIG|microkernel/mach/mig]], this hides the marshalling +and unmarshalling of parameters according to [[microkernel/Mach]]'s semantics, +and invoking the respective [[microkernel/mach/port]] operations. diff --git a/ipc.mdwn b/ipc.mdwn index 2f9cef2e..ff9a166c 100644 --- a/ipc.mdwn +++ b/ipc.mdwn @@ -1,16 +1,17 @@ -[[!meta copyright="Copyright © 2007, 2008 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2007, 2008, 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]]."]]"""]] +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] -IPC stands for interprocess communication. +*IPC* stands for *inter-process communication*. -On [[Unix]], interprocess communication can be achieved using pipes. +On [[Unix]], inter-process communication can be achieved using pipes. This is inefficient for large amounts of data as the data must be copied. This is generally not a problem as most services are provided by the Unix kernel and Unix is not designed to be @@ -22,12 +23,14 @@ of many components. As components are separated by their respective examine and modify the caller's state. The advantage is that if the protocol is carefully designed, the callee cannot cause the caller any [[destructive_interference]] thereby removing the need for the -caller to [[trust]] the callee thus reducing the former's [[tcb]]. +caller to [[trust]] the callee thus reducing the former's [[TCB]]. When done systematically, this can increase the system's [[robustness]]. To this end, microkernels provide richer IPC semantics that include the ability to transfer [[capabilities|capability]] and to use [[virtual_memory]] [[mechanism]]s to copy data. +Continue reading about [[Mach's IPC system|microkernel/mach/IPC]]. + # See Also diff --git a/microkernel/fud.mdwn b/microkernel/fud.mdwn index 6353f81d..3f9229aa 100644 --- a/microkernel/fud.mdwn +++ b/microkernel/fud.mdwn @@ -11,7 +11,19 @@ This article is a response to an [earlier article](http://www.linuxjournal.com/n Miles Nordin claimed that microkernels are dead already. But this is not completely true. The first generation of microkernels, which were in fact no real microkernels, are dead. But there is a new generation, which uses a radically different strategy than the original (so-called) microkernels. Thus, microkernels are still a research topic, and today they look more promising than ever before. By now, this is just something we claim, but read on, and you'll find out why we do so. -Out of our own experience, we can confirm that the first generation microkernel Mach is quite slow, but being microkernel independent is one of the goals of the Hurd and people are already working on porting the Hurd from Mach to the second generation microkernel L4. Those new second generation kernels aren't as slow as Mach and we think that one should not talk about the performance of microkernel based systems without having read at least some of the papers on L4. The L4 people did some interesting benchmarks, which indicate that one can get a lot of performance by making a microkernel really small. How is this supposed to work? Well, the microkernel provides very primitive, highly optimized operations, and applications use them to implement whichever way of interprocess communication is apropriate for them in an efficient way. By deciding this on a per-case basis, you get optimal performance for all applications. +Out of our own experience, we can confirm that the first generation microkernel +Mach is quite slow, but being microkernel independent is one of the goals of +the Hurd and people are already working on porting the Hurd from Mach to the +second generation microkernel L4. Those new second generation kernels aren't +as slow as Mach and we think that one should not talk about the performance of +microkernel based systems without having read at least some of the papers on +L4. The L4 people did some interesting benchmarks, which indicate that one can +get a lot of performance by making a microkernel really small. How is this +supposed to work? Well, the microkernel provides very primitive, highly +optimized operations, and applications use them to implement whichever way of +inter-process communication is apropriate for them in an efficient way. By +deciding this on a per-case basis, you get optimal performance for all +applications. But L4 takes this even further. For example, you can have schedulers in userspace. Therefore you can use a scheduler which is optimized for the specific tasks your system performs. With the Linux kernel, different schedulers are only possible by using a different source tree, thus you cannot switch at run-time and/or have different schedulers for different groups of processes. diff --git a/microkernel/mach/concepts.mdwn b/microkernel/mach/concepts.mdwn index 04dbb1c6..a9e8897d 100644 --- a/microkernel/mach/concepts.mdwn +++ b/microkernel/mach/concepts.mdwn @@ -1,6 +1,25 @@ -[[Mach]] is a first-generation [[microkernel]]. Mach's basic abstractions -include [[address_space]]s in the form of [[task]]s, execution contexts in the -form of [[thread]]s, [[IPC]], [[capabilities|capability]] in the form of [[port]]s, and -[[memory_object]]s, which enable Mach's [[external_pager_mechanism]]. +[[!meta copyright="Copyright © 2002, 2003, 2007, 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]]."]]"""]] + +[[Mach]] is a first-generation [[microkernel]]. + +Mach's basic abstractions include [[virtual_address_space]]s in the form of +[[task]]s, execution contexts in the form of [[thread]]s, [[IPC]], +[[capabilities|capability]] in the form of [[port]]s, and [[memory_object]]s, +which enable Mach's [[external_pager_mechanism]]. + +Controlling [[task]]s, their [[virtual_address_space]], [[thread]]s, and other +system objects in Mach is implemented by using [[port]]s, as opposed to other +[[kernel]]s' [[system_call]] interface: almost all of the Mach API is +implemented by sending [[message]]s to [[port]]s. Device drivers that reside +in kernel space are controlled by ports, too. Mach's [[API]] is well-[[documented|documentation]]. diff --git a/microkernel/mach/documentation.mdwn b/microkernel/mach/documentation.mdwn index fc6e59c2..4c6702aa 100644 --- a/microkernel/mach/documentation.mdwn +++ b/microkernel/mach/documentation.mdwn @@ -6,8 +6,10 @@ 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]]."]]"""]] +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + + * Mach's [[concepts]]. * [*Meet Mach* by James Scott](http://beefchunk.com/documentation/macosx-programming/Meet_Mach.pdf), diff --git a/microkernel/mach/external_pager_mechanism.mdwn b/microkernel/mach/external_pager_mechanism.mdwn index 2040f4ba..e169495a 100644 --- a/microkernel/mach/external_pager_mechanism.mdwn +++ b/microkernel/mach/external_pager_mechanism.mdwn @@ -9,18 +9,16 @@ 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]]."]]"""]] -Mach provides a so-called external pager [[mechanism]]. This +Mach provides a so-called *external pager [[mechanism]]*. This mechanism serves to separate *managing memory* from *managing -content*. Mach does the former while [[user_space]] [[task]]s do the +content*. Mach does the former while user-space processes do the latter. # Introduction -In Mach, a [[task]]'s [[address_space]] consists of references -to [[memory_object]]s. A memory object is [[designated|designation]] using -a [[port]] (a port is just a [[capability]]) and -implemented by a normal [[process]]. +In Mach, a [[task]]'s [[virtual_address_space]] consists of references to +[[memory_object]]s. To associate a memory object with a portion of a task's address space, `vm_map` is invoked on a capability designating @@ -29,7 +27,7 @@ and the offset at which to install it. (The first time a task maps an object, Mach sends an initialization message to the server including a control capability, which it uses to supply pages to the kernel.) This is essentially -the same as mapping a file into an address space on [[Unix]] +the same as mapping a file into an address space on [[UNIX]] using `mmap`. When a task [[faults|page_fault]], Mach checks to see if there is a memory @@ -86,7 +84,7 @@ structures to manage the mapping and then invokes the mappings in the client's address space and then replies to the `vm_map` RPC indicating success. -There is nothing stopping others from playing "the kernel." This is +There is nothing stopping others from playing *the kernel*. This is not a security problem: clients must [[trust]] the server from whom they obtain memory objects and also the servers with whom they share the object. Multiple memory managers are a reality that should be diff --git a/microkernel/mach/ipc.mdwn b/microkernel/mach/ipc.mdwn index aaf3ba23..1bb44b59 100644 --- a/microkernel/mach/ipc.mdwn +++ b/microkernel/mach/ipc.mdwn @@ -1,22 +1,21 @@ -[[!meta copyright="Copyright © 2007, 2008 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2007, 2008, 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]]."]]"""]] +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] -[[General_information|/ipc]] about IPC. +Read about the [[general concept of *inter-process communication* (IPC)|/ipc]]. -An IPC is sent by invoking a [[port]]. +On Mach, an IPC is done by invoking a [[port]]. + +The two fundamental operations, to *send* and *receive* [[message]]s, are used +to implement a [[RPC]] system. [[Sequence_numbering]]. [The Unofficial GNU Mach IPC beginner's guide](http://www.nongnu.org/hurdextras/ipc_guide/ipc_guide.html) - -# See Also - -* [[RPC]] diff --git a/microkernel/mach/memory_object.mdwn b/microkernel/mach/memory_object.mdwn new file mode 100644 index 00000000..2342145c --- /dev/null +++ b/microkernel/mach/memory_object.mdwn @@ -0,0 +1,31 @@ +[[!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]]."]]"""]] + +Mach's [[virtual_memory]] subsystem uses *memory objects* for supplying the +content of regions of virtual memory in an [[virtual_address_space]]. + +All of these objects are managed by *memory manager*s, that are also called +*pager*s. These can be implemented as user-space processes. + +Both the memory objects, and their managers are kernel objects, and are +accessed by [[port]]s. + +A system's physical memory is conceived as a *memory cache* that contains +*memory cache objects*. So when a [[thread]] accesses a page in its task's +address space, the memory object that includes this page is *cached* in the +memory cache. Memory objects are [[paged out and paged +in|external_pager_mechanism]] by the aforementioned memory managers. The +decision when they should be paged in or paged out is left to [[Mach]]. Each +memory object has an ordered list of memory managers that provide paging. The +last one tried is the *default memory manager* that resides in the microkernel, +in contrast to most of the others. The default memory manager is needed +because the microkernel can't wait infinitely for someone else to free the +memory cache: it just calls the next memory manager hoping it to succeed. diff --git a/microkernel/mach/message.mdwn b/microkernel/mach/message.mdwn new file mode 100644 index 00000000..ba47671e --- /dev/null +++ b/microkernel/mach/message.mdwn @@ -0,0 +1,31 @@ +[[!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]]."]]"""]] + +*Messages* are collections of typed data, with a defined layout. + +They are used for [[IPC]], and are sent to and received from [[port]]s. + +These messages are not only opaque data. They can also contain [[port +rights|port]] to be passed to another [[task]]. Port rights are either +*copied* or *moved*. Notice that port receive right must be moved but not +copied because there can't be more than one task that holds the receive right +to a port. The receiving task creates new local port name to the port rights +it received. + +Some data in the message can be *out-of-line data*. In the message, these are +*references* to memory regions ([[memory_object]]s) that are *virtually +copied*. When the message is received in a task, these virtual copies become +part of the task by mapping them into the receiver's [[virtual_address_space]]. +Another key concept that is applied is using *copy-on-write*, which means that +data is not copied immediately, but only when it is changed. This is primarily +used to send large blocks of data efficiently, as it is too expensive to store +them in the kernel address space: extra copied need only be made at the moment +that the memory regions begin to diverge, by threads modifying them. diff --git a/microkernel/mach/mig.mdwn b/microkernel/mach/mig.mdwn index 4275a4b4..331b3bf4 100644 --- a/microkernel/mach/mig.mdwn +++ b/microkernel/mach/mig.mdwn @@ -1,21 +1,34 @@ -[[!meta copyright="Copyright © 2001, 2002, 2003, 2006, 2007, 2008 Free Software -Foundation, Inc."]] +[[!meta copyright="Copyright © 2001, 2002, 2003, 2006, 2007, 2008, 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]]."]]"""]] +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] -The Mach Interface Generator (MIG) is an [[IDL]] compiler. Based on an -interface definition, it creates stubs to [[invoke]] object methods -and to demultiplex incoming messages. These stubs conveniently hide -the details of Mach's [[IPC]] machinery and make it easy to implement -and use Mach [[interface]]s as [[remote_procedure_calls_(RPC)|rpc]]. +The *Mach Interface Generator* (*MIG*) is an [[IDL]] compiler. Based on an +interface definition, it creates stub code to [[invoke]] object methods and to +demultiplex incoming messages. These stub functions conveniently hide the +details of Mach's [[IPC]] and [[port]] machinery and make it easy to implement +and use Mach [[interface]]s as [[remote procedure calls (RPC)|rpc]]: by using +the stub functions, the client programs can call remote procedures more or less +like any other C function. + +These functions encode arguments into [[message]]s' format (*marshalling*), +wait for a result on a newly created [[reply port|port]], decode return +arguments from the reply message (*demarshalling*, or *unmarshalling*) and pass +them to the client program. Similar actions are provided in the skeletons that +are linked to server programs. + +MIG allows very precise semantics to be specified about what the arguments are +and how to be passed. + + + * [[Documentation]] -* [[Documentation]] # Implementations diff --git a/microkernel/mach/mig/documentation.mdwn b/microkernel/mach/mig/documentation.mdwn index be762960..7d4f1eca 100644 --- a/microkernel/mach/mig/documentation.mdwn +++ b/microkernel/mach/mig/documentation.mdwn @@ -1,13 +1,13 @@ -[[!meta copyright="Copyright © 2002, 2003, 2005, 2007, 2008, 2009 Free Software -Foundation, Inc."]] +[[!meta copyright="Copyright © 2002, 2003, 2005, 2007, 2008, 2009, 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]]."]]"""]] +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] This is a small collection of links to external documents describing the *Mach Interface Generator* used by GNU Mach. @@ -17,7 +17,7 @@ Interface Generator* used by GNU Mach. A tutorial which demonstrates the use of the C Threads library primitives in writing a multithreaded program and the use of the Mach Interface Generator -(MIG) to generate remote procedure calls for interprocess communication. Like +(MIG) to generate remote procedure calls for inter-process communication. Like its companion tutorial, it is based on the Mach 2.5 system. However, the concepts are applicable to Mach 3.0 user level programming. @@ -41,9 +41,9 @@ Slides to Rich Drave's talk on MIG, on November 21, 1991: Mig is an implementation of a subset of the Matchmaker **language**. "Matchmaker is a language for specifying and automating the generation of -multilingual interprocess communication interfaces. MIG is an interim +multilingual inter-process communication interfaces. MIG is an interim implementation of a subset of the Matchmaker language that generates C and C++ -remote procedure call interfaces for interprocess communication between Mach +remote procedure call interfaces for inter-process communication between Mach tasks." Richard P. Draves, Michael B. Jones, Mary R. Thompson, *MIG - THE MACH diff --git a/microkernel/mach/mig/gnu_mig.mdwn b/microkernel/mach/mig/gnu_mig.mdwn index 1bcbd545..0de1bd67 100644 --- a/microkernel/mach/mig/gnu_mig.mdwn +++ b/microkernel/mach/mig/gnu_mig.mdwn @@ -1,13 +1,13 @@ -[[!meta copyright="Copyright © 2001, 2006, 2008, 2009 Free Software Foundation, -Inc."]] +[[!meta copyright="Copyright © 2001, 2006, 2008, 2009, 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]]."]]"""]] +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] GNU MIG is the GNU distribution of the [[Mach_3.0_interface_generator_*MIG*|mig]], as maintained by the GNU Hurd @@ -20,5 +20,9 @@ software in the GNU system that uses Mach-based GNU MIG is fully compatible with [[OSF_MIG|mig]]. +Like its predecessor, it can only generate C code, that has to be compiled and +linked to client and server programs respectively ([[!taglink +open_issue_mig]]). + * [[Building]] - building (and obtaining) GNU MIG * [[Open Issues|tag/open_issue_mig]] diff --git a/microkernel/mach/port.mdwn b/microkernel/mach/port.mdwn index af4a0c8d..ba2e22c2 100644 --- a/microkernel/mach/port.mdwn +++ b/microkernel/mach/port.mdwn @@ -1,41 +1,85 @@ -[[!meta copyright="Copyright © 2007, 2008 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2002, 2003, 2007, 2008, 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]]."]]"""]] - -Mach ports are [[capabilities|capability]]. - -A Mach port is a kernel queue. Each port has associated with -it a receive right and one or more send and send-once rights. -A queue can hold a number of messages. Once the queue is full, -the send blocks until their is space to enqueue the message -(this is interruptible via a timeout mechanism). - -A receive right designates a queue and authorizes the holder to -dequeue messages from the queue, and to create send and send-once -rights. - -Send and send-once rights designate a queue and authorize the -hold to enqueue messages (in the case of a send-once right, -a single message). Enqueuing a message is equivalent to -[[invoke|invoking]] a capability. - -Send and receive rights are named using local names. Each -task has associated with it a port [[address_space]]. A ports -are addressed via this table. Each task thus has its own -private [[naming_context]] for ports. - -Ports can be [[delegate]]d in an [[IPC]] message. When the -receiver dequeues the message, the right is made available -to it. - -A [[thread]] can only block receiving on a single port. To work -around this, the concept of a port set was introduced. A receive -right can be added to (at most) one port set. When a thread -receives from a port set, it dequeues from any of the ports that -has a message available. +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[Mach]] *port*s are [[capabilities|capability]], and are also essentially +similar to [[UNIX]] pipes. They are communication channels, implemented by +kernel queues. + +Each port has associated with it one *receive right* and one or more *send +right*s and *send-once right*s. That is, there is one receiver and one or more +senders -- a unidirectional communication channel. Only with the corresponding +port right, access to a port is possible; this is enforced by Mach. + +The kernel queue can hold a number of [[message]]s. Once the queue is full, +the send blocks until there is space to enqueue the message (this is +interruptible via a timeout mechanism). + +A receive right [[designates|designation]] a queue and authorizes the holder to +dequeue messages from the queue, and to create send and send-once rights. + +Send and send-once rights designate a queue and authorize the hold to enqueue +messages (in the case of a send-once right, a single message). Enqueuing a +message is equivalent to [[invoke|invoking]] a capability. + +Ports are automatically destroyed when there is no associated port right to +them. + +Mach knows what port rights belong to each task, but [[thread]]s that running +in the context of a task refer to ports by means of send and receive rights +that are named using local *port names*. These port names are plain integers, +like [[UNIX file descriptors|unix/file_descriptor]]. Only these local names +can be used by [[thread]]s for invoking operations on ports, threads do not +deal with port rights directly. + +For that, each task has associated with it a *port address_space*, or *port +name space*. All ports are addressed via this table. Each task thus has its +own private [[naming_context]] for port rights. + +So, the picture is that after obtaining a port send right, the client uses a +port name to send [[message]]s to the port, or exactly one message if it's a +send-once right. These messages are (probably) queued and when the server task +tries to receive messages by having a [[thread]] use its port receive right, it +gets the message(s). This is called [[IPC]]. + +Port rights themselvse can be [[delegate]]d in a [[message]], too. When the +receiver dequeues the message, the right is made available to it. + +The delivery of [[message]]s is reliable and strictly ordered. When a +[[thread]] sends messages *1* and *2*, it is guaranteed that the receiving +[[task]] will catch them in the same order. Of course, there can be +intermediate messages that are sent by other threads. + +Ports are objects that are implemented by the [[kernel]], and they are +kernel-protected resources. There is no way for a [[task]] to do anything with +a port unless it have corresponding port right. + +Due to this, ports are globally unique. This makes them ideal for constituting +system-wide *object references*. For example, the [[RPC]] system as used by +the GNU Hurd works by invoking *methods* on such object references. The +available methods are defined in [[hurd/interface]] files, and are processes by +the [[MIG]] tool. + +Invoking an operation on a port does not transfer the current execution control +to the receiver, but instead is an asynchronous operation. For this, and +especially in a [[RPC]] system, the sender may include a *reply port* using a +send-once right, and synchronize (block) on that one. + +A [[thread]] can only block receiving on a single port. To work around this, +the concept of a *port set* was introduced. A receive right can be added to +(at most) one port set. These port sets look like port receive rights, but +cannot be passed to other tasks, and there are additional operations for adding +and removing port receive rights. + +When a server process' thread receives from a port set, it dequeues exactly one +message from any of the ports that has a message available in its queue. + +This concept of port sets is also the facility that makes convenient +implementation of [[UNIX]]'s `select` [[system_call]] possible. diff --git a/microkernel/mach/rpc.mdwn b/microkernel/mach/rpc.mdwn index 72acfaa0..60275a86 100644 --- a/microkernel/mach/rpc.mdwn +++ b/microkernel/mach/rpc.mdwn @@ -1,15 +1,21 @@ -[[!meta copyright="Copyright © 2007, 2008 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2002, 2003, 2007, 2008, 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]]."]]"""]] +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] -[[General_information|/rpc]] about RPC. +Read about the [[general concept of a *remote procedure call* (RPC)|/rpc]]. Uses Mach's [[IPC]] [[mechanism]]. -Stub code generated by [[MIG]]. +The [[port]] abstraction allows RPCs to be executed on another computer +transparently. This can be implemented with user [[task]]s, but there is an +implementation in the kernel possible, too, which is called *NORMA*, but is not +avilable in [[GNU Mach|gnumach]]. + +The RPC stub code generated by [[MIG]]. diff --git a/microkernel/mach/task.mdwn b/microkernel/mach/task.mdwn new file mode 100644 index 00000000..c03c6a14 --- /dev/null +++ b/microkernel/mach/task.mdwn @@ -0,0 +1,23 @@ +[[!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 *task* is a collection of resources, a [[virtual_address_space]], and a +[[port name space|port]]. They depend on [[thread]]s for executing program +code: a task alone has no means to do so. + +Switching from one task to another one involves doing a *context switch*, which +is usually not a cheap operation, as it involves switching the hardware's idea +of the memory layout ([[virtual_address_space]]), amongst others. + +Mach tasks are distinct from [[UNIX processes|unix/process]] in that they +provide less facilities. In processes, there are [[unix/signal]]s, process / +group / session IDs, [[unix/file_descriptor]]s and many other things. Tasks +are used for resource allocation and sharing; they are *resource container*s. 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. [[!tag open_issue_documentation]] (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]]. diff --git a/microkernel/mach/virtual_address_space.mdwn b/microkernel/mach/virtual_address_space.mdwn new file mode 100644 index 00000000..97bc5f6b --- /dev/null +++ b/microkernel/mach/virtual_address_space.mdwn @@ -0,0 +1,36 @@ +[[!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]]."]]"""]] + +*Virtual address space*s in Mach define the valid virtual addresses that can be +used by [[thread]]s under execution in the [[task]] that owns that address +space. Each task has only one address space and each address space belongs to +only one task. So when we want to name an address space (for example, in the +Mach API) we name it by the task it belongs to. + +These address spaces are divided into *pages*. Each page has individual +properties like *access rights* (*read* / *write* / *execute*), *inheritance +attributes* (*no inheritance* / *copy* / *share*) and some other system +properties. Page manipulation is optimized to help moving large blocks of data +from one address space to another, for example when one thread provides data to +another thread -- *client / server* technology. + +Memory ranges of pages that can be controlled as a whole are called +*[[memory_object]]*s. + +*Wired pages* are those that cannot be [[paged out|external_pager_mechanism]]. +For example, Mach itself is a task with its own address space and threads, and +all of its pages are wired. + +*Precious pages* are those that must not be discarded silently when they are +clean and memory is needed. For example, a memory manager that shares memory +across a network could not restore a page if it is silently discarded because +it is unmodified. This is not valid for the well-known [[pager +managers|external_pager_mechanism]] that use disks as backing store. -- cgit v1.2.3 From e08610c5572f80bb148b2155cf18c8b8bc6c7e5f Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 15 Dec 2010 22:29:07 +0100 Subject: microkernel/mach/continuation: New. --- microkernel/mach/continuation.mdwn | 24 ++++++++++++++++++++++++ open_issues/multithreading.mdwn | 3 +++ 2 files changed, 27 insertions(+) create mode 100644 microkernel/mach/continuation.mdwn (limited to 'microkernel') diff --git a/microkernel/mach/continuation.mdwn b/microkernel/mach/continuation.mdwn new file mode 100644 index 00000000..7a3267f3 --- /dev/null +++ b/microkernel/mach/continuation.mdwn @@ -0,0 +1,24 @@ +[[!meta copyright="Copyright © 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]]."]]"""]] + +[[Mach]] internally uses *continuation*s for kernel [[thread]] management. + +The advantage is that not a full kernel thread stack has to be preserved in +case that a thread is about to enter a blocking state. This saves space. It +is not clear this is still worthwhile given today's RAM offerings. (How many +kernel threads are there, typically?) + +And, this would no longer be possible in case Mach were be made a +[[preemptive|preemtion]] kernel. In the latter case, the kernel itself, that +is, kernel threads can be preempted, and then their full state needs to be +preserved. + +[[!tag open_issue_documentation]] diff --git a/open_issues/multithreading.mdwn b/open_issues/multithreading.mdwn index 170734fd..39203333 100644 --- a/open_issues/multithreading.mdwn +++ b/open_issues/multithreading.mdwn @@ -22,6 +22,9 @@ Alternative approaches: * Continuation-passing style + * [[microkernel/Mach]] internally [[uses + continuations|microkernel/mach/continuation]], too. + * [[Erlang-style_parallelism]] * [libtcr - Threaded Coroutine Library](http://oss.linbit.com/libtcr/) -- cgit v1.2.3 From 17d02618ae3ad154e789f7ebe66d0cdfafcb0ef6 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 21 Dec 2010 11:37:09 +0100 Subject: microkernel/mach: Mach OSF books. --- community/meetings/debconf10.mdwn | 8 ++-- microkernel/mach.mdwn | 73 +++++++++++++++++++++++++++++++++---- microkernel/mach/concepts.mdwn | 8 ++++ microkernel/mach/documentation.mdwn | 10 +++-- 4 files changed, 84 insertions(+), 15 deletions(-) (limited to 'microkernel') diff --git a/community/meetings/debconf10.mdwn b/community/meetings/debconf10.mdwn index 261686cc..3b83a8cc 100644 --- a/community/meetings/debconf10.mdwn +++ b/community/meetings/debconf10.mdwn @@ -19,9 +19,9 @@ License|/fdl]]."]]"""]] banck_hurd: - "presentation (including video) by Michael Banck: [*Debian GNU/Hurd -- Past. - Present. And - Future?*](http://penta.debconf.org/dc10_schedule/events/595.en.html) - ([slides](http://people.debian.org/~mbanck/debian-hurd.pdf))" + "presentation (including video) by Michael Banck: [*Debian GNU/Hurd -- Past. + Present. And + Future?*](http://penta.debconf.org/dc10_schedule/events/595.en.html) + ([slides](http://people.debian.org/~mbanck/debian-hurd.pdf))" """]] diff --git a/microkernel/mach.mdwn b/microkernel/mach.mdwn index 39d0f4d2..93d8ff06 100644 --- a/microkernel/mach.mdwn +++ b/microkernel/mach.mdwn @@ -1,16 +1,75 @@ +[[!meta copyright="Copyright © 2007, 2008, 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]]."]]"""]] + Mach is a so-called first generation [[microkernel]]. It is the microkernel currently used by the [[Hurd]]. -* [[Documentation]] -* [[Concepts]] -* [[History]] ([Torvalds, Tanenbaum Debate](http://www.dina.dk/~abraham/Linus_vs_Tanenbaum.html)) + * [[Concepts]] + + * [[Documentation]] + + * [[History]] + + * [Torvalds, Tanenbaum + Debate](http://www.dina.dk/~abraham/Linus_vs_Tanenbaum.html) + # Implementations -* [[GNU_Mach|gnumach]] -* [[Mach/OskitMach]] - A Once Successor of Mach based on OSKit -* [Apple's Darwin](http://developer.apple.com/darwin/) ([API](http://developer.apple.com/documentation/Darwin/Conceptual/KernelProgramming/index.html)) (**non-free**) + * [[GNU_Mach|gnumach]] + + * [Apple's Darwin](http://developer.apple.com/darwin/) + ([API](http://developer.apple.com/documentation/Darwin/Conceptual/KernelProgramming/index.html)) + (**non-free**) + # Related -* [[Mach_Interface_Generator_(MIG)|mig]] + * [[Mach_Interface_Generator_(MIG)|mig]] + + +[[!ymlfront data=""" + +kernel_interface: + + "Mach 3 Kernel Interfaces. Open Software Foundation and Carnegie Mellon + University. Keith Loepere, Editor. NORMA-MK12: July 15, 1992. [\[ps, + HTTP\]](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/kernel_interface.ps), + [\[ps, + FTP\]](ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/kernel_interface.ps)." + +kernel_principles: + + "Mach 3 Kernel Principles. Open Software Foundation and Carnegie Mellon + University. Keith Loepere. NORMA-MK12: July 15, 1992. [\[ps, + HTTP\]](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/kernel_principles.ps), + [\[ps, + FTP\]](ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/kernel_principles.ps)." + +server_interface: + + "Mach 3 Server Writer’s Interfaces. Open Software Foundation and Carnegie + Mellon University. Keith Loepere, Editor. NORMA-MK12, user15: July 15, + 1992. [\[ps, + HTTP\]](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/server_interface.ps), + [\[ps, + FTP\]](ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/server_interface.ps)." + +server_writer: + + "Mach 3 Server Writer’s Guide. Open Software Foundation and Carnegie Mellon + University. Keith Loepere, Editor. NORMA-MK12, user15: July 15, 1992. + [\[ps, + HTTP\]](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/server_writer.ps), + [\[ps, + FTP\]](ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/server_writer.ps)." + +"""]] diff --git a/microkernel/mach/concepts.mdwn b/microkernel/mach/concepts.mdwn index a9e8897d..0f7cbf00 100644 --- a/microkernel/mach/concepts.mdwn +++ b/microkernel/mach/concepts.mdwn @@ -23,3 +23,11 @@ implemented by sending [[message]]s to [[port]]s. Device drivers that reside in kernel space are controlled by ports, too. Mach's [[API]] is well-[[documented|documentation]]. + +[[!toggleable id=mach_kernel_principles text="""[[!template id=note +text="*[[mach\_kernel\_principles|documentation]]*: +{{$mach#kernel_principles}}"]]"""]] + +In particular the [[!toggle id=mach_kernel_principles +text="[mach\_kernel\_principles]"]] book further elaborates on Mach's concepts +and principles. diff --git a/microkernel/mach/documentation.mdwn b/microkernel/mach/documentation.mdwn index 4c6702aa..4bd712c9 100644 --- a/microkernel/mach/documentation.mdwn +++ b/microkernel/mach/documentation.mdwn @@ -17,11 +17,13 @@ License|/fdl]]."]]"""]] * *[[The_GNU_Mach_Reference_Manual|gnumach/reference_manual]]*. - - OSF's [Kernel Interface (ps)](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/kernel_interface.ps) - [Kernel Interface (pdf)](http://shakthimaan.com/downloads/hurd/kernel_interface.pdf) + * {{$mach#kernel_principles}} - - OSF's [Kernel Principles (ps)](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/kernel_principles.ps) - [Kernel Principles (pdf)](http://shakthimaan.com/downloads/hurd/kernel_principles.pdf) + * {{$mach#kernel_interface}} + + * {{$mach#server_writer}} + + * {{$mach#server_interface}} * [*The Unofficial GNU Mach IPC beginner's guide*](http://hurdextras.nongnu.org/ipc_guide/), an easy introduction to -- cgit v1.2.3 From 2707251d04c59ce44048209d9d47737dd31e793c Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 21 Dec 2010 11:40:42 +0100 Subject: microkernel/barrelfish: New. --- microkernel.mdwn | 2 ++ microkernel/barrelfish.mdwn | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 microkernel/barrelfish.mdwn (limited to 'microkernel') diff --git a/microkernel.mdwn b/microkernel.mdwn index 17344689..edefddb7 100644 --- a/microkernel.mdwn +++ b/microkernel.mdwn @@ -50,4 +50,6 @@ A 2002 article about [[microkernel_FUD|FUD]] (Fear, Uncertainty, Doubt). * [[L4]] + * [[Barrelfish]] + * [[Viengoos]] diff --git a/microkernel/barrelfish.mdwn b/microkernel/barrelfish.mdwn new file mode 100644 index 00000000..8cf5591b --- /dev/null +++ b/microkernel/barrelfish.mdwn @@ -0,0 +1,24 @@ +[[!meta copyright="Copyright © 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]]."]]"""]] + + + + * {{$fof_plos09}} + + +[[!ymlfront data=""" + +fof_plos09: + + "Pierre-Evariste Dagand, Andrew Baumann, Timothy Roscoe. Filet-o-Fish: + practical and dependable domain-specific languages for OS development. PLOS + '09, October 11, 2009, Big Sky, Montana, USA." + +"""]] -- cgit v1.2.3 From eb383acc9c9cbc41bba971d3274843f9fc2f3816 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 21 Dec 2010 11:41:13 +0100 Subject: open_issues/resource_management_problems: Elaborate. --- microkernel/l4.mdwn | 14 +++++++++ open_issues/resource_management_problems.mdwn | 44 ++++++++++++++++++++++++--- 2 files changed, 53 insertions(+), 5 deletions(-) (limited to 'microkernel') diff --git a/microkernel/l4.mdwn b/microkernel/l4.mdwn index 970407be..45929842 100644 --- a/microkernel/l4.mdwn +++ b/microkernel/l4.mdwn @@ -18,4 +18,18 @@ switching, and little else. See [l4.verified](http://nicta.com.au/research/projects/l4.verified) for work on formally verifying an L4 microkernel. + * {{$sel4}} + There was a GNU/Hurd [[history/port_to_L4]], which is now stalled. + + +[[!ymlfront data=""" + +sel4: + + "G. Klein, K. Elphinstone, G. Heiser, J. Andronick, D. Cock, P. Derrin, + D. Elkaduwe, K. Engelhardt, R. Kolanski, M. Norrish, T. Sewell, H. Tuch, and + S. Winwood. seL4: Formal verification of an OS kernel. In Proceedings of + the ACM Symposium on OS Principles, Big Sky, MT, USA, October 2009." + +"""]] diff --git a/open_issues/resource_management_problems.mdwn b/open_issues/resource_management_problems.mdwn index 1723d7d3..3a36514e 100644 --- a/open_issues/resource_management_problems.mdwn +++ b/open_issues/resource_management_problems.mdwn @@ -6,8 +6,8 @@ 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]]."]]"""]] +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] [[!tag open_issue_gnumach open_issue_hurd open_issue_viengoos]] @@ -22,8 +22,42 @@ These issues are what Neal Walfield is working on with his new kernel [[microkernel/viengoos]]. -# Examples +# Kernel - * [[configure max command line length]] +Inside the [[kernel]], there is commonly a need to allocate resources according +to externally induced demand, dynamically. For example, for memory-management +data structures (page tables), process table entries, thread control blocks, +[[capability]] tables, incoming network packages, blocks that are read in from +disk, the keyboard type-ahead buffer for a in-kernel keyboard driver. Some of +these are due to actions driven by user-space requests, others are due to +actions internal to the the kernel itself. Some of these buffers can be sized +statically (keyboard type-ahead buffer), and are thus unproblematic. Others +are not, and should thus be attributed to their user space entities. In the +latter (ideal) case, all resources -- that is, including those needed inside +the kernel -- that a user space task needs for execution are provided by itself +(and, in turn, provided by its parent / principal), and the kernel itself does +not need to allocate any resources dynamically out of an its own memory pool. +This avoids issues like [[microkernel/Mach]]'s [[zalloc_panics]] upon user +space processes allocating too many [[microkernel/mach/port]]s, for example. + +[[!toggleable id=fof_plos09 text="""[[!template id=note +text="*[[fof\_plos09|microkernel/barrelfish]]*: +{{$microkernel/barrelfish#fof_plos09}}"]]"""]] + +[[!toggleable id=sel4 text="""[[!template id=note +text="[[*sel4*|microkernel/l4]]: {{$microkernel/l4#sel4}}"]]"""]] + +In [[!toggle id=fof_plos09 text="[fof\_plos09]"]], the authors describe in +section 3 how they model their [[capability]] system according to [[!toggle +id=sel4 text="[sel4]"]] using a *retype* operation that *takes an existing +capability and produces one or more derived capabilities [...] used to create +new kernel-level memory objects (such as page tables or execution contexts) +from capabilities to raw regions of RAM*. - * [[zalloc_panics]] +This is, of course, non-trivial to implement, and also requires changing the +[[RPC]] interfaces, for example, but it is a valid approach, a research topic. + + +# Further Examples + + * [[configure max command line length]] -- cgit v1.2.3 From a5e3b5aeb7483586885f927bdb98a423e1531938 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 21 Dec 2010 13:40:29 +0100 Subject: microkernel/mach: Two more Mach papers. --- microkernel/mach.mdwn | 51 +++++++++++++++++--------- microkernel/mach/documentation.mdwn | 4 ++ microkernel/mach/external_pager_mechanism.mdwn | 3 ++ 3 files changed, 41 insertions(+), 17 deletions(-) (limited to 'microkernel') diff --git a/microkernel/mach.mdwn b/microkernel/mach.mdwn index 93d8ff06..deaf6788 100644 --- a/microkernel/mach.mdwn +++ b/microkernel/mach.mdwn @@ -38,38 +38,55 @@ microkernel currently used by the [[Hurd]]. [[!ymlfront data=""" +kernel_foundation_unix: + + "M. Accetta, R. Baron, W. Bolosky, D. Golub, R. Rashid, A. Tevanian, and + M. Young, Mach: A New Kernel Foundation for UNIX Development, USENIX + Conference Proceedings, July 1986. Paper + [\[pdf\]](http://www.cs.toronto.edu/~demke/469F.06/Handouts/mach_usenix86.pdf)." + kernel_interface: "Mach 3 Kernel Interfaces. Open Software Foundation and Carnegie Mellon - University. Keith Loepere, Editor. NORMA-MK12: July 15, 1992. [\[ps, - HTTP\]](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/kernel_interface.ps), - [\[ps, - FTP\]](ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/kernel_interface.ps)." + University. Keith Loepere, Editor. NORMA-MK12: July 15, 1992. Book [\[ps + (HTTP)\]](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/kernel_interface.ps), + [\[ps + (FTP)\]](ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/kernel_interface.ps)." kernel_principles: "Mach 3 Kernel Principles. Open Software Foundation and Carnegie Mellon - University. Keith Loepere. NORMA-MK12: July 15, 1992. [\[ps, - HTTP\]](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/kernel_principles.ps), - [\[ps, - FTP\]](ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/kernel_principles.ps)." + University. Keith Loepere. NORMA-MK12: July 15, 1992. Book [\[ps + (HTTP)\]](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/kernel_principles.ps), + [\[ps + (FTP)\]](ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/kernel_principles.ps)." server_interface: "Mach 3 Server Writer’s Interfaces. Open Software Foundation and Carnegie Mellon University. Keith Loepere, Editor. NORMA-MK12, user15: July 15, - 1992. [\[ps, - HTTP\]](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/server_interface.ps), - [\[ps, - FTP\]](ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/server_interface.ps)." + 1992. Book [\[ps + (HTTP)\]](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/server_interface.ps), + [\[ps + (FTP)\]](ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/server_interface.ps)." server_writer: "Mach 3 Server Writer’s Guide. Open Software Foundation and Carnegie Mellon - University. Keith Loepere, Editor. NORMA-MK12, user15: July 15, 1992. - [\[ps, - HTTP\]](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/server_writer.ps), - [\[ps, - FTP\]](ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/server_writer.ps)." + University. Keith Loepere, Editor. NORMA-MK12, user15: July 15, 1992. Book + [\[ps + (HTTP)\]](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/server_writer.ps), + [\[ps + (FTP)\]](ftp://ftp.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/server_writer.ps)." + +vm: + + "R. Rashid, A. Tevanian, M. Young, D. Golub, and R. Baron, + Machine-Independent Virtual Memory Management for Paged Uniprocessor and + Multiprocessor Architectures, 2nd ACM Symposium on Architectural Support for + Programming Languages and Operating Systems (ASPLOS), October 1987. Paper + [\[pdf\]](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.111.7918&rep=rep1&type=pdf), + presentation + [\[ppt\]](http://www2.cs.uh.edu/~paris/6360/PowerPoint/Mach.ppt)." """]] diff --git a/microkernel/mach/documentation.mdwn b/microkernel/mach/documentation.mdwn index 4bd712c9..cc880ab6 100644 --- a/microkernel/mach/documentation.mdwn +++ b/microkernel/mach/documentation.mdwn @@ -17,6 +17,10 @@ License|/fdl]]."]]"""]] * *[[The_GNU_Mach_Reference_Manual|gnumach/reference_manual]]*. + * {{$mach#kernel_foundation_unix}} + + * {{$mach#vm}} + * {{$mach#kernel_principles}} * {{$mach#kernel_interface}} diff --git a/microkernel/mach/external_pager_mechanism.mdwn b/microkernel/mach/external_pager_mechanism.mdwn index e169495a..d9b6c2c8 100644 --- a/microkernel/mach/external_pager_mechanism.mdwn +++ b/microkernel/mach/external_pager_mechanism.mdwn @@ -14,6 +14,9 @@ mechanism serves to separate *managing memory* from *managing content*. Mach does the former while user-space processes do the latter. +[[!tag open_issue_documentation]] + # Introduction -- cgit v1.2.3