🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #5579

Re: Time Slices

#5579
From: Raymond S. Brand
Date: Wed, 03 Oct 1990 02:56
40 lines
2697 bytes
In article <204@pdxgate.UUCP>, griffith@eecs.cs.pdx.edu (Michael Griffith) writes:
> I noticed that the system programmer's guide just says that CIA-A's B timer
> is used for various OS tasks and I was wondering:
> 
>    a. Is it used for the task-switching process? If not, what is it used for?
> 
>    b. Is the TOD timer used for task-switching? If not, is there a specific
>       reason why this timer can't be used? I can't remember if you can get
>       it to generate an interrupt or not. I think you can with an alarm.
> 
>    c. How does the CPU determine the time allotted to a task, specifically?
>       Does it vary depending on the task load and the priority of the task,
>       or is it fixed according to the priority?

The exact details are unimportant; what is important is the external behavior.

That out of the way, here are some details: Each task, each time it is started
by the scheduler is allowed a certain amount of time, a quantum, to run before
it is stopped and another allowed to run. If a task is blocked before using
all of the quantum, the remaining time is not carried over. As an implementation
detail, the timer.device notifies exec whenever an quantum has expired. The
quantum value for 2.0 is different than 1.3 and previous. The timer.device for
2.0 is new and uses all 3 timers/counter on cia-a; 1.3 timer.device used cia-a
tod counter and timer-b, timer-a belonged to the keyboard.

For those of you that are interested, the quantum value is stored in execbase.
Those of you that may want to change the quantum value will likely not find
any change in behavior of the system if you do. The reason for this is another
implementation detail: interrupts reschedule the tasks (this may change!).

					rsbx

> | Michael Griffith                     | If I had an opinion it certainly   |

------------------------------------------------------------------------
  Raymond S. Brand			rsbx@cbmvax.commodore.com
  Commodore-Amiga Engineering		...!uunet!cbmvax!rsbx
  1200 Wilson Drive			(215)-431-9100
  West Chester PA 19380			"Looking"
------------------------------------------------------------------------
Technical Details
Message-ID: <14827@cbmvax.commodore.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!psuvax1!rutgers!cbmvax!rsbx
References: <204@pdxgate.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!psuvax1!rutgers!cbmvax!rsbx
From: rsbx@cbmvax.commodore.com (Raymond S. Brand)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Time Slices
Keywords: task switching time sharing time slice
Message-ID: <14827@cbmvax.commodore.com>
Date: 3 Oct 90 02:56:28 GMT
References: <204@pdxgate.UUCP>
Distribution: comp.sys.amiga.tech
Organization: Commodore-Amiga Inc, West Chester, PA
Lines: 40