Principles of Modern Operating Systems, 2nd Edition

Book description

This revised and updated Second Edition presents a practical introduction to operating systems and illustrates these principles through a hands-on approach using accompanying simulation models developed in Java and C++. This text is appropriate for upper-level undergraduate courses in computer science. Case studies throughout the text feature the implementation of Java and C++ simulation models, giving students a thorough look at both the theoretical and the practical concepts discussed in modern OS courses. This pedagogical approach is designed to present a clearer, more practical look at OS concepts, techniques, and methods without sacrificing the theoretical rigor that is necessary at this level. It is an ideal choice for those interested in gaining comprehensive, hands-on experience using the modern techniques and methods necessary for working with these complex systems. Every new printed copy is accompanied with a CD-ROM containing simulations (eBook version does not include CD-ROM).

New material added to the Second Edition:
- Chapter 11 (Security) has been revised to include the most up-to-date information
- Chapter 12 (Firewalls and Network Security) has been updated to include material on middleware that allows applications on separate machines to communicate (e.g. RMI, COM+, and Object Broker)
- Includes a new chapter dedicated to Virtual Machines
- Provides introductions to various types of scams
- Updated to include information on Windows 7 and Mac OS X throughout the text
- Contains new material on basic hardware architecture that operating systems depend on
- Includes new material on handling multi-core CPUs

Instructor Resources:
-Answers to the end of chapter questions
-PowerPoint Lecture Outlines

