Berkeley Software Architecture Manual
4.4BSD Edition

William Joy, Robert Fabry,

Samuel Leffler, M. Kirk McKusick,

Michael Karels

Computer Systems Research Group
Computer Science Division
Department of Electrical Engineering and Computer Science
University of California, Berkeley
Berkeley, CA 94720


ABSTRACT

This document summarizes the facilities provided by the 4.4BSD version of the UNIX* operating system. It does not attempt to act as a tutorial for use of the system nor does it attempt to explain or justify the design of the system facilities. It gives neither motivation nor implementation details, in favor of brevity.

      The first section describes the basic kernel functions provided to a UNIX process: process naming and protection, memory management, software interrupts, object references (descriptors), time and statistics functions, and resource controls. These facilities, as well as facilities for bootstrap, shutdown and process accounting, are provided solely by the kernel.

      The second section describes the standard system abstractions for files and file systems, communication, terminal handling, and process control and debugging. These facilities are implemented by the operating system or by network server processes.



TABLE OF CONTENTS

Introduction.


0. Notation and types


1. Kernel primitives


1.1.  Processes and protection
1.1.1.  Host and process identifiers
1.1.2.  Process creation and termination
1.1.3.  User and group ids
1.1.4.  Process groups

1.2.  Memory management
1.2.1.  Text, data and stack
1.2.2.  Mapping pages
1.2.3.  Page protection control
1.2.4.  Giving and getting advice
1.2.5.  Protection primitives


1.3.  Signals
1.3.1.  Overview
1.3.2.  Signal types
1.3.3.  Signal handlers
1.3.4.  Sending signals
1.3.5.  Protecting critical sections
1.3.6.  Signal stacks


1.4.  Timing and statistics
1.4.1.  Real time
1.4.2.  Interval time


1.5.  Descriptors
1.5.1.  The reference table
1.5.2.  Descriptor properties
1.5.3.  Managing descriptor references
1.5.4.  Multiplexing requests
1.5.5.  Descriptor wrapping


1.6.  Resource controls
1.6.1.  Process priorities
1.6.2.  Resource utilization
1.6.3.  Resource limits


1.7.  System operation support
1.7.1.   Bootstrap operations
1.7.2.   Shutdown operations
1.7.3.   Accounting


2.  System facilities


2.1.   Generic operations
2.1.1.   Read and write
2.1.2.   Input/output control
2.1.3.   Non-blocking and asynchronous operations


2.2.  File system
2.2.1   Overview
2.2.2.  Naming
2.2.3.  Creation and removal
2.2.3.1.  Directory creation and removal
2.2.3.2.  File creation
2.2.3.3.  Creating references to devices
2.2.3.4.  Portal creation
2.2.3.6.  File, device, and portal removal
2.2.4.  Reading and modifying file attributes
2.2.5.  Links and renaming
2.2.6.  Extension and truncation
2.2.7.  Checking accessibility
2.2.8.  Locking
2.2.9.  Disc quotas


2.3.  Interprocess communication
2.3.1.   Interprocess communication primitives
2.3.1.1.    Communication domains
2.3.1.2.    Socket types and protocols
2.3.1.3.    Socket creation, naming and service establishment
2.3.1.4.    Accepting connections
2.3.1.5.    Making connections
2.3.1.6.    Sending and receiving data
2.3.1.7.    Scatter/gather and exchanging access rights
2.3.1.8.    Using read and write with sockets
2.3.1.9.    Shutting down halves of full-duplex connections
2.3.1.10.   Socket and protocol options
2.3.2.   UNIX domain
2.3.2.1.    Types of sockets
2.3.2.2.    Naming
2.3.2.3.    Access rights transmission
2.3.3.   INTERNET domain
2.3.3.1.    Socket types and protocols
2.3.3.2.    Socket naming
2.3.3.3.    Access rights transmission
2.3.3.4.    Raw access


2.4.  Terminals and devices
2.4.1.   Terminals
2.4.1.1.    Terminal input
2.4.1.1.1     Input modes
2.4.1.1.2     Interrupt characters
2.4.1.1.3     Line editing
2.4.1.2.    Terminal output
2.4.1.3.    Terminal control operations
2.4.1.4.    Terminal hardware support
2.4.2.   Structured devices
2.4.3.   Unstructured devices


2.5.  Process control and debugging


I.  Summary of facilities

Table of Contents