Tuesday, February 19, 2008

Timeline and Design of BSD

  • BSD is particularly important in resources management and network facilities.
  • FreeBSD and NetBSD are the foundation of the development of the various license free operating system.
  • Although Linux is POSIX compliant, it is different from UNIX in many aspects.

1979
In 1979, the first Berkeley VAX UNIX work was called the 3BSD. It was the addition to 32V of virtual memory, demand paging, and page replacement. (32V is called UNIX/32V Time-Sharing, System Version 1.0. It is a VAX variety after the first UNIX system with portability, UNIX Time-Sharing System V7).

The reason for the large virtual-memory space of 3BSD was the development of what at the time were large programs, such as Berkeley's Franz LISP. This memory-management work convinced the Defense Advanced Research Projects Agency (DARPA) to fund the Berkeley team for the later development of a standard system (4BSD) for DARPA's contractors to use.

1984
The support of large spare address spaces, mapped files, and shared memory was a requirement for 4.2BSD. Because of pressure to make other features, such as networking, available, it was shipped without the mmap() interface. mmap() was specified to allow unrelated processes to request a shared mapping of file into their address spaces. DARPA wanted Berkeley to develop 4.2BSD as a standard research operating system for the VAX. In addition to the virtual memory system, many new facilities were designed for inclusion in 4.2BSD. These facilities included a much higher-speed filesystem, inter-process-communication, and networking support. The motivation for providing networking support was primarily DARPA's interest in connection their researchers through the 56-Kbit-per-second ARPA Internet.

1990
The 4.3BSD-Reno, was the third release of 4.3BSD, added ISO/OSI networking support, a freely distributable implementation of NFS, and the conversion to and addition of the POSIX.1 facilities.
Note: The implementation changes between 4.2BSD and 4.3BSD were not visible to users, but they are numerous. The development of 4.3BSD was to fix the networking protocol (TCP/IP) bugs, adding TCP/IP subnet and routing support, and correct the performance loss that compared to 41.BSD, etc

1993
The old virtual-memory system was completely replaced in 4.4BSD. The virtual-memory system in 4.4BSD is based on the Mach 2.0 VM, with updates from Mach 2.5 and 3.0. The virtual-memory system is better suited to the large memories and is much less dependent on the VAX architecture. It features efficient support for sharing, a clean separation of machine-independent and machine-dependent features, as well as multiprocessor support. Processes can map files anywhere in their address space. They can share parts of their address space by doing a shared mapping of the same file. Therefore, instead of copies data to the 4.4BSD kernel, the system provides quick passing of large quantities of data between processes by mmap() interface.

The 4.4BSD release also added support of multiple filesystem, extensions to the socket interface to allow the implementation of networking protocols in the ISO suite, and further TCP/IP performance improvements and enhancements. Protocol modules may deal with multiplexing of data from different connections onto a single transport medium, as well as with demultiplexing of data for different protocols and connections received from each network device.

For the support of multiple filesystem, 4.4BSD includes an object-oriented interface to filesystem similar to Sun Microsystem's vnode framework. This framework supports multiple local and remote filesystems. The vnode interface has been generalized to make the operation set dynamically extensible and to allow filesystem to be stacked. 4.4BSD supports many filesystem types, including loopback, union, and uid/gid mapping layers, plus an ISO 9660 for CD-ROMs. It also supports NFS version 2 and 3 and a new local disk-based log-structured filesystem.

Kernel organization
A monolithic kernel make no hardware-enforced distinction between user and kernel space (mmap() interface was implemented in 4.4BSD).

The largest part of the kernel implements the system services that applications access through system calls. Most of the software is machine independent and is portable across different hardware platforms. In 4.4BSD, this software has been organized according to the following (e.g., 80.4% for the HP300 in the 4.4BSD kernel):
  • Basic kernel facilities: timer and system-clock handling, descriptor management, and process management
  • Memory-management support: paging and swapping
  • Generic system interfaces: the I/O, control, and multiplexing operations performed on descriptors
  • The filesystem: files, directories, pathname translation, file locking, and I/O buffer management
  • Terminal-handling support: the terminal-interface driver and terminal line disciplines
  • Interprocess-communication facilities: sockets
  • Network communication support: communication protocols and generic network facilities, such as routing
When an platform-dependent action is needed, the machine-dependent code calls an platform-dependent function that is located in the machine-dependent code. The software that is machine-dependent includes (e.g., 19.6% for the HP300 in the 4.4BSD kernel):
  • Low-level system-startup actions
  • Trap and fault handling
  • Low-level manipulation of the run-time context of a process
  • Configuration and initialization of hardware devices
  • Run-time support for I/O devices
Only a small part of the kernel is devoted to initializing the system. This code is used when the system us bootstrapped into operation and is responsible for setting up the kernel hardware and software environment. The 4.4BSD kernel does not reclaim the memory used by the startup code because the memory space is barely 0.5% of the kernel resources used on a typical machine. Also, the startup code does not appear in one place in the kernel.

The current trend in operating systems research is to reduce the kernel size by placing as many services as possible in user space. For example, filesystems and networking protocols are implemented as client application processes of the kernel.

1995
The 4.4BSD Lite-2 was released in 1995.This release was the final distribution from the CSRG (The Computer Systems Research Group) at the University of California at Berkeley. There were two versions of 4.4BSD. One was to have been a traditional full source and binary distribution, called 4.4BSD-Encumbered. The other one, called Lite-1 (released in 1994), was a subset of the source that contained no license code and did not require the recipient to have a UNIX source license. Lite-2 is the bug-fixed version of Lite-1.

Continued the free software development, FreeBSD and NetBSD were based on 4.4BSD Lite-2. The FreeBSD project concentrates on developing distributions for the PC platform. The NetBSD project concentrates on providing ports of 4.4BSD to as many platform as possible.