Docsity

Operating System Concepts: An Introduction to Computer Systems and Operating Systems, Lecture notes of Design

Partial preview of the text

Download Operating System Concepts: An Introduction to Computer Systems and Operating Systems and more Lecture notes Design in PDF only on Docsity!

Operating System Concepts Silberschatz, Galvin and Gagn

Chapter 1: Introduction

Objectives

 To provide a grand tour of the major operating systems components

 To provide coverage of basic computer system organization

Computer System Structure

 Computer system can be divided into four components

 Hardware – provides basic computing resources  CPU, memory, I/O devices  Operating system  Controls and coordinates use of hardware among various applications and users  Application programs – define the ways in which the system resources are used to solve the computing problems of the users  Word processors, compilers, web browsers, database systems, video games  Users  People, machines, other computers

Four Components of a Computer System

Computer Startup

bootstrap program is loaded at power-up or reboot

 Typically stored in ROM or EPROM, generally known as firmware  Initializes all aspects of system  Loads operating system kernel and starts execution

 “The one program running at all times on the computer” is the kernel. Everything else is either a system program (ships with the operating system) or an application program

Computer System Organization

 Computer-system operation

 One or more CPUs, device controllers connect through common bus providing access to shared memory  Concurrent execution of CPUs and devices competing for memory cycles

Interrupt Timeline

Storage-Device Hierarchy

Computer-System Architecture

 Multiprocessors systems growing in use and importance

 Also known as parallel systems, tightly-coupled systems  Advantages include

  1. Increased throughput
  2. Economy of scale
  3. Increased reliability – graceful degradation or fault tolerance  Two types
  4. Asymmetric Multiprocessing
  5. Symmetric Multiprocessing

Symmetric Multiprocessing Architecture

Operating-System Operations

 Interrupt driven by hardware

 Software error or request creates exception or trap

 Division by zero, request for operating system service

Dual-mode operation allows OS to protect itself and other system components  User mode and kernel modeMode bit provided by hardware  Provides ability to distinguish when system is running user code or kernel code  Some instructions designated as privileged , only executable in kernel mode  System call changes mode to kernel, return from call resets it to user

Transition from User to Kernel Mode

Process Management Activities

The operating system is responsible for the following activities in connection with process management:

 Creating and deleting both user and system processes

 Suspending and resuming processes

 Providing mechanisms for process synchronization

 Providing mechanisms for process communication

 Providing mechanisms for deadlock handling

Memory Management

 All data in memory before and after processing

 All instructions in memory in order to execute

 Memory management determines what is in memory when

 Optimizing CPU utilization and computer response to users

 Memory management activities

 Keeping track of which parts of memory are currently being used and by whom  Deciding which processes (or parts thereof) and data to move into and out of memory  Allocating and deallocating memory space as needed