- 1
-
This is a beta release of an article intended for the July '88 issue
of BYTE Magazine. Do not copy nor distribute. Your thoughts and
suggestions appreciated. (By the way, that thing up above is supposed
to be a juggler!)
- 2
- Though the
popular UNIX environment is fairly portable between workstation and
mainframe machines, it only provides multiprocessing, not multitasking
(or multiple threads within a process) which share memory
- 3
- Also, any program involving multiple machines must
enivitably deal with concurrent processing (tasks, the machines
operate independently) – another reason to understand the concepts.
- 4
- Though Dijkstra's algorithm
and Dekker's version of it can enable semaphores to be implemented
purely in software. Other solutions exist as well
- 5
- All global names in the Mailbox package are prefexed
with the authors initials (MP) to prevent naming conflicts with other
global names your enviornment may have.
- 6
- Of course, a processor need not be represented by a
real message. But, for the moment, suppose it were, and when no
tasks were needed to be run, the processor waited on the schedule
mailbox like a message. The processor would have to disable
interrupts during this period, as it would not be running any task,
under which it could save its state if it were interrupted. If it
were the only processor, then no tasks would ever appear for it to
run. Therefore, it is far better to quickly find any task to
run, even if it is an idle task, which enables interrupts and
yields itself to higher priority tasks.