Path: utzoo!attcan!uunet!snorkelwacker!apple!oliveb!amiga!cbmvax!valentin From: valentin@cbmvax.commodore.com (Valentin Pepelea) Newsgroups: comp.sys.amiga Subject: Re: OS 101 (more questions) Message-ID: <10693@cbmvax.commodore.com> Date: 7 Apr 90 04:24:02 GMT References: <15003@snow-white.udel.EDU> <5463@sugar.hackercorp.com> <40@kalahari.cs.utexas.edu> <23894@usc.edu> <620@lovelady.cs.utexas.edu> <603@vela.acs.oakland.edu> <6363@umd5.umd.edu> Reply-To: valentin@cbmvax (Valentin Pepelea) Organization: Commodore, West Chester, PA Lines: 39 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