Home > Store

Solaris Internals

Register your product to gain access to bonus material or receive a coupon.

Solaris Internals

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 2001
  • Edition: 1st
  • Book
  • ISBN-10: 0-13-022496-0
  • ISBN-13: 978-0-13-022496-5

The definitive Sun Microsystems guide to the internals of the Solaris kernel.

This book focuses on the core kernel functions, major data structures and algorithms. Its practical approach makes it an essential resource for anyone responsible for kernel, driver or application software. Anyone doing development, debugging, maintenance, performance tuning, capacity planning, or application tuning will also benefit from Mauro and McDougall's in-depth coverage of the Solaris kernel.

This authoritative and comprehensive guide covers the key components that comprise the Solaris kernel. The modular architecture of the kernel is discussed and each major subsystem is fully explored. Topics covered include:

  • Scheduler implementation and behavior
  • The Solaris multi-threaded architecture
  • Multi-threaded synchronization primitives
  • The Solaris Virtual Memory implementation, including tools for memory measurement and analysis
  • The Virtual File System framework
  • Techniques for analyzing kernel behavior and structures with sar, vmstat, crash, and adb

Solaris Internals is an indispensable reference for kernel developers and is full of useful information for monitoring and optimizing Solaris systems. Whether you're a software developer, systems architect, system administrator, or performance analyst, you'll rely on it constantly.

Sample Content

Downloadable Sample Chapter

Click here for a sample chapter for this book: 0130224960.pdf

Table of Contents

I. 1 INTRODUCTION TO SOLARIS INTERNALS.

1. An Introduction to Solaris.

A Brief History. Key Differentiators. Kernel Overview. Processes, Threads, and Scheduling. Interprocess Communication. Signals. Memory Management. Files and File Systems. I/O Architecture.

2. Kernel Services.

Access to Kernel Services. Entering Kernel Mode. Context. Execution Context. Virtual Memory. Interrupts. System Calls. The Kernel Callout Table. The System Clock.

3. Kernel Synchronization Primitives.

Synchronization. Parallel Systems Architectures. Hardware Considerations for Locks and Synchronization. Introduction to Synchronization Objects. Mutex Locks. Reader/Writer Locks. Turnstiles and Priority Inheritance. Dispatcher Locks. Kernel Semaphores.

4. Kernel Bootstrap and Initialization.

Kernel Directory Hierarchy. Kernel Bootstrap and Initialization. Kernel Module Loading and Linking.

II. 123 THE SOLARIS MEMORY SYSTEM.

5. Solaris Memory Architecture.

Why Have a Virtual Memory System? Modular Implementation. Virtual Address Spaces. Memory Segments. Anonymous Memory. Virtual Memory Watchpoints. Global Page Management. The Page Scanner. The Hardware Address Translation Layer. Large Pages.

6. Kernel Memory.

Kernel Virtual Memory Layout. Kernel Memory Allocation.

7. Memory Monitoring.

A Quick Introduction to Memory Monitoring. Memory Monitoring Tools. The vmstat Command. MemTool: Unbundled Memory Tools. Other Memory Tools.

III. THREADS, PROCESSES, AND IPC.

8. The Solaris Multithreaded Process Architecture.

Introduction to Solaris Processes. Process Structures. The Kernel Process Table. Process Creation. Process Termination. Procfs - The Process File System. Signals. Sessions and Process Groups.

9. The Solaris Kernel Dispatcher.

Overview. The Kernel Dispatcher. The Kernel Sleep/Wakeup Facility. Scheduler Activations. Kernel Processor Control and Processor Sets.

10. Interprocess Communication.

Generic System V IPC Support. System V Shared Memory. System V Semaphores. System V Message Queues. POSIX IPC. Solaris Doors.

PART IV. FILES AND FILE SYSTEMS

11. Solaris Files and File I/O.

Files in Solaris. File Application Programming Interfaces (APIs). System File I/O. Asynchronous I/O. Memory Mapped File I/O. 64-bit Files in Solaris. 64-bit Device Support in Solaris.

12. File System Overview.

Why Have a File System? Support for Multiple File System Types. Regular (On-Disk) File Systems. File Systems Logging (Journaling). Expanding and Shrinking File Systems. Direct I/O.

13. File System Framework.

Solaris File System Framework. The vnode. The vfs Object. File System I/O. Path-Name Management. The File System Flush Daemon.

14. The UNIX File System.

UFS Development History. UFS On-Disk Format. UFS Implementation.

15. Solaris File System Cache.

Introduction to File Caching. Page Cache and Virtual Memory System. Is All That Paging Bad for My System? Paging Parameters That Affect File System Performance. Bypassing the Page Cache with Direct I/O. Directory Name Cache. Inode Caches.

Appendix A: Kernel Tunables, Switches, and Limits.
Appendix B: Kernel Virtual Address Maps.
Appendix C: A Sample Procfs Utility.
Bibliography.
Index.

Preface

PREFACE

The internals of the UNIX kernel are fairly well-documented, most notably by Goodheart and Cox 10, Bach 1, McKusick et al. 19, and Vahalia 39. These texts have become a common source of reference information for those who want to better understand the internals of UNIX. However little has been written about the specifics of the Solaris kernel.

The paucity of Solaris specific information led us to create our own reference material. As we published information through white papers, magazine columns, and tutorials, the number of folks expressing interest motivated us to produce a complete work that discussed Solaris exclusively.

About This Book

