summaryrefslogtreecommitdiff
path: root/microkernel/mach/mig/documentation.mdwn
blob: 07299d48f343c8e44326babb71a7aa73d513457c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
[[!meta copyright="Copyright © 2002, 2003, 2005, 2007, 2008, 2009, 2010, 2013,
2014 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]]."]]"""]]

This is a small collection of links to external documents describing the *Mach
Interface Generator* used by GNU Mach.


# MIG and C Thread Programming

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 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.

Linda R. Walmer and Mary R. Thompson.  *A Programmer's Guide to the Mach User
Environment*.  [PostScript
](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/unpublished/machuse.ps),
[Doc](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/unpublished/machuse.doc).
February 1988.  School of Computer Science, Carnegie Mellon University.

An ftp directory containing the [mig programming
examples](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/unpublished/mig_example)
for this tutorial.

Slides to Rich Drave's talk on MIG, on November 21, 1991:
[PostScript](http://www.cs.cmu.edu//afs/cs/project/mach/public/doc/unpublished/internals_slides/Mig/root.ps),
[TeX](http://www.cs.cmu.edu//afs/cs/project/mach/public/doc/unpublished/internals_slides/Mig/slides.tex).


# Roots

Mig is an implementation of a subset of the Matchmaker **language**.

"Matchmaker is a language for specifying and automating the generation of
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 inter-process communication between Mach
tasks."

Richard P. Draves, Michael B. Jones, Mary R. Thompson, *MIG - THE MACH
INTERFACE GENERATOR*.
[ps](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/unpublished/mig.ps),
[doc](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/unpublished/mig.doc).
November 1989.  Department of Computer Science, Carnegie-Mellon University.


# Related Work

See the citations about [Mach and matchmaker: kernel and language support for
objectoriented distributed
systems](http://citeseer.ist.psu.edu/context/93073/0). "M. B. Jones and
R. F. Rashid, *Mach and matchmaker: kernel and language support for
objectoriented distributed systems*, Proceedings of the Conference on
Object-Oriented Programming Systems, Languages, and Applications, October 1986,
pp. 67--77."


# Further Relevant Documentation

  * The [[GNU_Mach_Reference_Manual|gnumach/reference_manual]], especially
    [Chapter 4, Inter Process
    Communication](http://www.gnu.org/software/hurd/gnumach-doc/Inter-Process-Communication.html).

  * OSF's [Server Writer's Guide (ps)](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/server_writer.ps)
    [Server Writer's Guide (pdf)](http://shakthimaan.com/downloads/hurd/server_writer.pdf)

  * OSF's [Server Writer's Interfaces (ps)](http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/osf/server_interface.ps)
    [Server Writer's Interfaces (pdf)](http://shakthimaan.com/downloads/hurd/server_interface.pdf)

  * Flags:

      * [[dealloc_and_dealloc[]|dealloc]]
      * [[ServerCopy]]

  * MIG *in action*: [[hurd/io_path]].


## IRC, freenode, #hurd, 2013-09-04

[[!tag open_issue_documentation open_issue_mig]]

    <teythoon> btw, I just realized that mig mashes two very different things
      together, namely the serialization/parsing and the message
      sending/receiving
    <braunr> yes
    <teythoon> I'd prefer it if that were separated
    <braunr> me too
    <braunr> that's why i want x15 to have a bare messaging interface .. :)
    <teythoon> \o/
    <braunr> simple (but optimized) scatter-gather
    <braunr> it makes sense for mig since mach messages do include
      serialization metadata such as types


## IRC, freenode, #hurd, 2013-11-01

    <gnu_srs> Is it possible to call server functions from user space? What
      about functions returning MIG_NO_REPLY? 
    <neal> gnu_srs: server functions are only called from user space...
    <neal> gnu_srs: Normally, servers use a server loop.  When an RPC comes it,
      it is processed and the processing returns some values that the server
      loop returns to the client.
    <neal> If the server wants to return the thread to the thread pool without
      responding to the RPC, it uses MIG_NO_REPLY.