• Aucun résultat trouvé

SCHEDULING AND MEMORY MANAGEMENT Scheduling and memory management routines control the

Dans le document ... ndwo:> 6/1.19 .wB,S (Page 30-35)

Scheduling and memory management routines control the overall operation of the system. Inputs to these routines, together with the current status of users as recorded by the changing the user status queues and other information asso-ciated with the user. In general, a table-driven technique is used. The received signal is on one coordinate and the current state of the user is on the other. The table entry thus defi ned names the routi ne to be executed in response to the given signal-state combination. Since the number of signals and states is large, the table technique aids in debugging by forcing complete specification of all the pos-sibilities. Inputs to the scheduler are listed in Table 1.

The scheduler also receives control at execution of each CAL issued by a user program that is requesting monitor service. These entries (Table 2), the special entries from the executive language processors, and entries from intern-ally reported events drive the scheduling of the system.

Monitor 15

Tobie 1. Event Input~ Rece·ived by Schedu:ler

Associa,te sho:red processor with user.

Acti vote rea' -4i me user. Interrupt has

Terminal input message complete.

Read terminal command recei ved.

Number of output ·chara<:ters = SL: US.

Cannot get requested core pages.

Cannot get requested disk page.

User allowed to open or close fi Ie.

No symbiont disk space.

No symbiont £i'le entry.

Enqueue release - resource ovai lable.

Enqueue - wait for resource.

E:Q.FAC No gran",les.mvo.j JabJe for user.

E:QFJ Real-time user. Queue for interrupt.

E:QMf Queue for I/O master funct·jon c0IJnt too high.

E:SL S·leep time f~r user.

E:SV;Mf Symbiont fi Ie now available.

.f:S'YMO Symbiont disk 'space now o¥aiIQble~

E:tUQA UserdeGfueved 'for ·access (e.g., fOf access .to tape or di.$k pock).

E:UQFAC ALLOCAT hos refreshed granule stocks.

E:WU Woke-up time for user.

1. Terminal input/output request.

2. Input/ou.tput service colis for dynamic, or specific pages).

6. Real-time services.

7. Program overlay (load and link, load and transfer).

8. Debug requests.

9. Miscellaneous service requests.

1. Nome of system programs to be loaded and entered (im-plies deletion of ·any current program).

2. Continuation signa I.

3. Special continuation address.

4. Link .Ioad-ond-go-exit.

SCHEDULER OUTPUT

The scheduling routine performs two major functions during the time it is in control of the computer. The first function the schedu ler. These spec ifications are prepared accordi ng to the priority state queues described in the next section. high priority for swapping into,coreand for execution. When they are at the low end, they are prime candidates for re-moval to secondary storage. This latter feature - that of havi ng a defi ned pri ori ty for remova I of users to di sk stor-age - is an important and often overlooked aid to efficient swap management. It avoids extraneous swaps by making an intelligent choice about outgoing as well as incoming

6. Queuing requests for nonresident monitor services.

A list of the status queues is given in Table 3. enqueued resource, service by ALLOCAT (for fi Ie granules), or fj Ie op~n or close.

SCHEDUIBI OPERAnOI

To se1ect users for executLon" the scheduler searches down a list ,(:)f the sta tus queues for the fi rst user in core memory.

The h:ighest priority user iss.erved first. Interrupting users are served before those with an active input message (both three highest priority states receive rapid response but only for the first quanta of service. Thereafter, they share ser-vice wHh others in the co~ute queue.

A similar selection procedure is used to set up users for swapping. First, the highest priority user in the execution queue who is not in core is selected and his size require-ment (including the requirerequire-ment for shared processors not in core) is determined. Second, users are selected from the

fol-lowing three conditions exist:

1. There is room in core for three user programs.

Two examples of typical interactive use are illustrative of the scheduling operation. appro-priate executable state (Sea-SelO). The scheduler finds a high priority user not in core and initiates a swap to

...

The second example illustrates an output-bound termina I program. This program moves through the state cycle completes. At that time, the execution scheduler inter-rupts the execution of the compute-bound user so that the I/O-bound user can execute. The I/O-bound user re-quires comparatively little CPU time before initiating another I/o request and returning to the SlOW state. The compute-bound user then resumes execution.

It should be noted that the scheduler automatically adapts to jobs that a Iternate between bursts of computing and bursts of I/O.

SWAP HARDWARE ORGANIZA lION

Users are removed from core to a dedicated area of disk

CP-V processors are considered shared processors when they are wri tten in such a way that they are pure procedure and are described as such when they are added to the system.

(User-associated data areas are initialized at first entry.) A shared processor has the following special characteristics:

1. Its name is known to TEL and it may be called by name. ac-cess protection, and write locks in allocating available physical core pages to uses. Physical core pages are access codes, or both, against inadvertent stores.

The central features of the use of write-locks to protect to enable data breakpoints.

The access code on virtual memory pages controls references made by slave mode programs {user programs and shared pro-cessors}. This code is retained in the JIT of each user and is loaded when the user gains control. Write access to JIT and other job context areas is given to TEL, CCI, and LOGON.

Monitor 19

The layout of virtual memory that applies to user programs resident monitor at SYSGEN time depending on installation needs. More (or less) area may also be desirable for the Ordinary shared processors including

Special shared processor and data:

Link

Dans le document ... ndwo:> 6/1.19 .wB,S (Page 30-35)