0% found this document useful (0 votes)
3 views

ch1 - introduction

The document provides an overview of operating systems, detailing their functions, types, and components, including batch systems, time-sharing systems, and real-time systems. It explains the role of the operating system as an intermediary between users and hardware, resource allocation, and process management. Additionally, it discusses various computing environments, including multiprocessor and distributed systems, as well as the evolution of operating systems from early generations to modern mobile systems.

Uploaded by

JRonald85
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

ch1 - introduction

The document provides an overview of operating systems, detailing their functions, types, and components, including batch systems, time-sharing systems, and real-time systems. It explains the role of the operating system as an intermediary between users and hardware, resource allocation, and process management. Additionally, it discusses various computing environments, including multiprocessor and distributed systems, as well as the evolution of operating systems from early generations to modern mobile systems.

Uploaded by

JRonald85
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 28

Chapter 1: Introduction

 What is an Operating System?


 Batch Systems
 Time Sharing Systems
 Personal Computer Systems
 Parallel or Multiprocessor Systems
 Distributed Systems
 Real -Time Systems
 Handheld Systems
What is an Operating System?
 A program that acts as an intermediary between a user of
a computer and the computer hardware (manages a
computer’s hardware).
 Operating system is an interface between user and
hardware, between application program and hardware
and between two programs.
 Operating system goals:
 Provide an environment in which a user can execute
programs.
 Execute user programs and make solving user problems
easier.
 Make the computer system convenient to use.
 Use the computer hardware in an efficient manner.
Computer System Components
 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
The components of a computer system are its hardware,
software and data.
Abstract View of System Components
Operating System Definitions
 OS is a resource allocator
 Manages and allocates all resources (CPU time, memory
space, file-storage space, I/O devices, etc.)
 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 (control operations of I/O
devices)
 Parts of the OS
 “The one program running at all times on the computer” is
the kernel.
 Shell – it is an interface between user and the kernel. An
application program is started from shell.
 Everything else is either
 a system program (ships with the operating system) , or
 an application program.
Layers of the Operating System

Text editor Command-line interpreter (shell)

VI sh pico
open( ), read( ), close( )
a.out
write( )

fork( )
hardware
System
who
kernel calls

cc

Application Compilers
programs

Operating System Concepts


A more detailed (layer) structure of OS
User programs
Shells, compilers, interpreters, libraries
System-call interface to kernel
Signals File system CPU scheduling
terminal handling Swapping Page replacement
kernel

character I/O block I/O system Virtual memory


system
terminal drivers
Disk drivers

Kernel interface to the hardware

Terminal Device Memory


controllers controllers controllers
terminals disks Physical memory

Operating System Concepts


Kernel Services

 I/O Management
 Process Management
 Memory Management
 File Systems Management
 Device Drivers Management
 System Calls (Application Program Interface)
 Interprocess Communication
 Protection System
 Networking

Operating System Concepts


Computer Startup

 Small piece of code – bootstrap program is


loaded at power-up or reboot
 Typically stored in ROM or EEPROM (electrically
erasable programmable ROM), generally known as
firmware
 Initializes all aspects of system
 Loads operating system kernel and starts execution
Computer System Organization
 Modern general purpose Computer-system consist of
 One or more CPUs, device controllers(disk controller, USB
controller, etc.) connected through common bus providing
access to shared memory
 CPU and the device controllers can execute in parallel
(concurrently), competing for memory cycles
 Memory controller synchronizes access to the memory to
ensure orderly accessing
Simple Batch Systems

 A fairly simple operating system was


used. An operator other than user
was used.
 A card reader was used as input
device. CPU is generally idle due to
low speeds of mechanical I/O
devices compared to those of
electronic ones (e.g. slow punch
card reader).
 Processing speed is increased by
batching similar jobs together and
run them as a group.
 Automatic job sequencing allows
transfer of control from one job to
another.
Spooling
 Spooling: Simultaneous Peripheral Operation on-line
 Jobs are not read directly into memory but onto the disk.
Since reading is time consuming, some other jobs can be
performed during reading.
 Overlap I/O of one job with computation of another job.
While executing one job, the OS:
 Reads next job from card reader into a storage area on the
disk (job queue).
 Outputs printout of previous job from disk to printer.
 The main goal is reduce CPU idle time since I/O speed is
slower than CPU speed.
 By spooling technique a printer could be used by users
without waiting.
Multiprogrammed Batch Systems
Several jobs are kept in main
memory at the same time which is
known as job pool(ready to run jobs).

 The operating system picks one job


from memory to execute.

When a job has to wait(reading


some value), operating system
switches to another job.

 Eventually, the first job finishes


waiting and gets the CPU back.

As long as there is always some


jobs to execute, the CPU will never
be idle.
OS Features Needed for Multiprogramming
In multiprogramming systems there are several jobs in memory at
the same time.
 Single user cannot keep CPU and I/O devices busy at all times.
 Multiprogramming organizes jobs (code and data) so CPU always
has one to execute.
 A subset of total jobs in system is kept in memory.
 One job selected and run via job scheduling.
 When it has to wait (for I/O for example), OS switches to another
job.
Memory management – the system must allocate the memory to
several jobs.

CPU scheduling – the system must choose among several


ready to run jobs. The system must know their exact locations in
memory.

Management of devices including allocation, process


management, disk storage and memory management.
Time-Sharing (multitasking) Systems–Interactive
Computing
 A time-shared OS uses CPU scheduling and multiprogramming
