10
FACULTY AND STAFF 21 O N M ICROKERNELS AND V IRTUAL M ACHINES : T HE L EGACY OF M ACH D uring the early years of Mach, anyone who talked to Rick Rashid soon encountered two ideas that excited him. One was the idea that operating systems had grown too large and complex, and that the time had come to simplify and shrink. The second was the idea that different operating systems offered the same core functionality XQGHUQHDWK D ORW RI VXSHUÀFLDO GLYHUVLW\ DQG LW VKRXOG WKHUHIRUH EH SRVVLEOH WR G\QDPLFDOO\ choose which guise to interact with. Although these two powerful ideas are interrelated in the Mach implementation, it is useful to think of them as distinct concepts from a historical perspective. In the roughly two decades since active research on Mach ended, how have these concepts fared in the marketplace of ideas? What is their intellectual legacy for OS research? Does anyone still care about them? We examine these issues in this brief note. 2. Simplify and Shrink Figure 1 is an excerpt from the earliest publication I found that mentions the microkernel FRQFHSW LQ 0DFK %\ WKH PLGV WKH GRPLQDQW RSHUDWLQJ V\VWHP XVHG E\ DFDGHPLF researchers (Unix) had grown from a small, tightly organized and easily understood code base LQWR D ODUJH DQG XQZLHOG\ ERG\ RI FRGH WKDW ZDV GLIÀFXOW WR XQGHUVWDQG GHEXJ DQG PDLQWDLQ Some of the growth was due to introduction of new functionality such as support for virtual memory and support for networking in the form of the socket interface. Also contributing to size and complexity was the need for portability of the code across many different hardware platforms. The net impact on complexity was multiplicative, not just additive. The Mach MAHADEV SATYANARAYANAN School of Computer Science Carnegie Mellon University

ON MICROKERNELS VIRTUAL MACHINES: THE LEGACY MACHsatya/docdir/satya-rashid-festschrift2012.pdf · months l ater, in late 1995, the entire Workpl ace OS project was cancelled. As with

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ON MICROKERNELS VIRTUAL MACHINES: THE LEGACY MACHsatya/docdir/satya-rashid-festschrift2012.pdf · months l ater, in late 1995, the entire Workpl ace OS project was cancelled. As with

FACULTY AND STAFF 21

ON MICROKERNELS AND VIRTUAL

MACHINES: THE LEGACY OF MACH

D uring the early years of Mach, anyone who talked to Rick Rashid soon encountered two ideas that excited him. One was the idea that operating systems had grown too large and complex, and that the time had come to simplify and shrink.

The second was the idea that different operating systems offered the same core functionality XQGHUQHDWK�D�ORW�RI�VXSHUÀFLDO�GLYHUVLW\��DQG�LW�VKRXOG�WKHUHIRUH�EH�SRVVLEOH�WR�G\QDPLFDOO\�

choose which guise to interact with. Although these two powerful ideas are interrelated in the Mach implementation, it is useful to think of them as distinct concepts from a historical perspective. In the roughly two decades since active research on Mach ended, how have these concepts fared in the marketplace of ideas? What is their intellectual legacy for OS research? Does anyone still care about them? We examine these issues in this brief note.

2. Simplify and Shrink

Figure 1 is an excerpt from the earliest publication I found that mentions the microkernel FRQFHSW�LQ�0DFK��%\�WKH�PLG�����V��WKH�GRPLQDQW�RSHUDWLQJ�V\VWHP�XVHG�E\�DFDGHPLF�

researchers (Unix) had grown from a small, tightly organized and easily understood code base LQWR�D�ODUJH�DQG�XQZLHOG\�ERG\�RI�FRGH�WKDW�ZDV�GLIÀFXOW�WR�XQGHUVWDQG��GHEXJ�DQG�PDLQWDLQ��

Some of the growth was due to introduction of new functionality such as support for virtual memory and support for networking in the form of the socket interface. Also contributing to size and complexity was the need for portability of the code across many different hardware platforms. The net impact on complexity was multiplicative, not just additive. The Mach

MAHADEV SATYANARAYANAN

School of Computer Science

Carnegie Mellon University

