Você está na página 1de 21

Chapter 1: Introduction

Contents
• Computer System Structure (1.1)
• Definition of an Operating System
• Abstract views of an Operating System and Efficiency and System
Performance Goals
• Functions of an Operating System (1.4)
• Operating System Operations (Event Driven Systems) (1.5)
• Evolution of Operating System Designs (20.1, 20.2)
• Classes of Operating Systems and Examples (1.12)
Computer System Structure
Computer System Structure (Cont.)
• 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
Definition of an Operating System
• A program that acts as an intermediary between a user of a computer
and the computer hardware

• Operating system goals (general):


• Execute user programs and make solving user problems easier
• Make the computer system convenient to use
• Use the computer hardware in an efficient manner
Abstract Views of an Operating System
• Depends on the point of view
• From users’ point of view (Efficiency and Performance Goals)
• Personal computer users want convenience and ease of use
• But shared computer such as mainframe or minicomputer must keep all
users happy by providing good resource utilization
• Users of dedicate systems such as workstations have dedicated resources but
frequently use shared resources from servers (hybrid of the above two)
• Handheld computers are resource poor, optimized for usability and battery
life (performance)
• Some computers have little or no user interface, such as embedded
computers in devices and automobiles (response time, etc.)
Abstract Views of an Operating System (Cont.)
• From system point of view
• OS is a resource allocator
• Manages all resources
• Decides between conflicting requests for efficient and fair resource use
• OS is a control program
• Controls execution of programs to prevent errors and improper use of the computer
Functions of an Operating System
• Execution of a job
• Create a process for the job
• Schedule the job and bring it to main memory from disk
• Schedule the CPU for executing the job
• If the job’s memory requirements are more than the available main memory
virtual memory is used
• Virtual memory is a logical extension of the physical memory
• If multiple jobs are to be executed on a system where the number of CPUs is less
than the number of jobs (to provide time sharing to many users on a mainframe
or mini computer) swapping is used. Swapping also enables suspending a process
from executing (when I/O operation is being performed by it) and staring to
execute another process
• Swapping swaps a process from main memory to secondary memory
Operating-System Operations (Event Driven
Systems)
• Interrupt driven (hardware and software)
• Hardware interrupt by one of the devices
• Software interrupt (exception or trap):
• Software error (e.g., division by zero)
• Request for operating system service
• Other process problems include infinite loop, processes modifying each other or the
operating system
Operating-System Operations (Event Driven
Systems) (Cont.)
• Dual-mode operation allows OS to protect itself and other system
components
• User mode and kernel mode
• Mode 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
• Increasingly CPUs support multi-mode operations
• i.e. virtual machine manager (VMM) mode for guest VMs
Operating-System Operations (Event Driven
Systems) (Cont.)
Operating-System Operations (Event Driven
Systems) (Cont.)
• Timer to prevent infinite loop / process hogging resources
• Timer is set to interrupt the computer after some time period
• Keep a counter that is decremented by the physical clock.
• Operating system set the counter (privileged instruction)
• When counter zero generate an interrupt
• Set up before scheduling process to regain control or terminate program that
exceeds allotted time
Evolution of Operating System Designs
• Program/Job execution consists of
• conversion of program/job to object code
• loading of program/job with data
• program/job execution
• reading of input and writing of output
• transition from one program/job (after completion) to the next
• Operating systems evolved by improving the way above steps are
performed
Evolution of Operating System Designs (Cont.)
• Manual conversion of program/job to object code
• Manual loading of program/job with data
• Individual program/job-wise execution
• Sequential reading of input and writing of output (I/O)
• Manual transition from one program/job (after completion) to the
next
Evolution of Operating System Designs (Cont.)
• Compiler and Assembler used to convert program/job to object code
• Manual loading of program/job with data
• Individual program/job-wise execution
• Sequential reading of input and writing of output (I/O)
• Manual transition from one program/job (after completion) to the
next
Evolution of Operating System Designs (Cont.)
• Compiler and Assembler used to convert program/job to object code
• Manual loading of program/job with data
• Programs/jobs with similar needs batched together and executed
• Sequential reading of input and writing of output (I/O)
• Manual transition from one program/job (after completion) to the
next
Evolution of Operating System Designs (Cont.)
• Compiler and Assembler used to convert program/job to object code
• Automatic loading of program/job with
data with the help of control cards

• Programs/jobs with similar needs batched together and executed


• Sequential reading of input and writing of output (I/O)
• Automated transition from one program/job
(after completion) to the next using a system
program called resident monitor
(first operating system)
Evolution of Operating System Designs (Cont.)
• Compiler and Assembler used to convert program/job to object code
• Automatic loading of program/job with data with the help of control
cards
• Programs/jobs with similar needs batched together and executed
• simultaneous peripheral operation on-line
(Spooling) (parallel I/O) was used for
input/output

• Automated transition from one program/job (after completion) to the


next using a system program called resident monitor (first operating
system)
Evolution of Operating System Designs (Cont.)
Classes of Operating Systems and Examples
• Depending on the form of availability
• Open-source – available in source code form
• Example: Linux, Unix OSs
• Closed-source – available in binary (executable) form
• Example: Microsoft Windows OSs
• Hybrid – partly open-source and partly closed-source
• Example: Apple’s Mac OS and iOS kernel (Darwin) and other closed source components
Questions
• Describe the execution of a program in terms of different functions of
operating system
• Describe the execution of a program in terms of different steps
performed by the operating system in response to different events
• Describe the improvements brought in by the evolving operating
systems in the execution of any example program/job

Você também pode gostar