Table of contents

  1. Cover
  2. Title
  3. Copyright
  4. Contents (1/3)
  5. Contents (2/3)
  6. Contents (3/3)
  7. Preface
  8. 1 Basic Concepts of Operating Systems
    1. 1.1 Introduction
      1. 1.1.1 Software Components
    2. 1.2 Operating Systems
      1. 1.2.1 Operating System Interfaces
      2. 1.2.2 Multi-Level Views of an Operating System
    3. 1.3 Categories of Operating Systems
    4. 1.4 Small and Specialized Operating Systems
    5. 1.5 Brief History of Operating Systems
    6. 1.6 Contemporary Operating Systems
      1. 1.6.1 Unix
      2. 1.6.2 Microsoft Windows
      3. 1.6.3 Mac OS
    7. 1.7 64-bit Operating Systems
      1. 1.7.1 Microsoft 64-bit Windows 7
      2. 1.7.2 Mac OS X
    8. 1.8 Summary
    9. Exercises and Questions
  9. 2 Processes and Threads
    1. 2.1 Introduction
    2. 2.2 Processes
      1. 2.2.1 Process States
      2. 2.2.2 Process Descriptor
    3. 2.3 Threads
      1. 2.3.1 Multithreading
      2. 2.3.2 User-Level Threads
      3. 2.3.3 Kernel-Level Threads
      4. 2.3.4 Java Threads
    4. 2.4 POSIX Threads
      1. 2.4.1 Creating POSIX Threads
      2. 2.4.2 Basic Synchronization of Pthreads
      3. 2.4.3 Scheduling and Priorities of POSIX Threads
    5. 2.5 Multiprogramming
      1. 2.5.1 CPU and I/O Requests
      2. 2.5.2 Interrupting Processes
      3. 2.5.3 Context Switch
    6. 2.6 Summary
    7. Exercises and Questions
  10. 3 System Performance and Models
    1. 3.1 Introduction
    2. 3.2 General Concepts of Modeling
    3. 3.3 Simple Models of Computer Systems
    4. 3.4 Performance of Computer Systems
      1. 3.4.1 Performance Metrics
      2. 3.4.2 Workload and System Parameters
    5. 3.5 Simulation Models
      1. 3.5.1 Types of Simulation Models
      2. 3.5.2 Discrete-Event Models
      3. 3.5.3 Stochastic Models
    6. 3.6 A Model of the Simple Batch System
      1. 3.6.1 Description of the Model
      2. 3.6.2 Implementations of the Model
      3. 3.6.3 Simulation Output of the Console Implementation (1/2)
      4. 3.6.3 Simulation Output of the Console Implementation (2/2)
      5. 3.6.4 Output of the GUI Implementation
    7. 3.7 System Capacity and Bottleneck
    8. 3.8 Summary
    9. Exercises and Questions
  11. 4 Systems with Multiprogramming
    1. 4.1 Introduction
    2. 4.2 Systems with Multiple Stations
      1. 4.2.1 CPU and I/O Bursts
      2. 4.2.2 Overlapping of CPU and I/O Processing
      3. 4.2.3 Context Switches
    3. 4.3 Studying Systems with Multiprogramming
      1. 4.3.1 Model of a System with Multiprogramming
      2. 4.3.2 Model of a System Without Multiprogramming
      3. 4.3.3 Comparison of the Two Models
      4. 4.3.4 Models with GUI and Graphical Animation
    4. 4.4 Summary
    5. Exercises and Questions
  12. 5 Processor Scheduling
    1. 5.1 Introduction
    2. 5.2 General Types of Scheduling
    3. 5.3 Processor Scheduling Concepts
      1. 5.3.1 The CPU Scheduler
      2. 5.3.2 Scheduling Multiple Classes of Processes
    4. 5.4 CPU Scheduling Policies
      1. 5.4.1 First-Come-First-Served (1/2)
      2. 5.4.1 First-Come-First-Served (2/2)
      3. 5.4.2 Shortest Process Next (1/2)
      4. 5.4.2 Shortest Process Next (2/2)
      5. 5.4.3 Round Robin Scheduling (1/2)
      6. 5.4.3 Round Robin Scheduling (2/2)
      7. 5.4.4 Shortest Remaining Time (1/2)
      8. 5.4.4 Shortest Remaining Time (2/2)
      9. 5.4.5 Brief Comparison of the Four Scheduling Policies
      10. 5.4.6 Dynamic Priority Scheduling
      11. 5.4.7 Other Scheduling Policies
    5. 5.5 Multiprocessor Systems
    6. 5.6 Summary
    7. Exercises and Questions
  13. 6 Synchronization Principles
    1. 6.1 Introduction
    2. 6.2 Basic Synchronization Principles
      1. 6.2.1 No Synchronization
      2. 6.2.2 Mutual Exclusion
      3. 6.2.3 Critical Sections
    3. 6.3 Approaches for Implementing Synchronization
    4. 6.4 Semaphores
    5. 6.5 Synchronization with Semaphores
      1. 6.5.1 Critical Section Problem
      2. 6.5.2 Event Ordering
    6. 6.6 Synchronization Case Studies
      1. 6.6.1 The Bounded-Buffer Problem
      2. 6.6.2 Synchronization with Semaphores in Java
      3. 6.6.3 Simulation Models of the Bounded-Buffer Problem
      4. 6.6.4 The Readers-Writers Problem
      5. 6.6.5 Simulation Models of the Readers-Writers Problem
    7. 6.7 POSIX Threads
      1. 6.7.1 Creating POSIX Threads
      2. 6.7.2 Basic Synchronization of Pthreads
      3. 6.7.3 Mutual Exclusion
      4. 6.7.4 Semaphores
    8. 6.8 Monitors
      1. 6.8.1 Synchronization with Monitors
      2. 6.8.2 The Producer-Consumer Problem with a Monitor
      3. 6.8.3 Monitor Synchronization with Java
      4. 6.8.4 Simulation Models Using Monitors
    9. 6.9 Interprocess Communication
      1. 6.9.1 Asynchronous Communication
      2. 6.9.2 Simulation Model for Asynchronous Communication
      3. 6.9.3 Synchronous Communication
      4. 6.9.4 Simulation Model for Synchronous Communication
    10. 6.10 Atomic Transactions
    11. 6.11 Summary
    12. Exercises and Questions
  14. 7 Deadlocks
    1. 7.1 Introduction
    2. 7.2 Basic Principles of Deadlock
      1. 7.2.1 Resource Allocation Graph
      2. 7.2.2 Conditions for the Existence of Deadlock
    3. 7.3 The Dining Philosophers
      1. 7.3.1 Modeling Deadlock
      2. 7.3.2 Informal Solution to Deadlock
    4. 7.4 Methods for Handling Deadlock
    5. 7.5 Deadlock Prevention
      1. 7.5.1 Disallowing Hold and Wait
      2. 7.5.2 Disallowing Circular Wait
      3. 7.5.3 Model with Graphical Animation
    6. 7.6 Deadlock Avoidance
      1. 7.6.1 Banker’s Algorithm
      2. 7.6.2 Applying the Banker’s Algorithm
    7. 7.7 Deadlock Detection and Recovery
      1. 7.7.1 Deadlock Detection
      2. 7.7.2 Recovery
    8. 7.8 Summary
    9. Exercises and Questions
  15. 8 File Management
    1. 8.1 Introduction
    2. 8.2 Files
      1. 8.2.1 File Attributes
      2. 8.2.2 Folders
      3. 8.2.3 Pathnames
    3. 8.3 Access Methods
      1. 8.3.1 Open
      2. 8.3.2 Close
      3. 8.3.3 Read
      4. 8.3.4 Write
      5. 8.3.5 Sequential Access
      6. 8.3.6 Streams, Pipes, and I/O Redirection
      7. 8.3.7 Other I/O System Calls
    4. 8.4 Directory Functions
    5. 8.5 File Space Allocation
      1. 8.5.1 Cluster Allocation
      2. 8.5.2 Calculating Read/Write Addresses
      3. 8.5.3 Free Space Management
      4. 8.5.4 Disk Fragmentation
      5. 8.5.5 Reliability of Disk Space Management
    6. 8.6 Real-World Systems
      1. 8.6.1 Microsoft FAT System
      2. 8.6.2 Microsoft NTFS System
      3. 8.6.3 Linux Ext2 and Ext3 Systems
      4. 8.6.4 Mac OS X HFS+ Systems
      5. 8.6.5 Other File Systems
    7. 8.7 Virtual File System
    8. 8.8 Removable Media
    9. 8.9 Seeing the Future Now
    10. 8.10 Summary
    11. Exercises and Questions
  16. 9 The I/O System
    1. 9.1 Introduction
    2. 9.2 I/O Hardware
      1. 9.2.1 Direct Memory Access
      2. 9.2.2 Hard Disk Drives
      3. 9.2.3 Solid State Disks
    3. 9.3 Device I/O Structure
      1. 9.3.1 Intelligent Buses
      2. 9.3.2 Handling Multiple Devices Simultaneously
    4. 9.4 I/O Performance Optimization
      1. 9.4.1 Reducing the Number of I/O Requests
      2. 9.4.2 Buffering and Caching
      3. 9.4.3 I/O Scheduling
    5. 9.5 Hard Disk I/O Scheduling
      1. 9.5.1 First-Come First-Served Algorithm
      2. 9.5.2 Shortest Seek Time First Algorithm
      3. 9.5.3 Elevator (SCAN) Algorithm
      4. 9.5.4 Circular Scan Algorithm
      5. 9.5.5 Optimizing Rotational Latency
      6. 9.5.6 Interaction of Disk Scheduling and Other System Functions
    6. 9.6 System Configuration
    7. 9.7 Hard Disk Scheduling Simulation Model
    8. 9.8 Summary
    9. Exercises and Questions
  17. 10 Memory Management
    1. 10.1 Introduction
    2. 10.2 Process Address Space
      1. 10.2.1 Binding
      2. 10.2.2 Static and Dynamic Loading
      3. 10.2.3 Static and Dynamic Linking
    3. 10.3 Contiguous Memory Allocation
      1. 10.3.1 Fixed Partitions
      2. 10.3.2 Dynamic Partitions
      3. 10.3.3 Swapping
    4. 10.4 Noncontiguous Memory Allocation
      1. 10.4.1 Paging
      2. 10.4.2 Segmentation
    5. 10.5 Virtual Memory
      1. 10.5.1 Basic Concepts
      2. 10.5.2 Process Locality
      3. 10.5.3 Using Segments
      4. 10.5.4 Memory Protection
      5. 10.5.5 Shared Memory
      6. 10.5.6 Address Translation
      7. 10.5.7 Page Size Considerations
    6. 10.6 Paging with Virtual Memory
      1. 10.6.1 Paging Policies
      2. 10.6.2 Frame Allocation
      3. 10.6.3 Page Faults and Performance Issues
    7. 10.7 Paging Algorithms
      1. 10.7.1 Static Paging Algorithms
      2. 10.7.2 Dynamic Paging Algorithms
    8. 10.8 Thrashing
      1. 10.8.1 Combining Paging with Segmentation
    9. 10.9 Summary
    10. Exercises and Questions
  18. 11 Security and Protection
    1. 11.1 Introduction
    2. 11.2 Problems of Security
    3. 11.3 Security and Protection Components
      1. 11.3.1 Physical Security
      2. 11.3.2 User Authentication
      3. 11.3.3 Protection (1/2)
      4. 11.3.3 Protection (2/2)
      5. 11.3.4 Secure Communications
      6. 11.3.5 Digital Certificates
      7. 11.3.6 People
    4. 11.4 System Vulnerabilities
      1. 11.4.1 Social Engineering
      2. 11.4.2 Trojan Horse Programs
      3. 11.4.3 Spyware
      4. 11.4.4 Trap Doors
      5. 11.4.5 Database Access Vulnerabilities
      6. 11.4.6 Buffer and Stack Overflow
    5. 11.5 Invasive and Malicious Software
    6. 11.6 Defending the System and the User
    7. 11.7 Intrusion Detection Management
    8. 11.8 Security and Privacy
    9. 11.9 Secure Systems Versus Systems Security
    10. 11.10 Summary
    11. Exercises and Questions
  19. 12 Networking and Distributed Systems
    1. 12.1 Introduction
    2. 12.2 Ethernet
    3. 12.3 Internetworking and TCP/IP
      1. 12.3.1 Connection Oriented Versus Connectionless
      2. 12.3.2 Streaming Data
    4. 12.4 World Wide Web
    5. 12.5 DNS and DHCP
      1. 12.5.1 DNS Caching
      2. 12.5.2 DHCP
    6. 12.6 Parallel Computing
      1. 12.6.1 Simple Model of Parallel Speedup
      2. 12.6.2 Limitations of Parallel Speedup
      3. 12.6.3 Multiple Levels of Parallelism
    7. 12.7 Cluster and Grid Computing (1/2)
    8. 12.7 Cluster and Grid Computing (2/2)
    9. 12.8 Distributed Application Technologies
      1. 12.8.1 Distributed Software Architectures
      2. 12.8.2 Software Interface: ODBC
      3. Exercises and Questions
  20. 13 Virtual Machines
    1. 13.1 Introduction
    2. 13.2 Overall Virtual Machine Structure
    3. 13.3 Hardware Interface
      1. 13.3.1 Instruction Execution
      2. 13.3.2 Software Trap Handling
      3. 13.3.3 Device Input/Output
      4. 13.3.4 Memory Management
    4. 13.4 Hardware Enhancements
      1. 13.4.1 Additional Execution Modes
      2. 13.4.2 Memory Mapping Enhancements
    5. 13.5 Mapping Devices to Host OS Structures
    6. 13.6 Unmapped Devices
    7. 13.7 Virtual Machine Integration
    8. 13.8 Summary
    9. Exercises and Questions
  21. Appendix A Introduction to Using Linux
    1. A.1 Introduction
    2. A.2 Command-Line Interface
    3. A.3 Files and Directories
      1. A.3.1 Specifying Paths
      2. A.3.2 Wildcards
    4. A.4 Basic Commands
      1. A.4.1 The passwd Command
      2. A.4.2 The man Command
      3. A.4.3 The ls Command
      4. A.4.4 The cp Command
      5. A.4.5 The mv Command
      6. A.4.6 The rm Command
      7. A.4.7 The cd Command
      8. A.4.8 The mkdir Command
      9. A.4.9 The rmdir Command
      10. A.4.10 I/O Redirection and Pipe Operators
    5. A.5 Shell Variables
      1. A.5.1 The pwd Command
      2. A.5.2 The more Command
      3. A.5.3 The exit Command
    6. A.6 Text Editing
    7. A.7 File Access Permissions
    8. A.8 The cat Command
    9. A.9 Commands for Process Control
    10. A.10 Foreground and Background Processes
    11. A.11 Script Files
      1. A.11.1 Comments in Scripts
      2. A.11.2 Positional Parameters
      3. A.11.3 Command Substitution
      4. A.11.4 The test Command
      5. A.11.5 The if and the test Commands
      6. A.11.6 The set Command
      7. A.11.7 Mutibranch with the if Command
      8. A.11.8 Repetition with the for Command
      9. A.11.9 Repetition with the while Command
    12. A.12 Searching Data in Files
    13. A.13 Evaluating Expressions
    14. A.14 Connecting to a Remote Linux Server
      1. A.14.1 The Putty Program
      2. A.14.2 SSH Client
      3. A.14.3 X-Window and Graphical Desktops
      4. A.14.4 Using the K Desktop Environment
  22. Appendix B Java and POSIX Threads
    1. B.1 Introduction
    2. B.2 Threads
    3. B.3 Object-Oriented Concepts and Threads in Java
      1. B.3.1 Inheritance
      2. B.3.2 Abstract Classes
      3. B.3.3 Polymorphism
      4. B.3.4 Classes and Interfaces
      5. B.3.5 Exceptions
      6. B.3.6 Java Threads (1/2)
      7. B.3.6 Java Threads (2/2)
    4. B.4 POSIX Threads
      1. B.4.1 Creating POSIX Threads
      2. B.4.2 Basic Synchronization of Pthreads
      3. B.4.3 Mutual Exclusion
      4. B.4.4 Semaphores
      5. B.4.5 Condition Variables
      6. B.4.6 Scheduling and Priorities of POSIX Threads
  23. Appendix C The Java Modeling Framework
    1. C.1 Introduction
    2. C.2 Basic Structure of a Model
      1. C.2.1 Simulation Model
      2. C.2.2 Input Parameters
      3. C.2.3 Class Input
      4. C.2.4 Class UI
      5. C.2.5 Processes
      6. C.2.6 The RequestProcessor
      7. C.2.7 Request
      8. C.2.8 Schedular
      9. C.2.9 The IncomingRequestGenerator Class
      10. C.2.10 ResourceManager
      11. C.2.11 The Output Class
      12. C.2.12 Simulation Display
      13. C.2.13 The Plotter Class
      14. C.2.14 The QPlotter Subclass
      15. C.2.15 Animation
      16. C.2.16 The QGraphic Abstract Class
      17. C.2.17 The SchedularGraphic Concrete Subclass
      18. C.2.18 Random Number Generator Classes
      19. C.2.19 The Statistic Class
    3. C.3 Java Coding Recommendations
    4. C.4 The Simulation Package on CD-ROM
      1. C.4.1 Files on the CD-ROM
      2. C.4.2 Compiling with Java and the PsimJ Library
      3. C.4.3 Example Program (1/5)
      4. C.4.3 Example Program (2/5)
      5. C.4.3 Example Program (3/5)
      6. C.4.3 Example Program (4/5)
      7. C.4.3 Example Program (5/5)
  24. Appendix D Psim3
    1. D.1 The Psim3 Library
      1. D.1.1 The Time Dimension
      2. D.1.2 Defining Active Objects
      3. D.1.3 Running a Simulation
      4. D.1.4 Features in Class process
      5. D.1.5 Scheduling a Process
      6. D.1.6 Suspending a Process
      7. D.1.7 Interrupting a Process
      8. D.1.8 Terminating a Process
    2. D.2 The Queue Library
      1. D.2.1 General Description
      2. D.2.2 Features of Class squeue
      3. D.2.3 Features of Class pqueue
    3. D.3 The Resource Library
      1. D.3.1 General Description
      2. D.3.2 Relevant Features of the res Class
      3. D.3.3 Features in Class bin
    4. D.4 The waitq Class
    5. D.5 The condq Class
    6. D.6 Random Numbers
      1. D.6.1 Class randint
      2. D.6.2 Class erand
      3. D.6.3 Class normal
      4. D.6.4 Class poisson
      5. D.6.5 Class urand
    7. D.7 The Simulation Package on CD-ROM
      1. D.7.1 Files on the CD-ROM
      2. D.7.2 Brief Instructions for Compiling and Linking
  25. Appendix E Overview of Probability Theory
    1. E.1 Introduction
    2. E.2 Basic Concepts
    3. E.3 Probability of an Event
    4. E.4 Random Numbers
    5. E.5 Probability Distribution Functions
      1. E.5.1 The Geometric Distribution
      2. E.5.2 The Binomial Distribution
      3. E.5.3 The Exponential Distribution
      4. E.5.4 The Poisson Distribution
      5. E.5.5 The Uniform Distribution
      6. E.5.6 The Normal Distribution
    6. E.6 Statistics
    7. E.7 Analyzing Sample Data
    8. E.8 State-Dependent Models
      1. E.8.1 State Dependence
      2. E.8.2 Stochastic Matrices
  26. Appendix F Using the C++ Models
    1. F.1 Using Linux
    2. F.2 Using Unix (Sun Solaris)
    3. F.3 Using Microsoft Windows
  27. Appendix G The Computer System: An Overview
    1. G.1 Computer System Components
    2. G.2 The Central Processing Unit (CPU)
    3. G.3 Computer Instructions
    4. G.4 Fetch/Decode/Execute/Interrupt Cycle
    5. G.5 Simple Computer Instructions
    6. G.6 Computer Architecture Layers
    7. G.7 Operating Systems
      1. G.7.1 Manage the Resources of the Computer System
      2. G.7.2 Provide a User Interface
      3. G.7.3 Provide a Programming Interface
      4. G.7.4 Process Execution Mode
      5. G.7.5 Provide a Networking Interface
    8. G.8 Language Translation
      1. G.8.1 Assembly Language
      2. G.8.2 High-Level Languages
      3. G.8.3 Byte Code and the Virtual Machine
    9. G.9 CPU Internal Structure
      1. G.9.1 Adding the System Bus Interface
      2. G.9.2 Supporting the Instruction Fetch
      3. G.9.3 Detailed Program Execution
    10. G.10 CPU Performance Enhancement: Pipeline
    11. G.11 System Performance Enhancement: Cache
      1. G.11.1 The Need for Cache
      2. G.11.2 Cache Performance
      3. G.11.3 Fully Associative Cache
      4. Exercises and Questions
  28. Bibliography
  29. Index (1/2)
  30. Index (2/2)

Product information

  • Title: Principles of Modern Operating Systems, 2nd Edition
  • Author(s): Jose M Garrido, Richard Schlesinger, Kenneth Hoganson
  • Release date: October 2011
  • Publisher(s): Jones & Bartlett Learning
  • ISBN: 9781449626358