Previous Chapter

The Queue:

The purpose of the queue is to share the computer among users. When a user enters the system he is allotted a region in memory for his dictionary and for the buffers and indicators required by his presence. This includes notifying the queue of his arrival and of his priority and linking him into the existing dictionary at the appropriate place, which may be the basis system definitions or some resident application (Fig. 7).

Figure 7.

User dictionaries may be linked together and with the system dictionary.

user dictionaries

When a user requests a system resource (including I/O) he is enqueued until it becomes available. Thus, the queue is used to resolve conflicts among users. Timesharing the computer is implicit in this treatment of the user. Once a user is established - and this requires only that core be available - he becomes a natural part of the system, indistinguishable from preexisting parts. User swapping may take place every time there is an interrupt or the current user enqueues and requires only that a very small amount of system information be changed.

No attempt is made to overlap or otherwise optimize I/O. A user's requests are satisfied as expedient with due regard for priority. Although this may be inefficient from the standpoint of his elapsed time, there are other uses and to expedite one is to penalize others. Every effort is made to minimize the impact of any user upon the system. For example, sorting algorithim are usually designed to minimize elapsed time. FORTH's sorting algorithim minimizes core and disk, and is free to run as long as necessary. The problem of cpu-bound verbs is solved by handling the timer interrupt in the same way as an I/O finish.

Next Chapter
Return to the Table of Contents