This book is about the internals of Sun's Solaris Operating Environment. The rapid growth of Solaris has created a large number of users, software developers, systems administrators, performance analysts, and other members of the technical community, all of whom require in-depth knowledge about the environment in which they work.

Since the focus of this book is the internals of the Solaris kernel, the book provides a great deal of information on the architecture of the kernel and the major data structures and algorithms implemented in the operating system. However, rather than approach the subject matter from a purely academic point of view, we wrote the book with an eye on the practical application of the information contained herein. Thus, we have emphasized the methods and tools that can be used on a Solaris system to extract information that otherwise is not easily accessible with the standard bundled commands and utilities. We want to illustrate how you can apply this knowledge in a meaningful way, as your job or interest dictates.

To maximize the usefulness of the text, we included specific information on Solaris versions 2.5.1, 2.6, and Solaris 7. We cover the major Solaris subsystems, including memory management, process management, threads, files, and file systems. We do not cover details of low-level I/O, device drivers, STREAMS, and networking. For reference material on these topics, see "Writing Device Drivers" 28, the "STREAMS Programming Guide" 29, and "UNIX Network Programming" 32.

The material included in this book is not necessarily presented at an introductory level, although whenever possible we begin discussing a topic with some conceptual background information. We assume that you have some familiarity with operating systems concepts and have used a UNIX-based operating system. Some knowledge of the C programming language is useful but not required.

Because of the variety of hardware platforms on which Solaris runs, it is not practical to discuss the low-level details of all the different processors and architectures, so our hardware focus, when detail is required, is admittedly UltraSPARC-centric. This approach makes the most sense since it represents the current technology and addresses the largest installed base. In general, the concepts put forth when detail is required apply to other processors and platforms supported. The differences are in the specific implementation details, such as per-processor hardware registers.

Throughout the book we refer to specific kernel functions by name as we describe the flow of various code segments. These routines are internal to the operating system and should not be construed as, or confused with, the public interfaces that ship as part of the Solaris product line-the systems calls and library interfaces. The functions referenced throughout the text, unless explicitly noted, are private to the kernel and not callable or in any way usable by application programs.

Intended Audience

We hope that this book will serve as a useful reference for a variety of technical staff members working with the Solaris Operating Environment.

  • Application developers can find information in this book about how Solaris implements functions behind the application programming interfaces. This information helps developers understand performance, scalability, and implementation specifics of each interface when they develop Solaris applications. The system overview section and sections on scheduling, interprocess communication, and file system behavior should be the most useful sections.
  • Device driver and kernel module developers of drivers, STREAMS modules, loadable system calls, etc., can find herein the general architecture and implementation theory of the Solaris Operating Environment. The Solaris kernel framework and facilities portions of the book (especially the locking and synchronization primitives chapters) are particularly relevant.
  • Systems administrators, systems analysts, database administrators, and ERP managers responsible for performance tuning and capacity planning can learn about the behavioral characteristics of the major Solaris subsystems. The file system caching and memory management chapters provide a great deal of information about how Solaris behaves in real-world environments. The algorithms behind Solaris tunable parameters (which are detailed in Appendix A) are covered in depth throughout the book.
  • Technical support staff responsible for the diagnosis, debugging, and support of Solaris will find a wealth of information about implementation details of Solaris. Major data structures and data flow diagrams are provided in each chapter to aid debugging and navigation of Solaris Systems.
  • System users who just want to know more about how the Solaris kernel works will find high-level overviews at the start of each chapter.

In addition to the various technical staff members listed above, we also believe that members of the academic community will find the book of value in studying how a volume, production kernel implements major subsystems and solves the problems inherent in operating systems development.

How This Book Is Organized

We organized Solaras Internals into several logical parts, each part grouping several chapters containing related information. Our goal was to provide a building block approach to the material, where later sections build on information provided in earlier chapters. However, for readers familiar with particular aspects of operating systems design and implementation, the individual parts and chapters can stand on their own in terms of the subject matter they cover.

  • Part One: Introduction to Solaris Internals
    • Chapter 1 — An Introduction to Solaris
    • Chapter 2 — Kernel Services
    • Chapter 3 — Kernel Synchronization Primitives
    • Chapter 4 — Kernel Bootstrap and Initialization
  • Part Two: The Solaris Memory System
    • Chapter 5 — Solaris Memory Architecture
    • Chapter 6 — Kernel Memory
    • Chapter 7 — Memory Monitoring
  • Part Three: Threads, Processes, and IPC
    • Chapter 8 — The Solaris Multithreaded Process Architecture
    • Chapter 9 — The Solaris Kernel Dispatcher
    • Chapter 10 — Interprocess Communication
  • Part Four: Files and File Systems
    • Chapter 11 — Solaris Files and File I/O
    • Chapter 12 — File System Overview
    • Chapter 13 — File System Framework
    • Chapter 14 — The UNIX File System
    • Chapter 15 — Solaris File System Cache

Solaris Source Code

In February 2000, Sun announced the availability of Solaris source. This book provides the essential companion to the Solaris source and can be used as a guide to the Solaris kernel framework and architecture.

It should also be noted that the source available from Sun is the Solaris 8 source. Although this book covers Solaris versions up to and including Solaris 7, almost all of the material is relevant to Solaris 8.

Updates and Related Material

To complement this book, we created a Web site where we will place updated material, tools we refer to, and links to related material on the topics covered. The Web site is available at http://www.solarisinternals.com.

A Note from the Authors

We certainly hope that you get as much out of reading Solaris Internals as we did from writing it. We welcome comments, suggestions, and questions from readers.

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020