valentin@cbmvax.commodore.com (Valentin Pepelea) (04/07/90)
In article <6363@umd5.umd.edu> steveg@umd5.umd.edu (Steve Green) writes: > > -Can someone tell me how the Amiga scheduler works?? Does each process get > even time?? Priorities?? The Amiga executive, the Exec, has a pre-emptive scheduler which allots tasks of equal priority equal amounts of time on a round robin fashion. Tasks of higher priority run as long as they need to. Lower priority tasks run only if no other higher priority tasks are ready to run. > -Also, if one process is waiting for terminal I/O, is that process taken off > the queue for cpu time or is that cpu time wasted?? There are two task queues: the ready-to-run queue and the wait-queue. If a task want to grab some terminal input, it the input is not already available, the task is put in the wait-queue and the task in the ready-to-run queue with the highest priority is scheduled to run. > -What primitives exist for a process to request more or less cpu time?? None. A task may only raise or lower its priority. > -Are any of the OS functions a process?? That is, if a process decides to > hog the CPU, will the OS crash or get confused? The term "process" means something else on the Amiga. A "process" is a superset of a task which is authorized to call AmigaDOS functions. (for disk I/O) In order to hog the CPU a task must either forbid task switching through the Forbid() call, or disable interrupts through the Disable() call. Disabling interrupts can interfere with with device drivers functions such as serial I/O, but otherwise no harm can be caused to the computer. Valentin -- The Goddess of democracy? "The tyrants Name: Valentin Pepelea may distroy a statue, but they cannot Phone: (215) 431-9327 kill a god." UseNet: cbmvax!valentin@uunet.uu.net - Ancient Chinese Proverb Claimer: I not Commodore spokesman be
tron1@tronsbox.UUCP (HIM) (04/11/90)
>Resp: 22 of 22 About: Re: OS 101 (more questions) >Author: [Steve Green] (*Masked*@umd5.umd.edu) > >-Can someone tell me how the Amiga scheduler works?? Does each process get >even time?? Priorities?? > All processes that are "ready to run" (not waiting on I/O or other events) are served with even time untill a higher priority task becomes ready yto run. >-Also, if one process is waiting for terminal I/O, is that process taken off >the queue for cpu time or is that cpu time wasted?? Programs that are waiting for events are taken off the queue. >-What primitives exist for a process to request more or less cpu time?? I defer .. (I dont really know well enough to answer.) > >--Are any of the OS functions a process?? That is, if a process decides to >hog the CPU, will the OS crash or get confused? They do not HOG the CPU -- that is what pre-emptive tasking means. OS processes (as such) run at a HIGH priority. It is possible to run a HOG process at a high enough priority that the system will SEEM to crash (I/O will be so slow that it would not respond) -- but the system is still sane and would be fine when that process completed. **************************************************************************** "I Am Possessed By Jimi Hendrix," Grandmother Reveals. Kenneth J. Jamieson: Xanadu Enterprises Inc. "Professional Amiga Software" {uunet , ddsw1}!tronsbox!tron1 origional text is Copryright 1990. Sysop, Romantic Encounters BBS - (201)759-8450 / (201)759-8568 ****************************************************************************