The Design and Implementation of the 4.4BSD Operating System
暫譯: 4.4BSD作業系統的設計與實作

Marshall Kirk McKusick, Keith Bostic, Michael J. Karels, John S. Quarterman

  • 出版商: Addison Wesley
  • 出版日期: 1996-04-30
  • 售價: $1,068
  • 語言: 英文
  • 頁數: 580
  • 裝訂: Hardcover
  • ISBN: 0201549794
  • ISBN-13: 9780201549799
  • 無法訂購

買這商品的人也買了...

相關主題

商品描述


Description

This book describes the design and implementation of the 4.4BSD operating system, the latest release of what previously was known as the "Berkeley" version of UNIX. Because the 4.4BSD operating system is freely available in source and binary form, it is the system of choice for researchers, developers, and programmers. From its years of use in commercial environments, the robustness of the 4.4BSD operating system has made it the most common platform for providing network services on the Internet including routing, firewall protection, WWW services, and electronic mail handling. As key participants in the development of 4.4BSD, the authors provide comprehensive and up-to-date technical information needed by system programmers and application programmers.

Back to Top


Table Of Contents

1. OVERVIEW.

1. History and Goals.
History of the UNIX System.
Origins.
Research UNIX.
AT&T UNIX System III and System V.
Other Organizations.
Berkeley Software Distributions.
UNIX in the World.

BSD and Other Systems.
The Influence of the User Community.

Design Goals of 4BSD.
4.2BSD Design Goals.
4.3BSD Design Goals.
4.4BSD Design Goals.

Release Engineering.
References.

2. Design Overview of 4.4BSD.
4.4BSD Facilities and the Kernel.
The Kernel.

Kernel Organization.
Kernel Services.
Process Management.
Signals.
Process Groups and Sessions.

Memory Management.
BSD Memory-Management Design Decisions.
Memory Management Inside the Kernel.

I/O System.
Descriptors and I/O.
Descriptor Management.
Devices.
Socket IPC.
Scatter/Gather I/O.
Multiple Filesystem Support.

Filesystems.
Filestores.
Network Filesystem.
Terminals.
Interprocess Communication.
Network Communication.
Network Implementation.
System Operation.
Exercises.
References.

3.Kernel Services.
Kernel Organization.
System Processes.
System Entry.
Run-Time Organization.
Entry to the Kernel.
Return from the Kernel.

System Calls.
Result Handling.
Returning from a System Call.

Traps and Interrupts.
Traps.
I/O Device Interrupts.
Software Interrupts.

Clock Interrupts.
Statistics and Process Scheduling.
Timeouts.

Memory-Management Services.
Timing Services.
Real Time.
Adjustment of the Time.
External Representation.
Interval Time.

User, Group, and Other Identifiers.
Host Identifiers.
Process Groups and Sessions.

Resource Services.
Process Priorities.
Resource Utilization.
Resource Limits.
Filesystem Quotas.

System-Operation Services.
Accounting.

Exercises.
References.

II. PROCESSES.

4. Process Management.
Introduction to Process Management.
Multiprogramming.
Scheduling.

Process State.
The Process Structure.
The User Structure.

Context Switching.
Process State.
Low-Level Context Switching.
Voluntary Context Switching.
Synchronization.

Process Scheduling.
Calculations of Process Priority.
Process-Priority Routines.
Process Run Queues and Context Switching.

Process Creation.
Process Termination.
Signals.
Comparison with POSIX Signals.
Posting of a Signal.
Delivering a Signal.

Process Groups and Sessions.
Sessions.
Job Control.

Process Debugging.
Exercises.
References.

5. Memory Management.
Terminology.
Processes and Memory .
Paging.
Replacement Algorithms.
Working-Set Model.
Swapping.
Advantages of Virtual Memory.
Hardware Requirements for Virtual Memory.

Overview of the 4.4BSD Virtual-Memory System.
Kernel Memory Management.
Kernel Maps and Submaps.
Kernel Address-Space Allocation.
Kernel Malloc.

Per-Process Resources.
4.4BSD Process Virtual-Address Space.
Page-Fault Dispatch.
Mapping to Objects.
Objects.
Objects to Pages.

Shared Memory.
Mmap Model.
Shared Mapping.
Private Mapping.
Collapsing of Shadow Chains.
Private Snapshots.

5.6 Creation of a New Process.
Reserving Kernel Resources.
Duplication of the User Address Space.
Creation of a New Process Without Copying.

