Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!pt.cs.cmu.edu!andrew.cmu.edu!zs01+ From: zs01+@andrew.cmu.edu (Zalman Stern) Newsgroups: comp.arch Subject: Re: Re^2: Macintosh OS Message-ID: Date: 7 Jun 90 04:55:28 GMT References: <402@newave.UUCP> <3300131@m.cs.uiuc.edu> <5031@quanta.eng.ohio-state.edu> <1990May28.083518.26003@laguna.ccsf.caltech.edu> <54992@microsoft.UUCP> <12189@cbmvax.commodore.com>, <355@three.MV.COM> Organization: Information Technology Center, Carnegie Mellon, Pittsburgh, PA Lines: 32 In-Reply-To: <355@three.MV.COM> [This may have little to do with comp.arch. My apologies if you are offended.] cory@three.MV.COM (Cory Kempf) writes: > A properly written user oriented program would check for events frequently, > even in the middle of a heavy duty CPU burst. That is just good user > oriented development though. Remember: The USER is in control. > [...] > See above. At a minimum, each application should get some CPU time each > second. If your application is processing in bursts that are too large, > it is broken -- it needs to be fixed. Using a premeptive lightweight threads and an abort/exception signaling mechanism one can cleanly structure an application so that its computational parts do not have to explicitly test for user interaction. That is, the user intercation can be handled in one thread and the computation can be handled in another. A signal style communication mechanism (preferably with language level support) can be used to synchronize the two threads when necessary. This results in cleaner code but explicit must be used to ensure mutual exclusion. Also, distributed systems (or maybe just "large complex systems") make it much harder to maintain crisp user interaction in a non-preemptive environment. For example, on the system I work on, open almost always happens very quickly but, occasionally, it can take up to two minutes (timing out a fileserver). How are you going to deal with that in a non-preemptive environment? Sincerely, Zalman Stern | Internet: zs01+@andrew.cmu.edu | Usenet: I'm soooo confused... Information Technology Center, Carnegie Mellon, Pittsburgh, PA 15213-3890 *** Friends don't let friends program in C++ ***