Page:CTSS programmer's guide.djvu/26

From Wikisource
Jump to navigation Jump to search
This page has been proofread, but needs to be validated.

Again the process is re-initiated with the head-of-the-queue user at the lowest occupied level .

Message Interaction Considerations and Usage Times

Because a user cannot "see" his program running, it is important that the programmer resort to appropriate cues and confirmation messages in his programming. Thus when input is expected, a good technique is to have the program first type out a message such as "type next data set" or "A=". Similarly after input it is often reassuring, if a long computation is required, to see some program output acknowledging the receipt (and perhaps the accuracy) of the input message.

The reply response time is governed by the basic scheduling algorithm described earlier and depends on the number of other users. In the current implementation of the algorithm a user-computer interaction consists of the period from an input message to an output message. Although the response time is only a few milliseconds if the user's program is already in core, whenever there is more than one user the usual minimum time for a response, which is the minimum computer usage time per response, is (in the current drumless system) approximately seconds plus the response computation time, where is the number of program words in thousands. For example, eight different user programs, of one thousand words each, could simultaneously respond within a second to input messages requiring only negligible computation.

For those interactions which require non-trivial computation, the computer usage time is approximately given by the sum of two series, the first of which is for the computation: where the th term of the series is that just necessary to complete the computation. As can easily be seen, in the limit of large computations the ratio of usage time to computation time asymptotically approaches one.

12