Apple Lisa — 1.10 Writing Programs That Use the OS

Operating System Reference Manual Introduction Shared files are used for hl#i volume transfers of lnformaUon. it ls necessary to coordinate the processes somehow to prevent them from overwriting each other's information. Pipes are used for communication between processes with an uninterpreted byte stream. (Note that pipes wlll not be supported ln future releases of the Operating System.) The plpe mechanism provides for the needed synchronization; a process will block lf it is trying to read from an empty pipe or write to a full one. A read from a pipe consumes the Information, so it is no longer available. Only one process can real from a given pipe.

Event channels are similar to pipes, except that event channels transmit short, structured messages Instead of uninterpreted bytes. A shared data segment can be used to transmit a large amount of data rapldly. Having a shared data segment means that thls data segment is in the memory address space of all the processes that want to use it All the processes can then directly read and write lnformaUon ln the data segment It is necessary to provide some sort of synchronization to keep one process from overwriting another's information. 1.8 Using the 08 Merface The interface to all the system calls is provided ln the Syscall unlt, found in Appendix A.

This unit can be used to provide access to the calls. See the Workshop User's Guide for the Llsa for more information on using syscall. 1.9 Running Programs Uhder the OS Programs can be written and run by using the Workshop, which provides program development tools such as editing and debugging facilities. 1.10 Writing Programs That Use the OS You can write a program that calls OS routines to perform needed functions. Thls program uses the Syscall unit and then calls the routines needed. 1-6