Execution of a File.
Process Manipulation of Its Address Space.
Change of Process Size.
File Mapping.
Change of Protection.

Termination of a Process.
The Pager Interface.
Vnode Pager.
Device Pager.
Swap Pager.

Paging.
Page Replacement.
Paging Parameters.
The Pageout Daemon.
Swapping.
The Swap-In Process.

Portability .
The Role of the pmap Module.
Initialization and Startup.
Mapping Allocation and Deallocation.
Change of Access and Wiring Attributes for Mappings.
Management of Page-Usage Information.
Initialization of Physical Pages.
Management of Internal Data Structures.

Exercises.
References.

III. I/O System.

6. I/O System Overview.
I/O Mapping from User to Device.
Device Drivers.
I/O Queueing.
Interrupt Handling.

Block Devices.
Entry Points for Block-Device Drivers.
Sorting of Disk I/O Requests.
Disk Labels.

Character Devices.
Raw Devices and Physical I/O.
Character-Oriented Devices.
Entry Points for Character-Device Drivers.

Descriptor Management and Services.
Open File Entries.
Management of Descriptors.
File-Descriptor Locking.
Multiplexing I/O on Descriptors.
Implementation of Select.
Movement of Data Inside the Kernel.

The Virtual-Filesystem Interface.
Contents of a Vnode.
Vnode Operations.
Pathname Translation.
Exported Filesystem Services.

Filesystem-Independent Services.
The Name Cache.
Buffer Management.
Implementation of Buffer Management.

Stackable Filesystems.
Simple Filesystem Layers.
The Union Mount Filesystem.
Other Filesystems.

Exercises.
References.

7. Local Filesystems.
Hierarchical Filesystem Management.
Structure of an Inode.
Inode Management.

Naming.
Directories.
Finding of Names in Directories.
Pathname Translation.
Links.

Quotas.
File Locking.
Other Filesystem Semantics.
Large File Sizes.
File Flags.

Exercises.
References.

8. Local Filestores.
Overview of the Filestore.
The Berkeley Fast Filesystem.
Organization of the Berkeley Fast Filesystem.
Optimization of Storage Utilization.
Reading and Writing to a File.
Filesystem Parameterization.
Layout Policies.
Allocation Mechanisms.
Block Clustering.
Synchronous Operations.

The Log-Structured Filesystem.
Organization of the Log-Structured Filesystem.
Index File.
Reading of the Log.
Writing to the Log.
Block Accounting.
The Buffer Cache.
Directory Operations.
Creation of a File.
Reading and Writing to a File.
Filesystem Cleaning.
Filesystem Parameterization.
Filesystem-Crash Recovery.

The Memory-Based Filesystem.
Organization of the Memory-Based Filesystem.
Filesystem Performance.
Future Work.

Exercises.
References.

9. The Network Filesystem.
History and Overview.
NFS Structure and Operation.
The NFS Protocol.
The 4.4BSD NFS Implementation.
Client-Server Interactions.
RPC Transport Issues.
Security Issues.

Techniques for Improving Performance.
Leases.
Crash Recovery.

Exercises.
References.

10. Terminal Handling.
Terminal-Processing Modes.
Line Disciplines.
User Interface.
The tty Structure.
Process Groups, Sessions, and Terminal Control.
C-lists.
RS-232 and Modem Control.
Terminal Operations.
Open.
Output Line Discipline.
Output Top Half.
Output Bottom Half.
Input Bottom Half.
Input Top Half.
The stop Routine.
The ioctl Routine.
Modem Transitions.
Closing of Terminal Devices.

Other Line Disciplines.
Serial Line IP Discipline.
Graphics Tablet Discipline.

Exercises.
References.

IV. INTERPROCESS COMMUNICATION.

11. Interprocess Communication.
Interprocess-Communication Model.
Use of Sockets.

Implementation Structure and Overview.
Memory Management.
Mbufs.
Storage-Management Algorithms.
Mbuf Utility Routines.

Data Structures.
Communication Domains.
Sockets.
Socket Addresses.

Connection Setup.
Data Transfer.
Transmitting Data.
Receiving Data.
Passing Access Rights.
Passing Access Rights in the Local Domain.

Socket Shutdown.
Exercises.
References.

12. Network Communication.
Internal Structure.
Data Flow.
Communication Protocols.
Network Interfaces.

Socket-to-Protocol Interface.
Protocol User-Request Routine.
Internal Requests.
Protocol Control-Output Routine.

