home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / mach / doc / notes / micro-kernel.ibm.Z / micro-kernel.ibm
Encoding:
Internet Message Format  |  1993-01-10  |  18.2 KB

  1. Date: Mon, 11 Jan 93 12:38:31 EST
  2.  
  3. This came off some netnews board and is supposed to be from IBM's
  4. OS/2 Developer bboard....  After the first few screenfuls it gives a
  5. pretty good overview of the Mach 3.0 micro-kernel.
  6.  
  7.  
  8. --------------------------------------------------------------------
  9.  
  10.                            M I C R O K E R N E L
  11.  
  12.                             T E C H N O L O G Y
  13.  
  14.  
  15.  
  16.                    "A modular, portable software kernel
  17.                  promising powerful open systems advantages
  18.                    for system developers and end users."
  19.  
  20.  
  21.                                    I B M
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29. MICROKERNEL TECHNOLOGY
  30.  
  31.    Dramatic advances in computing architecture, hardware designs,and
  32. technology have spawned an amazing variety of programming methods, 
  33. user interfaces, development tools, communications techniques and
  34. application software.  Delivering previously unheard of advantages to
  35. end users in performance, service level, and system utility, the
  36. overwhelming diversity of system offerings has also heralded the cry
  37. for "open systems" & "standards".
  38.   
  39.    IBM, long a leader in creating new systems delivering the
  40. broadest range of application capabilities to the widest range of
  41. users, is again committed to developing the new, open, technologies
  42. needed for the next computing decade.
  43.  
  44.    IBM developers have begun to prototype the next generation of 
  45. highly portable systems software, and related applications, around a
  46. microkernel.  A microkernel provides a new way of structuring systems
  47. software to reduce it's complexity and to increase it's portability. 
  48. It presents the potential for building a single, truly open, computing
  49. environment: using a microkernel "core" product executing multiple
  50. diverse operating systems as "applications" on a single hardware
  51. platform.  The promise of microkernel-based system software lies in
  52. providing better ways to cope with the increasing complexity of system
  53. designs, the potential for systems software to be more "in tune" with
  54. the startling leaps forward in processor hardware, and ultimately, the
  55. ability of the end user to select the best available application...  
  56. independent of the available processor.
  57.  
  58.    Systems built using microkernel technology will deliver a new 
  59. standard for modular, portable, operating systems development 
  60. platforms.  Rather than creating a single, monolithic system, 
  61. developers create a set of servers that can be configured in a
  62. variety of ways to provide the target operating system.           (1)
  63.  
  64.     One of the most discussed advances in operating systems in recent 
  65. years, is the microkernel - a small, message-based piece of systems 
  66. software running in the most privileged state of the computer, 
  67. supporting the rest of the operating system as a set of server 
  68. applications.  Interest in microkernels has grown as system developers
  69. have reacted to the complexity of current operating system 
  70. implementations and as the research community has demonstrated the 
  71. feasibility of the microkernel concept.
  72.  
  73.    The Mach microkernel technology developed at Carnegie Mellon 
  74. University serves as the basis for IBM's microkernel work.  On the 
  75. Mach base IBM is experimenting with new ways of implementing low-end 
  76. environments, developing stand-alone file servers, integrating
  77. multiple operating system personalities on a single computer, and 
  78. enabling new ways of delivering DOS execution environments.
  79.  
  80.    By virtue of their size and their ability to support standard 
  81. programming services and features as application programs, micro-
  82. kernels themselves are simpler than standard operating systems.  With 
  83. a microkernel, operating system function is broken down into modular 
  84. pieces that may be configured in a variety of ways, permitting larger 
  85. systems to be built by adding pieces to smaller ones.  Microkernels 
  86. also make it easier to support multiprocessors by creating a standard 
  87. programming environment that can use multiple processors if they are 
  88. present but does not require them.  The specialized code for 
  89. multiprocessors is restricted to the microkernel itself.  Moreover, 
  90. networks of communicating microkernels can be used to provide 
  91. operating system support for the emerging class of massively parallel 
  92. machines.  Since they are small and have relatively little kernel- 
  93. level code to execute, microkernels provide a convenient way to 
  94. support the real-time features needed for multimedia, device control 
  95. and high speed communications.  Finally, well structured microkernels 
  96. provide an insulating layer for hardware differences that are not 
  97. masked by the use of higher level programming languages.  Thus, they 
  98. make porting code easier and increase code reuse.
  99.  
  100.    Current Mach research and development activities include on-going 
  101. research work at Carnegie Mellon, as well as Mach-related work at the 
  102. University of Utah, the University of Arizona and Cornell University. 
  103. The Open Software Foundation Research Institute, building on it's 
  104. previous work and research done at Carnegie Mellon has created a 
  105. version of Mach that supports massively parallel supercomputers. 
  106. There is also work underway at the Center for High Performance 
  107. Computing of Worchester Polytechnic Institute on real-time
  108. extensions and file system servers for a Mach environment.        (2)
  109.  
  110.  
  111.    +------------------------------+  +------------------------------+
  112.    |                              |  |                              |
  113.    |                              |  |                              |
  114.    |    Dominant Personality      |  |     Secondary Personality    |
  115.    |        Applications          |  |          Applications        |
  116.    |                              |  |                              |
  117.    |           (MIC)              |  |             (MIC)            |
  118.    +------------------------------+  +------------------------------+
  119.  
  120.    ==================================================================
  121.                    "True Application"/Server Boundry
  122.    ==================================================================
  123.  
  124.    +------------------------------+  +-------------+  +-------------+
  125.    |                              |  |             |  |             |
  126.    |    Dominant Personality      |  |  Secondary  |  |  Secondary  |
  127.    |           Server             |  | Personality |  | Personality |
  128.    |                              |  |   Server    |  |   Server    |
  129.    |           (MIC)              |  |   (MIC)     |  |   (MIC)     |
  130.    +------------------------------+  +-------------+  +-------------+
  131.  
  132.    ==================================================================
  133.               Personality/Personality-Independent Boundry
  134.    ==================================================================
  135.  
  136.    +--------+  +--------+  +----------+  +---------+     +----------+
  137.    |        |  |        |  |          |  |         |   +-+--------+ |
  138.    | Master |  |  File  |  | Hardware |  | Default |   |  Device  | |
  139.    | Server |  | Server |  | Resource |  |  Pager  |   |  Drivers | |
  140.    |        |  |        |  | Manager  |  |         |   |          | |
  141.    |  (MIC) |  |  (MIC) |  |  (MIC)   |  |  (MIC)  |   |  (DDC)   |-+
  142.    +--------+  +--------+  +----------+  +---------+   +----------+
  143.  
  144.    ==================================================================
  145.                        User/Privileged Boundary
  146.    ==================================================================
  147.  
  148.    +-----------+----------------------------------------+-----------+
  149.    |           |    Enhanced Mach 3.0 Microkernel       |           |
  150.    |           |                                        |           |
  151.    |           |       |               |                |           |
  152.    |  Virtual  |  IPC  |  I/O Support  |   Host and     | Tasks &   |
  153.    |  Memory   |       |  & Interrupts | Processor Sets | Threads   |
  154.    |           |       |               |                |           |
  155.    |   (MIC)   | (MIC) |     (MIC)     |      (MIC)     |   (MIC)   |
  156.    +-----------+-------+---------------+----------------+-----------+
  157.    |   (MDC)   | (MCD) |     (MDC)     |      (MDC)     |   (MDC)   |
  158.    +-----------+-------+---------------+----------------+-----------+
  159.  
  160.                    (MIC) - Machine-Independent Code
  161.                    (DDC) - Device-Dependent Code
  162.                    (MDC) - Machine-Dependent Code                 (3)
  163.  
  164.  
  165. THE MACH ARCHITECTURE
  166.  
  167.    The functions performed by the Mach microkernel itself are limited 
  168. to reduce its size and to maximize the amount of code that runs as an 
  169. application program.  The microkernel includes only those functions 
  170. that are required to define a set of abstract processing environments 
  171. for application programs and to permit applications to work together 
  172. to deliver services and to act as clients and servers.  As a result, 
  173. the microkernel provides only five different types of services.
  174.  
  175.       *  virtual memory management
  176.  
  177.       *  tasks and threads
  178.  
  179.       *  interprocess communications (IPC)
  180.  
  181.       *  I/O support and interrupt management
  182.  
  183.       *  host and processor set services
  184.  
  185.    Other operating system functions such as file systems, device 
  186. support and traditional programming interfaces are placed into one or 
  187. more server application programs.  The enclosed diagram illustrates 
  188. this function split by showing how IBM is using Mach to support an 
  189. experimental low-end version of AIX* for PS/2* and other Intel386* and
  190. Intel486* based hardware.
  191.  
  192.  
  193. MACH TECHNOLOGY OVERVIEW
  194.  
  195.    The virtual memory component of the Mach microkernel supports 
  196. large, paged, sparse address spaces that are composed of memory 
  197. objects.  Each memory object is managed by a memory pager, a task 
  198. outside the kernel that provides the backing storage for the pages of 
  199. the memory object.  Address spaces are manages by mappings or
  200. allocating memory objects within them.  Mach manages memory protection
  201. and sharing on a memory object basis in an abstract way, independent 
  202. of any particular processor address translation hardware.  In 
  203. particular, Mach makes heavy use of copy-on-write to permit programs 
  204. to share memory objects without copying large numbers of pages when a 
  205. new address space accesses the memory object.  New copies of the page 
  206. are created only when a program in one of the address spaces updates 
  207. them.  When Mach takes a page fault in a memory object and does not 
  208. have the page in memory or when it has to remove pages from memory due
  209. to the requirements of other programs executing on the machine, it 
  210. notifies the pager for the memory object in which the fault occurs 
  211. using the IPC mechanism.  It is then up to the pager, an application 
  212. server, to determine how to provide or to store the data.  This 
  213. permits the system to define different semantics for the memory 
  214. objects based on the needs of the programs that use them.  The default
  215. pager shown in the diagram provides a pager for the memory objects
  216. that do not require anything other than the usual semantics of
  217. virtual memory.                                                   (4)
  218.  
  219.    Mach manages the execution environments for the programs by 
  220. providing multiple tasks and threads.  Each Mach task has it's own 
  221. address space, or map.  It assigns memory objects that the task has 
  222. mapped to ranges of addresses within the address space.  The task is 
  223. also the unit of resource allocation and protection in Mach with tasks
  224. being assigned capabilities and access rights to the IPC facilities of
  225. the system.  In order to support parallel execution by a program 
  226. within a single address space, Mach separates the execution 
  227. environment from the actual running of streams of instructions.  The 
  228. streams of computation including the processor resources needed to 
  229. support them are called threads.  Thus, a program can be loaded into a
  230. Mach task and can be executed in several different places in the code 
  231. at the same time on a multiprocessor or parallel machine.  This can 
  232. result in better application performance.
  233.  
  234.    The Mach IPC system provides the basic mechanism that allows 
  235. threads running in different tasks to communicate with each other. 
  236. The IPC system supports the reliable delivery of messages on ports. 
  237. Ports are protected channels between tasks.  Each task that uses a 
  238. port is assigned a set of rights to that port.  These rights may be 
  239. different for different tasks.  Only one task can receive on any port 
  240. although any thread within the task may execute the receive operation. 
  241. One or more tasks may hold rights to send to a port.  The kernel 
  242. permits tasks to use the IPC system to transfer port rights among 
  243. themselves.  It also provides a high performance way of passing large 
  244. data areas in messages.  Rather than copying the data, the message 
  245. contains a pointer to it: this is called a pointer to out-of-line 
  246. data.  When the kernel transfers the message from the sender to the 
  247. receiver, it makes the memory being passed disappear form the sender's
  248. address space and appear in the receiver's address space.  One 
  249. interesting aspect of the Mach is that the microkernel itself is 
  250. structured internally as a task with threads, and most of the Mach 
  251. system services are implemented as IPCs to the kernel rather than as 
  252. direct system calls.
  253.  
  254.    In order to support I/O and device access, the microkernel provides 
  255. access to I/O resources such as memory-mapped devices, I/O ports and 
  256. direct memory access (DMA) channels, as well as the ability to reflect
  257. interrupts to device drivers executing in user space.  Mach has 
  258. services that let privileged programs acquire ownership of devices: 
  259. these programs are typically device driver servers running as 
  260. applications as shown in the diagram.  Since the microkernel must 
  261. field all interrupts (because interrupts are typically delivered into 
  262. the privileged state of the computer and in order to maintain the 
  263. integrity of the system), it has logic that determines whether it 
  264. should process the interrupt or reflect it to a server.  If the 
  265. interrupt is to be reflected to an application, it must have 
  266. registered with the kernel and contain code that waits for the kernel 
  267. to reflect the interrupt.  When the interrupt is reflected, a thread 
  268. in the application begins running to process the interrupt.
  269.                                                                   (5)
  270.  
  271.    Mach's host and processor set features provide two related sets of 
  272. functions that are needed if application programs are to provide most 
  273. operating system services.  The host features return information about
  274. the processor complex running the system and provide certain system 
  275. management functions such as time, date, and system stop and restart. 
  276. The processor set features are used on multiprocessor machines to 
  277. group processors in classes.  These classes permit a parallel 
  278. application to execute multiple threads simultaneously on different 
  279. processors in the same machine so that true parallel execution occurs.
  280.  
  281.    The diagram also shows that Mach carefully splits its 
  282. implementation into code that is completely portable from machine to 
  283. machine and code that is dependent on the particular machine on which 
  284. it is executing.  It also segregates the code that depends on devices 
  285. into the device drivers: however, the device driver code, while 
  286. device-dependent, is not necessarily dependent on the processor 
  287. architecture.  Using multiple threads per task, Mach provides an 
  288. application environment that permits the use of multiprocessors 
  289. without requiring that any particular machine be a multiprocessor: on 
  290. uniprocessors different threads simply run at different times.  All of
  291. the support needed for multiprocessors is concentrated into the 
  292. relatively small and simple microkernel.
  293.  
  294.  
  295. OPERATING SYSTEMS AS APPLICATION SERVERS
  296.  
  297.    Sitting immediately on top of the microkernel are a number of 
  298. application servers that provide general purpose system services. 
  299. These programs are called personality-independent servers since they 
  300. depend only on the microkernel and themselves.  Among the personality-
  301. independent servers are the default pager, the hardware resource 
  302. manager that assigns device hardware to device drivers, the master 
  303. server that loads other personality-independent servers into memory, 
  304. the the device drivers and possibly a general purpose file server. 
  305. The microkernel and the personality-independent servers can be 
  306. packaged as a product separate from any operating system.
  307.  
  308.    Using the services of the microkernel and the 
  309. personality-independent servers, the dominant personality provides a 
  310. standard operating system such as AIX.  Since the dominant personality
  311. is an application server, it is possible to have multiple servers for 
  312. different personalities executing programs written to different 
  313. operating systems running on the machine at the same time.  However, 
  314. there are some operating system services such as error message 
  315. translation that are not provided in the personality-independent 
  316. servers.  Since it is best not to duplicate such services, the dominant
  317. personality provides them not only to its client applications but also
  318. to any other personalities running on the machine.  For instance, the 
  319. low-end AIX implementation on Mach currently runs as a dominant 
  320. personality and supports an environment for running DOS programs
  321. as a secondary personality.                                       (6)
  322.  
  323.  
  324. BENEFITS FOR DEVELOPERS AND USERS
  325.  
  326.    Mach represents enabling technology for system developers rather 
  327. than a revolution for the end user.  The modular, scalable, portable 
  328. environment of Mach permits the system developer to create new system 
  329. functions as applications rather than within the kernel.  It lets 
  330. hardware developers write device drivers as applications and makes 
  331. porting the system to new platforms a relatively small and very well- 
  332. understood job.  But there are some real benefits to the end user. 
  333. The customer now has a choice: applications written to different 
  334. operating systems can execute together on the same machine permitting 
  335. the use of exactly the right set of programs for a particular business
  336. or organization.  Mach reduces the time it takes system developers to 
  337. create new software functions or to use new hardware functions, 
  338. providing the end user with better technology more rapidly than in the
  339. past.  Finally, Mach permits the end user to benefit from the 
  340. emergence of parallel processing and the notions of object-oriented 
  341. programming by providing a system that allows applications to use 
  342. parallelism and that breaks traditional operating systems up into 
  343. modular pieces to which object-oriented implementation techniques can 
  344. be applied.
  345.  
  346.