Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!indetech!vsi1!zorch!mykes From: mykes@zorch.SF-Bay.ORG (Mike Schwartz) Newsgroups: comp.sys.amiga.advocacy Subject: Re: How do we change the scheduler? (Was Re: Multitasking at home...) Message-ID: <1991Jan18.050529.13101@zorch.SF-Bay.ORG> Date: 18 Jan 91 05:05:29 GMT References: <42568@ut-emx.uucp> <91015.180746MBS110@psuvm.psu.edu> <42609@ut-emx.uucp> Organization: SF-Bay Public-Access Unix Lines: 91 In article <42609@ut-emx.uucp> awessels@ccwf.cc.utexas.edu (Allen Wessels) writes: >In article <91015.180746MBS110@psuvm.psu.edu> MBS110@psuvm.psu.edu writes: > >>Simple enough. On a multitasking computer, there's no need to distinguish >>between applications, "INITs," "desk accessories," the CLI, the "desktop," >>and so forth. All of these are just ordinary programs running concurrently. > >Ok, that sounds neat. You might be amused to find out that Apple is phasing >out desk accessories and heading towards the "everything is just a program" > philosophy. > Sounds like apple is retrofitting another feature built in to every Amiga! This is not the first time. If this retrofit is as good as multifinder, the amiga will still work better. >>If you want a program (any program) to be run every time you boot >>the machine, you put its name in the Startup-Sequence -- an ordinary text file >>on disk that lists programs that should be automatically run on startup. >>I suppose this is the equivalent of an INIT, but you really can't compare >>the two. (You could, for example, put DeluxePaint or WordPerfect in the >>Startup-Sequence...) >> >>The advantage is that no special programming tricks are required. >>Macintosh desk accessories must be programmed to keep handing control >>back to the main application "as often as possible," and INITs require >>a lot of special writing, installation, and maintenance. On the Amiga, >>whether you're writing a huge application or a menu-bar clock, you don't >>need to use different techniques. > >OK, I think I probably prefer the Amiga way because it is more flexible, but >INITs have a couple of advantages. For one thing, only certain kinds of >programs are done as INITS and that helps distinguish among programs. For >another, INIT code is often embedded in a CDEV which allows INITs to be >configured through the control panel via a fairly uniform interface. > >INITs also need no more tending that your Startup-Sequence. All you need to do >to set them up is copy them to your System Folder and reboot. Occasionally you >may get a conflict and need either to resequence them or figure out which ones >won't work together. I've run as many as 50-60 together without a lot of >trouble on a Mac Plus and still be able to run a WP and Telecomm program with >passable performance. > >Awright, back to the Amiga. Suppose you have a bunch of programs set in your >Startup-Sequence. What determines priorities and how do you make sure programs >get the time they need to do their thing? There are two ways a program on the Amiga can determine its priority. One is to allow the user to set it and the other is for the software to set it as it thinks it needs to be. When you run a program, it inherits the priority of the CLI that spawned it (in this case, the CLI that is executing the startup-sequence) and you can easily change the CLI's priority before running as many programs as you want then change it again and run some more programs. Also, the Amiga features pre-emptive multitasking. This means that programs running at the same priority get an equal share of the CPU time with the other programs running at the same priority. This even happens when you use a pull down menu in one application (the others still run!). Programs running at high priorities only get the CPU when they need it. Typical programs at any priority spend more time not using the CPU than using it, especially when they are waiting for input. So you can have a very high priority program waiting for input that uses NO cpu time while lower priority programs get all they need. This is typical of a program editor that can change itself to high priority for screen refreshes then change itself back to low priority while it does other things (you want your refreshes to be fast so the machine has a snappy response). A term program can run at high priority and it will use NO cpu time until a byte comes in to the serial port, then it will get ALL the CPU time it needs to process the byte, then it will again use NO CPU time until the next byte comes. By the way, every program on my hard disk is as good as a desk accessory. I can have a million desk accessories ready to use and still use ALL of my Amiga's memory for any other purpose. My Amiga never has just "passable" performance due to the number of programs I have available. I would not call typical Amiga applications INITs, because they relate more closely to the way the Mac lets you automatically open application(s) when you boot. However, I do have programs that I run from my startup-sequence that accelerate the mouse, provide screen blanking, allow me to read and write MS-DOS 720K disks with AmigaDos commands (or from applications' file requestors), allow access to ethernet networks, allow access to UUCP, and a whole lot more. These programs do resemble INITs. I typically run all these inits, plus have a resident assembler, editor, and linker, run DPaint with 10 screens of animation, and still have 2.89 Megs of RAM free. I have not had to quit an application to make more free memory for another application in years. All this is on a 5 Meg machine. Cheers!