Protocol-Protocol Interface.
pr_output.
pr_input.
pr_ctlinput.
Interface between Protocol and Network Interface.
Packet Transmission.
Packet Reception.

Routing.
Kernel Routing Tables.
Routing Lookup.
Routing Redirects.
Routing-Table Interface.
User-Level Routing Policies.
User-Level Routing Interface: Routing Socket.

Buffering and Congestion Control.
Protocol Buffering Policies.
Queue Limiting.

Raw Sockets.
Control Blocks.
Input Processing.
Output Processing.

Additional Network-Subsystem Topics.
Out-of-Band Data.
Address Resolution Protocol.

Exercises.
References.

13. Network Protocols.
Internet Network Protocols.
Internet Addresses.
Subnets.
Broadcast Addresses.
Internet Multicast.
Internet Ports and Associations.
Protocol Control Blocks.

User Datagram Protocol (UDP).
Initialization.
Output.
Input.
Control Operations.

Internet Protocol (IP).
Output.
Input.
Forwarding.

Transmission Control Protocol (TCP).
TCP Connection States.
Sequence Variables.

TCP Algorithms.
Timers.
Estimation of Round-Trip Time.
Connection Establishment.
Connection Shutdown.

TCP Input Processing.
TCP Output Processing.
Sending of Data.
Avoidance of the Silly-Window Syndrome.
Avoidance of Small Packets.
Delayed Acknowledgments and Window Updates.
Retransmit State.
Slow Start.
Source-Quench Processing.
Buffer and Window Sizing.
Avoidance of Congestion with Slow Start.
Fast Retransmission.

Internet Control Message Protocol (ICMP).
OSI Implementation Issues.
Summary of Networking and Interprocess Communication.
Creation of a Communication Channel.
Sending and Receiving of Data.
Termination of Data Transmission or Reception.

Exercises.
References.

V. SYSTEM OPERATION.

14. System Startup.
Overview.
Bootstrapping.
The boot Program.

Kernel Initialization.
Assembly-Language Startup.
Machine-Dependent Initialization.
Message Buffer.
System Data Structures.

Autoconfiguration.
Device Probing.
Device Attachment.
New Autoconfiguration Data Structures.
New Autoconfiguration Functions.
Device Naming.

Machine-Independent Initialization.
User-Level Initialization.
/sbin/init.
/etc/rc.
/usr/libexec/getty.
/usr/bin/login.

System-Startup Topics.
Kernel Configuration.
System Shutdown and Autoreboot.
System Debugging.
Passage of Information To and From the Kernel.

Exercises.
References.

Glossary.
Index. 0201549794T04062001


Back to Top

商品描述(中文翻譯)

這本書描述了4.4BSD作業系統的設計與實作,這是之前被稱為「伯克利」版本的UNIX的最新版本。由於4.4BSD作業系統以源碼和二進位形式免費提供,因此成為研究人員、開發者和程式設計師的首選系統。經過多年在商業環境中的使用,4.4BSD作業系統的穩健性使其成為提供網路服務的最常見平台,包括路由、防火牆保護、WWW服務和電子郵件處理。作為4.4BSD開發的主要參與者,作者提供了系統程式設計師和應用程式程式設計師所需的全面且最新的技術資訊。

目錄
1. 概述
1. 歷史與目標
UNIX系統的歷史
起源
研究UNIX
AT&T UNIX System III和System V
其他組織
伯克利軟體發行
UNIX在世界上的地位
BSD和其他系統
使用者社群的影響
4BSD的設計目標
4.2BSD設計目標
4.3BSD設計目標
4.4BSD設計目標
發行工程
參考文獻

2. 4.4BSD的設計概述
4.4BSD的功能與核心
核心
核心組織
核心服務
程式管理
信號
程式群組與會話
記憶體管理
BSD記憶體管理設計決策
核心內的記憶體管理
I/O系統
描述符與I/O
描述符管理
設備
Socket IPC
散佈/聚集I/O
多檔案系統支援
檔案系統
檔案儲存
網路檔案系統
終端機
進程間通訊
網路通訊
網路實作
系統操作
練習
參考文獻

