Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!jarthur!ucivax!orion.oac.uci.edu!ucsd!sdcc6!beowulf!velasco From: velasco@beowulf.ucsd.edu (Gabriel Velasco) Newsgroups: comp.os.mach Subject: Re: Synchronization in MACH Keywords: MACH Message-ID: Date: 22 Feb 91 03:13:22 GMT References: <19061@paperboy.OSF.ORG> Sender: news@sdcc6.ucsd.edu Lines: 55 Nntp-Posting-Host: beowulf.ucsd.edu vijay@nixdorf2.osf.org (Vijay Kumar) writes: >Recently I was reading an article about MACH and I noticed that MACH >doesn't provide an synchronization mechanism between threads like >semaphores on System V. The only synchronization mechanism provided is >via MACH IPC and threads have to implement their own ways of >synchronization perhaps using thread scheduling facilities like: >thread_suspend(), thread_wait() and thread_resume(). Does someone know >exactly why semaphores are not supported in MACH? There's some good >reason, I hope. From the paper _Mach Threads and the Unix Kernal: The Battle for Control_ by Avadis Tevanian, Jr., Richard F. Rashid, David B. Golub, David L. Black, Eric Cooper and Michael W. Young from the Department of Computer Science at Carnegie-Mellon University: The Mach kernel does not enforce a synchronization model. Instead, it provides basic primitives upon which different models of synchronization may be built. One form such synchronization could take would be the Mach IPC facility... Should an application desire its own thread-level syncrhonization, it can use the suspend, resume and wait primitives... Of course, the kernel could implement semaphores directly (as does, for example, System V). It was felt, however, that a semaphore package would only add yet another synchronization mechanism to the kernel on top of that provided by the Mach IPC facility. The kernel would inevitable implement only a small set of semaphore types and applications that wanted to use different semaphore semantics would still be forced to use an extra layer of synchronization and manage additional data structures. From a book on operating systems: Mach provides primitives from which synchronization tools can be built. This is consistent with Mach's philosophy of providing minimum yet sufficient functionality in ther kernel. The Mach IPC facility can be used for synchroniztion... The IPC mechanism is very flexible, and is used throughout Mach. For example, it may be used for thread synchronization... In general, they wanted to provide a very simple kernel with a small number of abstractions that would be sufficient to implement other operating systems. -- ________________________________________________ <>___, / / | ... and he called out and said, "Gabriel, give | /___/ __ / _ __ ' _ / | this man an understanding of the vision." | /\__/\(_/\/__)\/ (_/_(/_/|_ |_______________________________________Dan_8:16_| Brought to you by Super Global Mega Corp .com