Download as pdf or txt
Download as pdf or txt
You are on page 1of 36

Chapter 1: Introduction

Objectives

 To describe an operating system.


 To provide a grand tour of the major components of
operating systems
 To give an overview of the many types of computing
environments
 To describe the basic organization of computer systems

1.2
What is an Operating System?

 A program that acts as an intermediary between a user of a


computer and the computer hardware.
 OS is a system software acting as an interface between
application program and hard wars.
 a program for hard ware abstraction and resources
management.
 Operating system goals:
 Execute user programs and make solving user problems
easily.
 Make the computer system convenient to use
 Use the computer hardware in an efficient manner
(Efficiency of usage of CPU, memory, etc..)
 Protect user from unauthorized release and modification
of information.

1.3
Operating Systems

• Operating systems allow the


separation of hardware
management from
applications/programs.

• This allows the applications to


work across different hardware
platforms, although the
applications are still specific to
the OS.

1.4
Android

Examples of Operating system

1.5
Computer System Structure

 Computer system can be divided into four components:


 Hardware – provides basic computing resources
 CPU, memory, I/O devices, etc.
 Operating system
 Controls and coordinates the 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

1.6
Four Components of a Computer System

1.7
Operating System Definition

 OS is a resource allocator
 Manages all resources
 Decides between conflicting requests for efficient and fair
resource use.
 OS control program
 Controls the execution of programs to prevent errors and
improper use of the computer.
 “The 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.

1.8
Components of operating system

 Kernel

 Shell

 Other program
 Or
 Process management, memory management, file
management, storage management, security
management components, etc.

1.9
Kernel

Kernel is the heart of an operating system.


 It allocates the system resources and coordinate all the details of the
computer's internals.
 It interacts with the hardware and perform most of the tasks like;
 memory management,
 task scheduling,
 file management,
 input and output requests handling
 access CPU and peripheral device like hard disk, DVD, RAM,
Printers, etc.

1.10
Shell

 Utility that processes user requests.

 Users communicate with the kernel through a program known as

the shell.

 When you type in a command at your terminal, the shell interprets

the command and calls the program that you want and pass the

request to kernel.

 The shell is a program that reads the user commands, executing

commands, and then prints the result.

 A shell can be GUI or text based(command based) interface.

 Examples: sh,csh, ksh, bash, etc.


1.11
Functions of an OS
 User Environment - OS layer transforms bare hardware machine into higher level
abstractions.
 Execution environment –to run other programs.
 process management, file manipulation, interrupt handling, I/O operations.
 Error detection and handling- internal and external hardware errors. And
various software errors.
 Make the response that clears the error condition with least impact on the
user
 Security- enforce security through abstraction.
 Access Control: regulating user access to the total system, subsystem
and data. And process access to various resources and objects.
 Information flow control: flow of data within the system.
 Securing a system against internal and external attacks.
 Communication : message sending and receiving.
 Message passing
 Shared memory
1.12
Functions of an OS
 Resource Management
 Time management
 CPU and disk transfer scheduling
 Space management
 main and secondary storage allocation
 Synchronization and deadlock handling
 IR, PC, critical section
 Accounting and status information
 resource usage tracking
 Collect usage statistics
 Monitor performance

1.13
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’s kernel and starts execution

1.14
Computer-System Architecture

 Most systems use a single general-purpose processor.


 Most systems have special-purpose processors as well
 Multiprocessors systems are 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:
1. Asymmetric Multiprocessing – each processor is assigned a
specific task.
2. Symmetric Multiprocessing – each processor performs all tasks.

1.15
What Operating Systems Do

 Users want convenience, ease of use and good


performance
 Don’t care about resource utilization
 But shared computer such as mainframe or minicomputer
must keep all users happy.
 Users of dedicate systems such as workstations have
dedicated resources but frequently use shared resources
from servers
 Handheld computers are resource poor, optimized for
usability and battery life.
 Some computers have little or no user interface, such as
embedded computers in devices and automobiles.

1.16
Operating-System Operations
 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

1.17
Operating-System Operations (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

1.18
Transition from User to Kernel Mode
 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

1.19
Types of Operating System

Based on number of user and tasks, operating system can


be categorized as:
 single-user single-tasking
 One user executes one task at a time.

 single user multi-tasking


 One user executes multiple tasks in parallel

 multiuser multi-tasking operating systems.


 Supports multiple users and tasks

1.20
Types of OS

 serial processing OS
 Batch OS
 Multi-programmed OS
 Time sharing OS
 Multiprocessors OS
 Real time OS
 Distributed OS

1.21
1.22
1.23
1.24
1.25
1.26
1.27
1.28
1.29
Cont…

 Real-Time Systems : is used when rigid time

requirements have been placed on the operation of a


processor or the flow of data.

 Sensors bring data to the computer

 Computer must analyze the data and possibly adjust


controls

 works in fixed time constraints

1.30
1.31
1.32
1.33
Cont…

Multiprocessor systems have three main advantages


 Increased throughput: more work with less time
 Economy of scale : save money than single-core type
because it used a shared resource.
 Increased reliability : work can be done among more CPU that
failure of one of it not cause halt rather sow down, is called
graceful degradation, a system named fault tolerant

1.34
Cont…
Common multiple-processor systems :

 Symmetric multiprocessing (SMP) : processor runs an identical copy


of the operating system and communicate with one another as needed

 Asymmetric multiprocessing : in which each processor is assigned a


specific task, and a master processor controls the system, scheme
defines a master-slave relationship

1.35
Characteristic of Modern OS

 Micro Kernel architecture- assign only few functions


 Address space, inter process communication, basic scheduling
 Multi-Tasking
 creating displaceable unit of work called for a particular process
 Symmetric Multi-Processing
 Performance, availability, incremental growth, scaling
 Distributed OS

1.36

You might also like