ISBN-10:
0130328618
ISBN-13:
9780130328618
Pub. Date:
01/22/2004
Publisher:
Pearson
HP-UX 11i Internals / Edition 1

HP-UX 11i Internals / Edition 1

by Chris Cooper, Chris MooreChris Cooper

Paperback

Current price is , Original price is $59.99. You

Temporarily Out of Stock Online

Please check back later for updated availability.

Overview

HP-UX Internals introduces readers to the "under the hood" aspects of the HP-UX operating system. The book illustrates the kernel data structures and algorithms used to provide process/thread scheduling, I/O control and system resource management. Both hardware dependent and hardware independent data structures are examined and explained. The topics covered help readers approach system administration, tuning and troubleshooting from a more informed perspective, and challenge them to make more effective use of their HP-UX systems. The material is focused on the HP-UX 11i (version 1.0) release of the HP-UX operating system, but includes some historic aspects of its development to establish and understanding of its current incarnation.

Product Details

ISBN-13: 9780130328618
Publisher: Pearson
Publication date: 01/22/2004
Series: HP Professional Series
Pages: 416
Product dimensions: 6.90(w) x 9.20(h) x 1.00(d)

About the Author

CHRIS COOPER, HP Senior Education Consultant, is a 19-year veteran with Hewlett-Packard Education Services. He has spent most of his HP career developing and delivering courses on programming, system administration, O/S internals, and networking. He has also served as a solution architect and consultant. CHRIS MOORE, Expert Center Engineer for HP's Global Solutions Engineering team, specializes in analyzing system core dumps and identifying the causes of failures. He teaches classes on First Pass Dump Analysis inside and outside HP.

Table of Contents


Preface.


Acknowledgments.


List of Figures.


List of Tables.


List of Listings.


1. PA-RISC 2.0 Architecture.


RISC Architecture. Hardware Modules. Registers. Virtual Memory Support. Address Translation. Interruptions. Summary.



2. Procedure Calling Conventions.


Register Usage. PA-RISC Instructions. Procedure Call Model. Procedure Return Model. Stack Usage. Summary.



3. The Kernel: Basic Organization.


A Generic Overview. All I/O Is File I/O. Abstraction Layers. Some Generic Kernel Techniques. The HP-UX Kernel Overview. Fundamental Kernel Data Structures: A First Pass. Kernel Process Tables. The Kernel File System Tables. The Kernel Input/Output Tables. Drivers and Switch Tables. Summary.



4. Programs, Processes, and Threads.


The Players. A Process and Its Threads. Threading Models and HP-UX. The System Call Interface. Summary.



5. Process and Thread Management from the Process's Viewpoint.


A Process and Its Resources. The proc Table. The kthread Table. The Process's Logical View. Memory Windows. Building the Logical map. Process/Thread Scheduling. Run Queues. Summary.



6. Managing Memory.


Types of Memory. The System's Virtual Address Space. Virtual-to-Physical Page Tables. The Kernel View: The Hashtable. Shared Objects. The b-tree. broot, bnodes, and chunks. Page Lists. Connecting the Kernel View to the Process View. Keeping Track of Free Physical Page Frames. Variable Page Size. Physical Memory Allocator at HP-UX 11.0. Summary.



7. The HP-UX Paging System.


Pages on Demand. Monitoring Free Memory. A Thief in the Night: vhand. Reservation Versus Allocation. Pseudo-Swap. Device Swap. File System Swap. Swap Priority. Tracking swap in the Kernel Structures. Summary.



8. Files and File Systems.


File System Concepts. The New and Improved UNIX File System. The Kernel View of File Systems. Summary.



9. The Process Life Cycle, Cradle to Grave.


The Birth of a Process. A Historic Look at the fork() Call. The fork1() Kernel Routine. Process and Thread States: Idle Hands. Process Identity Crisis: The exec() System Call. Shared Memory Objects Revisited. The exit() System Call Mechanics. Summary.



10. I/O and Device Management.


PA-RISC I/O Architecture. I/O Framework. I/O Odds and Ends. Summary.



11. The Logical Volume Manager.


LVM Design Concept. Disk-Resident Data Structures. LVM: The Kernel View. Summary.



12. Multiprocessing and HP-UX.


Hardware Overview. Multiprocessing Data Structures. Synchronization. Summary.



13. Kernel Services.


The Callout Table. Kernel Memory Allocation. Summary.



14. Signals.


Signal Data Structures. Signal Anticipation. Signal Delivery. Signal Recognition. Signal Handler Launch. Summary.



15. System Initialization.


ISL: The Initial System Loader. HPUXBOOT: The Secondary Loader. Real-Mode Initialization. Virtual Mode Initialization. Summary.



16. Tools Overview.


adb. q4. Summary.



Index.

Preface

Whiile there are many books about the UNIX kernel in its various versions, this is the first   to deal specifically with HP-UX and Hewlett-Packard’s PA-RISC architecture. This book is a technical resource for anyone who has to support HP-UX, write kernel modules, or just wants to know how it all works. It is suitable as a text for a class in operating system concepts or HP-UX internals.

Chapter 1 PA-RISC 2.0 Architecture

