Apple Lisa — 1.2 Ustag the OS Functions

Introduction The Operating System (OS) provides an environment in which multiple processes can coexist, communicate, and share data. It provides a file system for I/O and information storage, handles exceptions (software interrupts), and performs memory management L 1 The Main Functions This chapter describes the four main functional areas of the OS: the File System, process management, memory management, and event and exception handling. The File System provides input and output. The File System accesses devices, volumes, and files. Each object, whether a printer, disk file, or any other type of object, is referenced by a pathname.

Every I/O operation is performed as an uninterpreted byte stream. Using the File System, all I/O is device independent. The File System also provides device-specific control operations. A process consists of an executing program and its associated data Several processes can execute concurrently by multiplexing the processor between them. These processes can be broken into segments which are automatically swapped into memory as needed. Memory management routines handle data segments. A data segment is a file that can be placed in memory and accessed directly. Exceptions and events are process-comn>unication constructs provided by the OS.

An event is a message sent from one process to another, or from a process to Itself, that is delivered to the receiving process only when the process asks for that event. An exception is a special type of event that forces ltself on the receiving process. There is a set of system-defined exceptions (errors), and programs can define their own. System errors such as division by zero are examples of system-defined exceptions. You can use the system calls provided to define any exceptions you want 12 Ustag the OS Functions Both built-in language features and explicit OS system calls can access OS routines to perform desired functions.

For example, the Pascal writeln procedure is a built-in feature of the language. The code to execute writeUi is supplied in IOSPASLIB, the Pascal run-time support routines library. This code, which is added to the program when the program is linked, calls OS File System routines to perform the desired output. You can also call OS routines explicitly. This Is usually done when the language does not provide the operation you want OS routines allow Pascal programs, for example, to create new processes, which could not otherwise be done, since Pascal does not have any built-in process-handling functions. 1-1