ForkOpsDoc.tioga
Created by Christian Jacobi, May 7, 1986 4:35:37 pm PDT
Christian Jacobi, April 21, 1993 11:01 am PDT
ForkOps
CEDAR 10.1 —
ForkOps
Christian Jacobi
© Copyright 1989, 1993 Xerox Corporation. All rights reserved.
Abstract: ForkOps implements several utilities for multi threaded applications.
Fork re-implements the language fork with a cache; It is in average somewhat faster then using the language fork directly.
ForkDelayed allows to fork a procedure delayed.
ForkPeriodically allows to repeatedly fork a procedure.
Created by: Christian Jacobi.
Maintained by: Christian Jacobi <Jacobi.pa>
Keywords: Fork, Multi-programming, Multi-processing
Read the interfaces for documentation.
They are all well documented with many comments.
ForkOps.mesa
Generic interface for forking operations
ForkOpsMonitor.mesa
Special interface used only for debugging and performance monitoring
This interface is not necessarily stable
ForkOpsFriends.mesa
Special interface reserved for a few time critical friends-applications
Why I believe Fork might be faster than the language FORK primitive:
The language FORK might have to initialize a stack frame; this Fork most often doesn't need to do this.
This package keeps a small pool for processes. If on fork the pool is not empty a process is reactivated instead of created. This algorithm also works if the number of processes exceeds the pool size: Processes in excess of the size pool size are keept alive for few tenths of a second before discarding.
This a) saves initialization times, and, b) maybe might improve VM paging behaviour by using a LIFO.
Why ForkDelayed and ForkPeriodically are good
Many packages have a process which periodically does some work. By using this mechanism such packages can avoid permanently allocating a PROCESS resource.
The package might schedule forks to reduce maximum count of PROCESSes.
This package replaces the previous packages FastFork, DelayedFork and PeriodicalFork with one single, slightly simpler package.