Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!rpi!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!sugar!peter From: peter@sugar.hackercorp.com (Peter da Silva) Newsgroups: comp.sys.amiga.advocacy Subject: Re: Single user OS schedulers (Was Re: How do we change the scheduler?) Message-ID: <7657@sugar.hackercorp.com> Date: 30 Jan 91 12:03:48 GMT References: <10620.tnews@templar.actrix.gen.nz> <1991Jan22.215801.4557@Neon.Stanfor <1991Jan23.213736.28220@Neon.Stanford.EDU> <1991Jan24.152931.1325@NCoast.ORG> <1991Jan25.073516.29644@Neon.Stanford.EDU> Reply-To: peter@sugar.hackercorp.com (Peter da Silva) Organization: Sugar Land Unix - Houston Lines: 83 In article <1991Jan25.073516.29644@Neon.Stanford.EDU> torrie@cs.stanford.edu (Evan J Torrie) writes: > A user accustomed to the Amiga scheduling system would expect > this... Does that necessarily mean it is the best thing to do? I > would prefer a system which allowed me to work as fast as I can on the > program I'm current working on.. i.e. interactive response. But which program is that? The window you just clicked on last? It might just be a window you moved out of the way to see something better, or maybe it's an I/O handler for another task. For that matter, you can quite easily be using 3 or 4 separate programs "currently", since the context switch on the Amiga is so fast. That's not a work habit you get when it takes 2 or 3 seconds for the Mac to rearrange the windows and play games with desk accessories every time you touch a new window under Multifinder. > Why WOULDN'T the user want the WP to work smoothly?? Because if they did they woudn't have run it at a lower priority than the compute-bound task that's causing the problem. > For these cases, Unix-like schedulers (which it seems the Amiga > scheduler is modeled after, judging by the description so far) No, if you'd been paying attention you would have noticed that the Amiga scheduler is real-time, and not at all like the UNIX one. The UNIX one behaves the way you want, giving interactive tasks higher priority. > Has anyone investigated alternative schedulers which take the > concept of "single user OSes" into account? Yes, the real-time process controls industry. The result is very much like the Amiga scheduler. > (Just an idle question > directed at the research community). What differences are there (if > any) in the "best" type of scheduler for single user vs multiuser > systems? In multiuser systems fairness is very important: no user should be able to use more than a certain amount of any resource to the detriment of other users. VMS, even more than UNIX, takes this point to extremes. In single user systems real-time (predictable, controllable) response is important. > Perhaps one valid solution is to multithread your application, and > spin off a high priority thread handling user input AND screen > regeneration. Yep. > However, this sort of negates the advantage of > preemptive multitasking vs cooperative multitasking, because now you > have increased the complexity of your previously simple application. No, you've reduced it. Instead of having the computation chopped up into little chunks forever falling back to the event loop, you can treat the main part of the application as a simple request/process/respond loop, letting the processing run to completion without breaking it up into a state machine or inserting calls to the scheduler at strategic places. > Is it any wonder that when Microsoft wrote their version of Excel > for OS/2, they wrote it as a single-threaded task, throwing away all > those nice capabilities of OS/2?? Nice capabilities of OS/2? Are there any? Didn't Microsoft just abandon it? One problem with OS/2 is that you can't test your threads as standalone programs with a simple CLI user interface and integrate them after you get them working. In fact, you could simply leave the CLI command driven interface in and use AREXX to communicate between the halves of the program. > Perhaps a better example than a WP would be a spreadsheet or > database, which can calculate while you are giving user input. For > example, you might have a long search on a database, but you also want > to be able to scroll around a list of matching records found so far > (while the search is still going on). Perfect use for a multithreaded application. Like Haicalc. -- Peter da Silva. `-_-' .