ComputerScience/FreeBSD(23)
-
[FreeBSD] System Calls
3.2 System CallsThe most frequent trap into the kernel (after clock processing) is a request to do a system call. System performance requires that the kernel minimize the overhead in fielding and dispatching a system call. The system-call handler must do the following work:Verify that the parameters to the system call are located at a valid user address, and copy them from the user’s address spa..
2024.07.10 -
[FreeBSD] Run-time structure of the kernel
Run-Time OrganizationThe kernel can be logically divided into a top half and a bottom halfThe top half of the kernel provides services to processes in response to system calls or traps. This software can be thought of as a library of routines shared by all processes. The top half of the kernel executes in a privileged execution mode, in which it has access both to kernel data structures and to t..
2024.07.10 -
[FreeBSD] Kernel Organization
3.1 Kernel OrganizationThe FreeBSD kernel can be viewed as a service provider to user processes. Processes usually access these services through system calls. Some services, such as process scheduling and memory management, are implemented as processes that execute in kernel mode or as routines that execute periodically within the kernel.In this chapter, we describe how kernel services are provi..
2024.07.09 -
[FreeBSD] Network Layer Protocols, TCP/UDP and Bootstrapping
2.13 Network-Layer ProtocolsMost of the communication domains supported by the socket IPC mechanism provide access to network protocols. These protocols are implemented as a separate software layer logically below the socket software in the kernel. The kernel provides many ancillary services, such as buffer management, message routing, standardized interfaces to the protocols, and interfaces to ..
2024.07.06 -
[FreeBSD] Interprocess Communication
2.12 Interprocess CommunicationInterprocess communication in FreeBSD is organized in communication domains. The most important domains currently supported include the local domain, for communication between processes executing on the same machine; the IPv4 domain, for communication between processes using the TCP/IP protocol suite (version 4); and the IPv6 domain, which is the newest version of ..
2024.06.29 -
[FreeBSD] ZFS and NFS
2.10 The Zettabyte FilesystemThe Zettabyte filesystem (ZFS) is in a class of filesystems that never overwrite existing data. This type of filesystem design was pioneered at Berkeley and a production-capable implementation was released as the log-structured filesystem in 4.4BSD.The idea of a non-overwriting filesystem is sound and was picked up and greatly enhanced by Sun Microsystems, which rele..
2024.06.29 -
[FreeBSD] The Fast Filesystem
2.9 The Fast FilesystemA regular file is a linear array of bytes and can be read and written starting at any byte in the file. The kernel distinguishes no record boundaries in regular files, although many programs recognize line-feed characters as distinguishing the ends of lines, and other programs may impose other structure. No system-related information about a file is kept in the file itself..
2024.06.29 -
[FreeBSD] Devices
2.8 DevicesHistorically, the device interface was static and simple. Devices were discovered as the system was booted and did not change thereafter. A typical disk driver could be written in a few hundred lines of code. As the system has evolved, the complexity of the I/O system has increased, with the addition of new functionality. Devices may appear and later disappear while the system is runn..
2024.06.29 -
[FreeBSD] I/O System, Descriptor and Socket IPC
2.7 I/O System OverviewThe basic model of the UNIX I/O system is a sequence of bytes that can be accessed either randomly or sequentially. There are no access methods and no control blocks in a typical UNIX user process. Different programs expect various levels of structure, but the kernel does not impose structure on I/O. For instance, the convention for text files is lines of ASCII characters ..
2024.06.25 -
[FreeBSD] Memory Management
2.6 Memory ManagementEach process has its own private address space. The address space is initially divided into three logical segments: text, data, and stack. The text segment is read-only and contains the machine instructions of a program. The data and stack segments are both readable and writable. The data segment contains the initialized and uninitialized data portions of a program, whereas ..
2024.06.25