MTS 8: LISP and SLIP in MTS
Page Revised February 1979 June 1976
Examples:
(TIMER ’X 1.E6) = X
A timer interrupt is set up with the ID X for one second of CPU time.
(TIMER T 20) = T
A timer interrupt is set up with the ID T. The interrupt will occur
after 20 seconds of elapsed time.
(TIMER T NIL) = XX
The interrupt is canceled, and the remaining time is returned.
DEFUN TCOUNT (X Y) (TIMER T Y) (EVAL X)
(SUB Y (TIMER T NIL)))
Here a function TCOUNT is defined. TCOUNT takes a form X to be
evaluated, and a number Y which is the maximum time allowed to it.
TCOUNT will either generate a TIMER error, or return the time it took to
EVAL the form (plus a small amount of overhead).
The Garbage Collector _____________________
This section only briefly describes the garbage collection routine in
the LISP system. This routine is activated when a job runs out of space
needed to create new LISP structures. The garbage collector reuses
space which is occupied by unreferenced structures, allocates more space
if necessary, and notifies the user if the maximum allowable space is
exceeded.
The user may optionally receive a message at the end of each garbage
collection (see the STATUS function) indicating that the garbage
collection has occurred.
Two attention interrupts issued during garbage collection will cause
an immediate return to MTS. A restart from MTS will return to the
garbage collector and continue execution.
(CHECKPOINT A S) and (RESTORE A) __________________________________
CHECKPOINT and RESTORE allow the user to save a "snapshot" of his
current system, and restore the same system at a later time. A
checkpointed system takes up less space on disk, and requires considera-
bly less time to load than a LISP system stored in source (S-expression)
| form. In addition, checkpointing often is much less expensive than
| garbage-collecting a large program if the collection can be anticipated.
76 LISP