Page 2: ON MICROKERNELS VIRTUAL MACHINES: THE LEGACY MACHsatya/docdir/satya-rashid-festschrift2012.pdf · months l ater, in late 1995, the entire Workpl ace OS project was cancelled. As with
Page 3: ON MICROKERNELS VIRTUAL MACHINES: THE LEGACY MACHsatya/docdir/satya-rashid-festschrift2012.pdf · months l ater, in late 1995, the entire Workpl ace OS project was cancelled. As with
Page 4: ON MICROKERNELS VIRTUAL MACHINES: THE LEGACY MACHsatya/docdir/satya-rashid-festschrift2012.pdf · months l ater, in late 1995, the entire Workpl ace OS project was cancelled. As with
Page 5: ON MICROKERNELS VIRTUAL MACHINES: THE LEGACY MACHsatya/docdir/satya-rashid-festschrift2012.pdf · months l ater, in late 1995, the entire Workpl ace OS project was cancelled. As with
Page 6: ON MICROKERNELS VIRTUAL MACHINES: THE LEGACY MACHsatya/docdir/satya-rashid-festschrift2012.pdf · months l ater, in late 1995, the entire Workpl ace OS project was cancelled. As with

FESTSCHRIFT FOR RICK RASHID26

E\�D�IHZ�FRPSDQLHV�DQG�XQLYHUVLWLHV��%XW�D�IHZ�months later, in late 1995, the entire Workplace OS project was cancelled.

