[comp.sys.mac.system] Resource allocation

heksterb@Apple.COM (Ben Hekster) (01/17/91)

I wrote:

> An analog to the processor-preemptive multitasking system, we could have
> memory-preemptive multitasking too--use all the memory you want, but
> keep it too long, and the OS pulls the rug out from under your feet...
> Save documents on disk?  Fine--but if some other application needs space
> on a full volume, the OS will automatically delete enough files to make
> room for it... Well, you get my drift.  To me, processor non-preemption
> seems to make sense.
>
> In the same way, still my opinion of course, if an application programmer
> feels that the user will be best served by completing a certain task as
> quickly as possible without interference from other applications that may
> happen to be present, he can implement this.  If the application is
> performing a lengthy task, it might relinquish processor time to allow its
> user to do something else in the meantime.

n67786@lehtori.tut.fi (Nieminen Tero) responds (kiitos!):

> Isn't it exactly same wether the OS or the programmer gets the decisision
> on things like this.  BTW, how is the programmer to know he's program is
> more important than some other program, let alone make the decision. Let
> the user choose and give us preemptive multitasking and controll over
> cpu time usage.

Hi, Nieminen--

	The point is that the operating system's scheduler, using a fixed
algorithm and having no way of knowing how long an application is going to
take to finish some task, may be in even less of a position to judge who
should get the processor resources than the application.

	The same question applies equally well to other system resources.
How is an application to know whether its request for memory is more important
than another application's?  Whether its demand for disk space is more
crucial?  Its need for the serial port?  Etc., etc.

	In each of these cases the user has some sort of indirect control
over these questions--e.g., by the order in which applications are launched,
whether they are launched at all, etc.  Processor time resources are no
different.  The application in which the user is working (since our attention
is basically focused on one application at a time, we humans are basically
single-tasking in this respect) receives lots of events and hence gets a lot
of CPU resources to process them.

_______________________________________________________________________________
Ben Hekster                           | "I've had my fun
Student intern                        |  but now it's time
AppleLink:   heksterb                 |  to serve your conscience
Internet:    heksterb@apple.com       |  overseas"
BITNET:      heksterb@henut5          | --Orange Crush, R.E.M. (Green)