Chapter 1 presents some of the important features of the PA-RISC architecture, still the predominant hardware platform for HP-UX. It covers the register set and how the registers are used, then explains virtual memory concepts, address translation and caching, the mechanisms provided by the architecture to support virtual memory, and some of the most common PA-RISC instructions and their use.

Chapter 2 Procedure Calling Conventions

This chapter examines the conventions used when calling from one procedure to another: how the stack is used and how stack frames are set up, how the registers are used, how arguments are passed, and how results are returned to the calling process. Stack usage for both narrow and wide modes is explained.

Chapter 3 The Kernel: Basic Organization

This chapter examines the basic organization of the kernel data structures, both hardwaredependent and hardware-independent. The discussion includes tables, the kernel as a resource manager, and kernel memory allocation. In addition, many common kernel algorithms and methodologies are presented for the reader’s consideration.

Chapter 4 Programs, Processes, and Threads

The process has long been the workhorse of the UNIX environment. Modern UNIX operating systems have adopted the thread as the new schedulable entity. Chapter 4 examines both the process and the thread, and their relationship to resources and task management. One of the most important aspects of understanding the process/thread environment is in flow of control followed when a system call is requested. The transistion from user mode to system mode and the return to user mode are examined in detail in Chapter 4.

Chapter 5 Process and Thread Management from the Process’s Viewpoint

This chapter explores processes and threads: how they are created, how they are terminated, and how they are scheduled to run. The internal data structures that keep track of the processes and threads are explained. We cover how memory is managed for processes and how addresses are mapped, and we look at process priorities and how they change throughout the life of the process.

Chapter 6 Managing Memory

Chapter 6 looks further into memory management by looking at systemwide memory resources. It explains how the per-process memory areas are allocated from systemwide memory and how that memory is mapped to physical memory. This chapter addresses physical and virtual memory, page regions, and address aliasing.

Chapter 7 The HP-UX Paging System

To complete our tour of the kernel’s memory management system, Chapter 7 discusses the HPUX paging system (commonly called the swapper). The following topics are included in the discussion:

Demand paging

Swap versus paging

lotsfree and vhand

Deallocation

Pseudo-swap

Swap chunks

Chapter 8 Files and File Systems

This chapter looks at the structures both in memory and on disk that make up the HP-UX file systems. HP-UX supports a number of file system layouts. This chapter looks in detail at the UNIX File System layout and the Virtual File System layer, which allows the kernel to work easily with the various file system types. It also explains various caching systems and how the dynamic buffer cache is used to complete disk transfers.

Although the Veritas File System (VxFS) is part of HP-UX, its internals are proprietary to Veritas and are not covered in depth. The merits of a journal file system and extent-based disk space allocation, however, are discussed in this chapter.

Chapter 9 The Process Life Cycle, Cradle to Grave

Chapter 9 explores the process’s life cycle in detail: how it is created, how it is maintained, and how it is terminated. Shared objects are discussed from the process point of view and the following kernel routines and features are presented in detail:

fork()

exec()

wait()

exit()

Copy-on-write

Copy-on-access

Chapter 10 I/O and Device Management

Chapter 10 explores how the system performs I/O. It explains how I/O is performed at a low level in the PA-RISC architecture, including addressing, DMA, and interrupts. It then discusses how I/O works from the application’s point of view, including device files and I/O configuration. We cover the steps in between with a discussion of how device drivers claim devices and how I/O requests make their way from the device files through the device drivers to the physical I/O devices. I/O is presented within the umbrella of the General I/O subsystem.

Chapter 11 The Logical Volume Manager

The logical volume manager (LVM) is a disk management subsystem. It provides a layer of abstraction between the physical disks and the disk I/O system. This chapter looks at how LVM combines physical disks into volume groups, divides those volume groups into logical disk volumes, and provides mirroring for data redundancy. The structures used within the kernel as well as the on-disk structures are discussed. Chapter 12 Multiprocessing and HP-UX

This chapter covers the elements of the kernel that facilitate multiprocessing. We look at some of the issues of having multiple processors sharing main memory and I/O devices. Then we look in detail at the data structures and interfaces that provide for consistent access to these resources among multiple processors. This includes spinlocks and semaphores for controlling exclusive access to resources and also load-balancing between processors.

Chapter 13 Kernel Services

Chapter 13 investigates the mechanisms in the kernel for supporting communication between processes: semaphores, message queues, shared memory, and signals. The kernel structures that support these features and the kernel tunables that control them are explained. We look at the user interfaces to these facilities and examine the kernel callout system, which allows a process to request a future signal from the kernel.

Chapter 14 Signals

Signals were traditionally sent from one process to another and usually meant that a process needed to terminate. With the advent of threads, the entire signal system has become more complex. Chapter 14 discusses both traditional and new uses and methods for signals. We will discuss in turn the following HP-UX kernel supported signaling schemes; System-V, Berkeley, and POSIX.

Chapter 15 System Initialization

HP-UX runs on many different platform designs, using a variety of boot sequences. Chapter 15 explains what takes place once the specific boot criteria has been satisfied and the kernel is off and running. This sequence of events is broken down into the real main, virtual main, and I/O initialization steps.

Chapter 16 Tools Overview

Chapter 16 explains the practical use of two important tools, adb and q4.



Customer Reviews