3. 核心服務
核心組織
系統進程
系統進入
執行時組織
進入核心
從核心返回
系統呼叫
結果處理
從系統呼叫返回
陷阱與中斷
陷阱
I/O設備中斷
軟體中斷
時鐘中斷
統計與進程排程
超時
記憶體管理服務
時間服務
實時
時間調整
外部表示
間隔時間
使用者、群組及其他識別碼
主機識別碼
程式群組與會話
資源服務
程式優先權
資源利用
資源限制
檔案系統配額
系統操作服務
計算
練習
參考文獻

II. 進程
4. 進程管理
進程管理簡介
多程式設計
排程
進程狀態
進程結構
使用者結構
上下文切換
進程狀態
低階上下文切換
自願上下文切換
同步
進程排程
進程優先權計算
進程優先權例程
進程執行佇列與上下文切換
進程創建
進程終止
信號
與POSIX信號的比較
發送信號
傳遞信號
進程群組與會話
會話
工作控制
進程除錯
練習
參考文獻

5. 記憶體管理
術語
進程與記憶體
分頁
替換演算法
工作集模型
交換
虛擬記憶體的優點
虛擬記憶體的硬體需求
4.4BSD虛擬記憶體系統概述
核心記憶體管理
核心地圖與子地圖
核心地址空間分配
核心Malloc
每個進程的資源
4.4BSD進程虛擬地址空間
頁面錯誤調度
對象映射
對象
對象到頁面
共享記憶體
Mmap模型
共享映射
私有映射
陰影鏈的合併
私有快照
創建新進程
保留核心資源
複製使用者地址空間
無需複製創建新進程
執行檔案
進程對其地址空間的操作
改變進程大小
檔案映射
改變保護
進程終止
分頁器介面
Vnode Pager
設備Pager
交換Pager
分頁
頁面替換
分頁參數
頁面驅動程式
交換
交換進程
可攜性
pmap模組的角色
初始化與啟動
映射分配與釋放
改變映射的訪問與接線屬性
頁面使用資訊的管理
實體頁面的初始化
內部數據結構的管理
練習
參考文獻

III. I/O系統
6. I/O系統概述
從使用者到設備的I/O映射
設備驅動程式
I/O佇列
中斷處理
區塊設備
區塊設備驅動程式的進入點
磁碟I/O請求的排序
磁碟標籤
字元設備
原始設備與物理I/O
字元導向設備
字元設備驅動程式的進入點
描述符管理與服務
開放檔案條目
描述符管理
檔案描述符鎖定
在描述符上多路復用I/O
Select的實作
在核心內部移動數據
虛擬檔案系統介面
Vnode的內容
Vnode操作
路徑名轉換
匯出檔案系統服務
獨立於檔案系統的服務
名稱快取
緩衝區管理
緩衝區管理的實作
可堆疊檔案系統
簡單檔案系統層
聯合掛載檔案系統
其他檔案系統
練習
參考文獻

7. 本地檔案系統
層次檔案系統管理
inode的結構
inode管理
命名
目錄
在目錄中查找名稱
路徑名轉換
鏈接
配額
檔案鎖定
其他檔案系統語義
大檔案大小
檔案標誌
練習
參考文獻

8. 本地檔案儲存
檔案儲存概述
伯克利快速檔案系統
伯克利快速檔案系統的組織
儲存利用的優化
讀取與寫入檔案
檔案系統參數化
佈局政策
分配機制
區塊聚集
同步操作
日誌結構檔案系統
日誌結構檔案系統的組織
索引檔案
讀取日誌
寫入日誌
區塊會計
緩衝區快取
目錄操作
創建檔案
讀取與寫入檔案
檔案系統清理
檔案系統參數化
檔案系統崩潰恢復
基於記憶體的檔案系統
基於記憶體的檔案系統的組織
檔案系統性能
未來工作
練習
參考文獻

9. 網路檔案系統
歷史與概述
NFS結構與操作
NFS協議
4.4BSD NFS實作
客戶端-伺服器互動
RPC傳輸問題
安全問題
改善性能的技術
租約
崩潰恢復
練習
參考文獻

10. 終端處理
終端處理模式
行紀律
使用者介面
tty結構
進程群組、會話與終端控制
C-list
RS-232與調製解調器控制
終端操作
開放
輸出行紀律
輸出上半部
輸出下半部
輸入下半部
輸入上半部
停止例程
ioctl例程
調製解調器轉換
關閉終端設備
其他行紀律
串行行IP紀律
圖形平板紀律
練習
參考文獻

IV. 進程間通訊
11. 進程間通訊
進程間通訊模型
使用Sockets

最後瀏覽商品 (20)