lecture 1 - CUNY Home
Download
Report
Transcript lecture 1 - CUNY Home
Introduction
What is an Operating System
What Operating Systems Do
How is it filling our life
Lecture 1
1-1
What is an Operating System?
“A program that acts as an intermediary
between a user of a computer and the
computer hardware”
Operating system goals:
Execute user programs and make solving user
problems easier
Use the computer hardware in an efficient
manner
Make the computer system convenient to use
Lecture 1
1-2
What is a Computer System?
Computer system structure can be divided into four
components:
Hardware – provides basic computing resources
• CPU, memory, I/O devices
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
Operating system – “the manager of the above three”
• Controls and coordinates use of hardware among various
applications and users
Lecture 1
1-3
Computer System and how OS fits into it
Lecture 1
1-4
Operating System Definition
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
Lecture 1
1-5
How OS evolved
Mainframe Systems
One of the earliest computer systems
Huge computers
Very simple systems
Can process one job after another
Jobs were fed with punch cards
Operators sort jobs into batches
Also known as Batch Systems
Image courtesy: http://en.wikipedia.org/wiki/File:Ibm704.gif
Mainframe systems have severe efficiency problem
WHY?
Lecture 1
1-6
Mainframe OS – severe disadvantages
Mainframe Systems
Process one job after another
Jobs were fed with punch cards
CPU works in microseconds range
I/O system very slow
Approx. 1200 cards/min.
20 cards/sec.
CPU is almost always idle!!!
Image courtesy: http://en.wikipedia.org/wiki/File:Ibm704.gif
It was needed to keep multiple jobs ready so that CPU does not
become idle…how?
Introduction of disk technology changed the complete OS history
Lecture 1
1-7
Multiprogrammed Systems
Multiprogramming needed for efficiency
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
How to achieve this?
Disk technology helped us to keep multiple jobs
in job pool (Disk)
A subset of total jobs in system is kept in
memory
One job selected and executed
When it has to wait (I/O for example), OS
switches to another job
Multiprogrammed introduced two novel challenges
Job scheduling
Memory management
Lecture 1
1-8
Time-Sharing Systems
Time-sharing systems are logical extension of
multiprogrammed systems
Also known as multitasking
Each user has at least one program executing in
memory process
CPU switches jobs so frequently that users can
interact with each job while it is running, creating
interactive computing
Response time should be < 1 second
If several jobs ready to run at the same time CPU
scheduling
If processes don’t fit in memory, swapping moves
them in and out to run
Virtual memory allows execution of processes not
completely in memory
Lecture 1
1-9
Multiprocessor Systems
Most systems use a single general-purpose processor (PDAs
through mainframes)
Multiprocessor 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
1. Asymmetric Multiprocessing
2. Symmetric Multiprocessing
Lecture 1
1-10
Symmetric Multiprocessing Architecture
Lecture 1
1-11
A Dual-Core Design
Lecture 1
1-12
Shift to Distributed Systems
Client-Server Computing
Distributed systems over the network
Many systems now servers, responding to requests generated
by clients
Compute-server provides an interface to client to request services
(i.e. database)
File-server provides interface for clients to store and retrieve files
Lecture 1
1-13
Peer-to-Peer Systems
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
• 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 bitTorrent
Lecture 1
1-14
Change in Computing Environments
Traditional computing
Office environment
• Earlier, PCs connected to a network, terminals attached
to mainframe or minicomputers providing batch and
timesharing
• Now, portals allowing networked and remote systems
access to same resources
Home networks
• Earlier, used to be single system, then modems
• Now, firewalled, networked
Lecture 1
1-15