As with the microkernel concept, the 1990s ended with the apparent repudiation of Mach’s vision. Yet, a dozen years later, we see exactly this vision transformed into everyday reality: various ÁDYRUV�RI�:LQGRZV�DQG�/LQX[�FRH[LVWLQJ�RQ�D�common base in cloud computing. Each of these diverse environments is encapsulated within a virtual machines (VM), and the “common EDVHµ�LV�D�YLUWXDO�PDFKLQH�PRQLWRU��900��RU�hypervisor. It is interesting to speculate on why this approach has succeeded almost effortlessly, when the same end goal proved so hard to attain earlier on a different foundation.

VMs are an even older idea than microkernels or multiple personalities. They were not created for aesthetic or philosophical reasons, but as a very pragmatic solution to a real problem. VMs ZHUH�LQYHQWHG�E\�,%0�LQ�WKH�PLG�����V�DV�D�timesharing approach that enabled concurrent,

cleanly isolated system software development on a single mainframe by multiple programmers. Since mainframe hardware of that era was expensive, VMs were a cost-effective approach to HQKDQFLQJ�SURJUDPPHU�SURGXFWLYLW\�E\�SURYLGLQJ�D�SULYDWH�´PDLQIUDPHµ�IRU�HDFK�GHYHORSHU�rather than reserving dedicated time on real hardware. Accuracy of hardware emulation was paramount because the system software developed on a VM was intended for use in a mainframe operating system. That software had to work with negligible changes on the UHDO�KDUGZDUH��7KH�WHFKQLTXHV�IRU�HIÀFLHQW�DQG�DFFXUDWH�KDUGZDUH�YLUWXDOL]DWLRQ�WKDW�ZHUH�developed in this era have proved to be of lasting value.

Figure 6 illustrates the value proposition of the VM abstraction today. A large legacy world of software, including operating system software, represents a substantial intellectual and ÀQDQFLDO�LQYHVWPHQW�WKDW�KDV�EHHQ�DOUHDG\�EHHQ�PDGH�RQ�H[LVWLQJ�FRPSXWHU�KDUGZDUH��7KLV�legacy world can be completely closed source: there is no requirement for availability of source code, nor a requirement for recompilation or relinking. All that is needed is standard VRIWZDUH�LQVWDOODWLRQ��MXVW�DV�RQ�UHDO�KDUGZDUH��%HQHDWK�WKH�LPSOHPHQWDWLRQ�RI�WKH�HPXODWHG�hardware interface, there can be extensive innovation along many dimensions. This innovation LV�WRWDOO\�LVRODWHG�IURP�WKH�LGLRV\QFUDVLHV�RI�WKH�OHJDF\�ZRUOG�DERYH��&HUWDLQ�VSHFLÀF�DWWULEXWHV�of the VM abstraction accounts for its longevity and success. The hourglass shape in Figure 6 FRXOG�GHSLFW�WKH�LQWHUIDFH�VSHFLÀFDWLRQ�RI�DQ\�DEVWUDFWLRQ��WKLQ�ZDLVW���DSSOLFDWLRQV�GHSHQGHQW�RQ�WKLV�LQWHUIDFH��DERYH���DQG�LPSOHPHQWDWLRQV�RI�WKLV�LQWHUIDFH��EHORZ���0RUH�VSHFLÀFDOO\��

����������

���������

�����������

����������������������������

������

��������

FIGURE 6: �/HJDF\�FRPSDWLEOH�90�(FRV\VWHP

Page 7: ON MICROKERNELS VIRTUAL MACHINES: THE LEGACY MACHsatya/docdir/satya-rashid-festschrift2012.pdf · months l ater, in late 1995, the entire Workpl ace OS project was cancelled. As with

FACULTY AND STAFF 27

LW�FRXOG�UHSUHVHQW�DQ�H[HFXWLRQ�HQJLQH�VXFK�DV�WKH�-DYD�9LUWXDO�0DFKLQH��-90��>��@�RU�WKH�'DOYLN�9LUWXDO�0DFKLQH�IRU�WKH�$QGURLG�SODWIRUP�>��@��:KLOH�WKHVH�DOWHUQDWLYHV��FROOHFWLYHO\�referred to as software virtualization) have successful niches, they do not approach the VM abstraction (also referred to as hardware virtualization) in terms of longevity, widespread usage and real-world impact. Why is hardware virtualization so much more successful? First, the interface presented by the VM abstraction is compatible with legacy operating systems and their valuable ecosystems of applications. The ability to sustain these ecosystems without FRGH�PRGLÀFDWLRQV�LV�D�SRZHUIXO�DGYDQWDJH�RI�90V��7KH�HFRV\VWHPV�VXSSRUWHG�E\�VRIWZDUH�virtualization tend to be much smaller. For example, a JVM is only valuable in supporting DSSOLFDWLRQV�ZULWWHQ�LQ�VSHFLÀF�ODQJXDJHV�VXFK�DV�-DYD��,Q�FRQWUDVW��D�90�LV�ODQJXDJH�DJQRVWLF�and OS agnostic. In fact, a JVM can be part of the ecosystem supported by a VM. Hardware virtualization can thus subsume software virtualization. Second, a VM interface is narrow and stable relative to typical software interfaces. In combination, these two attributes ensure DGHTXDWH�UHWXUQ�RQ�LQYHVWPHQWV�LQ�WKH�OD\HU�EHORZ��%\�GHÀQLWLRQ��D�QDUURZ�LQWHUIDFH�LPSRVHV�less constraints on the layer below and thus provides greater freedom for innovation. The stability of a VM interface arises from the fact that the hardware it emulates itself evolves very slowly and almost always in an upward compatible manner. In contrast, the pliability of software results in more rapid evolution and obsolescence of interfaces. Keeping up with these changes requires high maintenance effort. Pliability also leads to widening of narrow LQWHUIDFHV�RYHU�WLPH��EHFDXVH�LW�LV�GLIÀFXOW�WR�UHVLVW�WKH�WHPSWDWLRQ�WR�H[WHQG�DQ�LQWHUIDFH�IRU�WKH�EHQHÀW�RI�D�NH\�DSSOLFDWLRQ��2YHU�WLPH��WKH�EXUGHQ�RI�VXVWDLQLQJ�D�ZLGH�LQWHUIDFH�FRQVWUDLQV�innovation below the interface.

The importance of the narrowness and stability of an interface can be seen in the contrasting fortunes of process migration and VM migration, which are essentially the same concept applied at different levels of abstraction. Process migration is an operating system capability that allows a running process to be paused, relocated to another machine, and continued there. It has been a research focus of many experimental operating systems built in the past ���\HDUV��([DPSOHV�LQFOXGH�'HPRV�>��@��9�>��@��0DFK�>��@��6SULWH�>�@��&KDUORWWH�>�@��DQG�&RQGRU�>��@��7KHVH�LQGHSHQGHQW�YDOLGDWLRQ�HIIRUWV�KDYH�VKRZQ�EH\RQG�UHDVRQDEOH�GRXEW�WKDW�SURFHVV�PLJUDWLRQ�FDQ�LQGHHG�EH�LPSOHPHQWHG�ZLWK�DFFHSWDEOH�HIÀFLHQF\��<HW��LQ�VSLWH�of its research popularity, no operating system in widespread use today (proprietary or open source) supports process migration as a standard facility. The reason for this paradox is that a typical implementation of process migration involves such a wide interface that it is easily rendered incompatible by a modest external change such as an operating system upgrade. /RQJ�WHUP�PDLQWHQDQFH�RI�PDFKLQHV�ZLWK�VXSSRUW�IRU�SURFHVV�PLJUDWLRQ�LQYROYHV�WRR�PXFK�HIIRUW�UHODWLYH�WR�WKH�EHQHÀWV�LW�SURYLGHV��7KH�VDPH�FRQFHSW�RI�SDXVLQJ�DQ�H[HFXWLQJ�HQWLW\��relocating it, and resuming execution can be applied to an entire VM rather than a single process. This is VM migration, a capability that is in widespread use in cloud computing systems today. Guest OS changes do not affect an implementation of VM migration. This insulation from change, embodied in the narrow and stable VM interface, is crucial to the real-world success of VM migration.

Page 8: ON MICROKERNELS VIRTUAL MACHINES: THE LEGACY MACHsatya/docdir/satya-rashid-festschrift2012.pdf · months l ater, in late 1995, the entire Workpl ace OS project was cancelled. As with

FESTSCHRIFT FOR RICK RASHID28

The relationship between microkernels and VMMs has been the subject of debate in the research literature. In 2005, Hand et al published a position paper entitled, “Are Virtual 0DFKLQH�0RQLWRUV�0LFURNHUQHOV�'RQH�5LJKW"µ�>�@��,Q�UHVSRQVH��+HLVHU�HW�DO�RIIHUHG�D�UHEXWWDO�>��@��7KH�GHEDWH�FRQWLQXHV�

4. Closing Thoughts

0RUH�WKDQ�D�TXDUWHU�RI�D�FHQWXU\�KDV�SDVVHG�VLQFH�5LFN�ÀUVW�HQYLVLRQHG�0DFK��<HW��ORRNLQJ�DW�Figures 1 and 3, one is struck by how relevant those ideas are even today. The attributes of simplicity and extensibility continue to inspire operating system research, even as commercial operating systems grow ever more bloated in size and complexity. From a user’s viewpoint, the ability to seamlessly and effortlessly switch between operating system worlds continues to be valuable. Mach pointed the way, and it remains the intellectual forerunner of so many aspects of today’s systems.

References

>�@� $FFHWWD��0���%DURQ��5���%RORVN\��:���*ROXE��'���5DVKLG��5���7HYDQLDQ��$���DQG��<RXQJ��0���0DFK��$�1HZ�.HUQHO�)RXQGDWLRQ�IRU�81,;�'HYHORSPHQW��,Q�Proceedings of the Summer USENIX Conference���������SS����²����

>�@� $UWV\��<���DQG�)LQNHO��5���'HVLJQLQJ�D�3URFHVV�0LJUDWLRQ�)DFLOLW\��7KH�&KDUORWWH�([SHULHQFH��IEEE Computer 22�����������

>�@� %HUVKDG��%��1���6DYDJH��6���3DUG\DN��3���6LUHU��(��*���)LXF]\QVNL��0��(���%HFNHU��'���Chambers, C., and, Eggers, S. Extensibility Safety and Performance in the SPIN Operating System. In Proceedings of the Fifteenth ACM symposium on Operating Systems Principles (Copper Mountain, CO, 1995).

>�@� 'RXJOLV��)���DQG�2XVWHUKRXW��-���7UDQVSDUHQW�3URFHVV�0LJUDWLRQ��'HVLJQ�$OWHUQDWLYHV�DQG�the Sprite Implementation. Software Practice and Experience 21�����������

>�@� (QJOHU��'��5���.DDVKRHN��0��)���DQG��2·WRROH��-U���-��([RNHUQHO���$Q�2SHUDWLQJ�6\VWHP�$UFKLWHFWXUH�IRU�$SSOLFDWLRQ�/HYHO�5HVRXUFH�0DQDJHPHQW��,Q�Proceedings of the Fifteenth ACM Symposium on Operating Systems Principles (Copper Mountain, CO, 1995).

>�@� )OHLVFK��%��'���7KH�)DLOXUH�RI�3HUVRQDOLWLHV�WR�*HQHUDOL]H��,Q�Proceedings of the 6th IEEE Workshop on Hot Topics in Operating Systems (Cape Cod, MA 1997).

>�@� )OHLVFK��%��'���&R��0��$��$���DQG��7DQ��&���:RUNSODFH�0LFURNHUQHO�DQG�26��$�&DVH�6WXG\��7HFK��5HS��&6�����'HSDUWPHQW�RI�&RPSXWHU�6FLHQFH��8QLYHUVLW\�RI�&DOLIRUQLD�DW�5LYHUVLGH��$SULO������

>�@� +DQG��6���:DUÀHOG��$���)UDVHU��.���.RWVRYL�1RV��(���DQG��0DJHQKHLPHU��'���$UH�9LUWXDO�Machine Monitors Microkernels Done Right? In Proceedings of the 10th conference on Hot Topics in Operating Systems (Santa Fe, NM, 2005).

>�@� +DQVHQ��3��%���7KH�1XFOHXV�RI�D�0XOWLSURJUDPPLQJ�6\VWHP��Communications of the ACM 13�����$SULO�����������²����

Page 9: ON MICROKERNELS VIRTUAL MACHINES: THE LEGACY MACHsatya/docdir/satya-rashid-festschrift2012.pdf · months l ater, in late 1995, the entire Workpl ace OS project was cancelled. As with

FACULTY AND STAFF 29

>��@� +ÄUWLJ��+���+RKPXWK��0���/LHGWNH��-���:ROWHU��-���DQG��6FKÖnberg, S. The Performance of µkernel-based Systems. In Proceedings of the sixteenth ACM symposium on Operating Systems Principles (Saint Malo, France, 1997).

>��@� +HLVHU��*���8KOLJ��9���DQG��/HYDVVHXU��-���$UH�9LUWXDO�0DFKLQH�0RQLWRUV�0LFURNHUQHOV�Done Right? SIGOPS Operating Systems Review 40, 1 (January2006).

>��@� .OHLQ��*���(OSKLQVWRQH��.���+HLVHU��*���$QGURQ�,FN��-���&RFN��'���'HUULQ��3���(ONDGXZH��D., Engelhardt, K., Kolanski, R., Norrish, M., Sewell, T., Tuch, H., and, Winwood, S. VH/���)RUPDO�9HULÀFDWLRQ�RI�DQ�26�.HUQHO��,Q�Proceedings of the 22nd ACM Symposium on Operating Systems Principles (October 2009).

>��@� /LHGWNH��-���,PSURYLQJ�,3&�E\�.HUQHO�'HVLJQ��,Q�Proceedings of the Fourteenth ACM Symposium on Operating Systems Principles (Asheville, NC, 1993).

>��@� /LHGWNH��-���2Q�0LFURNHUQHO�&RQVWUXFWLRQ��,Q�Proceedings of the Fifteenth ACM Symposium on Operating Systems Principles (Copper Mountain, CO, 1995).

>��@� /LQGKROP��7���DQG�<HOOLQ��)���7KH�-DYD�9LUWXDO�0DFKLQH�6SHFLÀFDWLRQ���QG�(GLWLRQ���Prentice Hall, 1999.

>��@� 3RZHOO��0���DQG�0LOOHU��%���3URFHVV�0LJUDWLRQ�LQ�'(026�03��,Q�Proceedings of the 9th ACM Symposium on Operating Systems Principles �%UHWWRQ�:RRGV��1+��2FW��������

>��@� 5DVKLG��5���%DURQ��5���)RULQ��$���*ROXE��'���-RQHV��0���-XOLQ��'���2UU��'���DQG�6DQ]L��R. Mach: A Foundation for Open Systems. In Proceedings of the Second Workshop on Workstation Operating Systems �������

>��@� 5DZVRQ�,,,��)��/���([SHULHQFH�:LWK�WKH�'HYHORSPHQW�RI�D�0LFURNHUQHO�%DVHG��0XOWLVHUYHU�Operating System. In Proceedings of the 6th IEEE Workshop on Hot Topics in Operating Systems (Cape Cod, MA, May 1997).

>��@� 7KHLPHU��0���/DQW]��.���DQG�&KHULWRQ��'���3UH�HPSWDEOH�5HPRWH�([HFXWLRQ�)DFLOLWLHV�for the VSystem. In Proceedings of the 10th Symposium on Operating System Principles �2UFDV�,VODQG��:$��'HFHPEHU�������

>��@� :LHFHN��&��$���.DOHU��&��*���)LRUHOOL��6���:LOOLDP�&��'DYHQSRUW��-���DQG��&KHQ��5��&�� A Model and Prototype of VMS Using the Mach 3.0 Kernel. In Proceedings of the USENIX Workshop on Microkernels and Other Kernel Architectures (Seattle, WA, April 1992).

>��@� :LNLSHGLD�� �'DOYLN� �VRIWZDUH���KWWS���HQ�ZLNLSHGLD�RUJ�ZLNL�'DOYLN?B�VRIWZDUH���September 2011.

>��@� =DQG\��9���0LOOHU��%���DQG�/LYQ\��0���3URFHVV�+LMDFNLQJ��,Q 8th International Symposium on High Performance Distributed Computing��5HGRQGR�%HDFK��&$��$XJXVW�������

>��@� =D\DV��(���$WWDFNLQJ�WKH�3URFHVV�0LJUDWLRQ�%RWWOHQHFN��,Q�Proceedings of the 11th ACM Symposium on Operating System Principles��$XVWLQ��7;��1RYHPEHU�������

Page 10: ON MICROKERNELS VIRTUAL MACHINES: THE LEGACY MACHsatya/docdir/satya-rashid-festschrift2012.pdf · months l ater, in late 1995, the entire Workpl ace OS project was cancelled. As with

FESTSCHRIFT FOR RICK RASHID30