that provides each user a small portion of time.
 The CPU is multiplexed among several jobs that are kept in
memory and on disk (the CPU is allocated to a job only if the
job is in memory).
 The CPU is switched among multiple jobs so frequently that the
users may interact with each program during execution.
 A job swapped in and out of memory to the disk.
 On-line communication between the user and the system is
provided
 Time-sharing also compensates for low-speed I/O operations
such as low-speed keyboard typing.
 A time-shared operating system allows the many users to share
the computer simultaneously.

 Note: A program loaded into memory and executing is called a


process (will be explained later).
Memory Layout for Multiprogrammed System
Computing Environments

Single – Processor Systems

Personal computers – computer system dedicated to a


single user.
I/O devices – keyboards, mice, display screens, small
printers.
Can adopt technology developed for larger operating
system.
May run several different types of operating systems
(Windows, MacOS, UNIX, Linux)
Client PCs, printers, servers
Parallel or Multiprocessor Systems
 Multiprocessor systems with more than one CPU in close
communication.
 Tightly coupled system – processors share memory and
other resources(peripheral devives); communication
usually takes place through the shared memory.
 Advantages of parallel system:
 Increased throughput: More work is done in the same time
period. Increasing processors by n does not mean
decreasing operation time by n.
 Economical: Shared peripherals and power supplies.
Several programs can be run on same set of data on a
shared disk.
 Increased reliability
 fail-soft systems. The failure of one processor does not
halt the system. The rest continues to do the task.
 graceful degradation: The ability to continue providing
service proportional to the level of surviving hardware.
Parallel Systems (Cont.)

 Asymmetric multiprocessing
 Each processor is assigned a specific task; master
processor schedules and allocates work to slave
processors.
 More common in extremely large systems

 Symmetric multiprocessing (SMP)


 Each processor performs all tasks within the operating
system
 All proccesors are peers, no mater-slave reationship
 Most modern operating systems support SMP
Symmetric Multiprocessing Architecture
A Dual-Core Design
 Multiple computing cores on a single chip(multicore)
 More efficient than multiple chips with single core because on-
chip communication is faster than between-chip communication
 Figure shows dual-core design with two cores on the same chip
Distributed Systems
 Distribute the computation among several physical
processors referred to as sites, nodes, computers etc.
 Unlike tightly-coupled parallel systems, these are Loosely
coupled systems
 each processor has its own local memory
 processors communicate with one another through various
communications lines, such as high-speed buses or
telephone lines.
 Advantages of distributed systems.
 Resources Sharing (printers, files etc.)
 Computation speed up – load sharing
 Reliability (if one site fails in a DS, the remaining sites can
potentially continue operating).
 Communications – information exchange (via electronic
mail)
Distributed Systems (cont)
 Requires networking infrastructure.
 Collection of separate, possibly heterogeneous, systems
networked together
 Network is a communications path, TCP/IP most
common
– Personal Area Network (PAN)
– Local Area Network (LAN)
– Metropolitan Area Network (MAN)
– Wide Area Network (WAN)
 Internet
 Communication scheme allows systems to exchange
messages
 Illusion of a single system
 Distributed systems may be either
 client-server systems or
 peer-to-peer systems
Distributed System Structures

General Structure of Client-Server


Client-Server Computing
 Terminals supplanted by smart PCs
 Many systems now servers, responding to requests generated
by clients
 Compute-server system provides an interface to client to
request services (i.e., database, e-mail, printer etc.)
 File-server system provides interface for clients to store
and retrieve files (webserver)
Peer-to-Peer Computing
 Another model of distributed system
 P2P does not distinguish clients and
servers
 Instead all nodes are considered peers
 May each act as client, server or both
 Node must join P2P network to participate
in P2P system.
 Registers its service with central lookup
service on network, or
 Broadcast request for service and
respond to requests for service via
discovery protocol
 Examples include Napster and Gnutella,
Voice over IP (VoIP) such as Skype.
 .Skype uses a hybrid peer-to-peer approach. It includes a
centralized login server, but it also incorporates decentralized peers and allows
to peers to communicate.
Real-Time Embedded Systems
 Embedded systems run real-time operating systems. Generally
there is no user interface. They perform managing and monitoring
of the hardware.

 Often used as a control device in a dedicated application such as


controlling scientific experiments, medical imaging systems,
industrial control systems, and some display systems (car
engines, manufacturing robots, DVDs, microwave ovens,
firewalls,etc.)

 Real-time OS has well-defined fixed time constraints


 Processing must be done within the defined constraint. Data
brought by sensors to the computer, must be analyzed and
corresponding control adjustments must be done in a small time
interval
 Correct operation only if constraints met.
Mobile Systems

 Personal Digital Assistants (PDAs)


 Handheld smartphones, tablets, etc.
 Use IEEE 802.11 wireless, or cellular data networks for
connectivity
 Leaders are Apple iOS and Google Android
 Issues:
 Limited memory
 Slow processors
 Small display screens.
History of Operating Systems
First Generation: Fourth Generation:
*1945-1955 *1980-present
*Vacuum Tubes
*Large scale integration
*OS: Plugboards
*Personal computers
*OS: personal systems
Second Generation:
*1955-1965
*Transistors Next Generation:
*OS: Batch Systems *????
*System connected to high
Third Generation: speed networks
*1965-1980 *Wide area resource control
*Integrated circuits *OS: net-centric computing,
*OS: Multiprogramming embedded systems.

You might also like