0% found this document useful (0 votes)
60 views59 pages

CH1 PDF

Uploaded by

Sabrin Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views59 pages

CH1 PDF

Uploaded by

Sabrin Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 59

CSC 345



Operating System

Box Leangsuksun 

www.latech.edu/~box

"

Operating System Concepts! 1.1! Silberschatz, Galvin and Gagne ©2002


Class Info"

■  Office Hours: M-W 1:30-3:30pm, T-R 2-4!


!
■  Dr. Box’s & Contact Info:!
●  www.latech.edu/~box!

●  Phone 318-257-3291!
●  Email:
[email protected] or
[email protected]!
■  Class room: NH 153!
●  T-TH 8-9:5am!
!
1.2! Silberschatz, Galvin and Gagne ©2002
Class Info"

■  Main Text: !
!
●  Silberschatz, Abraham,
and Peter Galvin,
Operating System
Concepts, 7th or 8th or
9th Ed., John Wiley &
Sons, ISBN 0-  
471-69466-5 !
!

1.3! Silberschatz, Galvin and Gagne ©2002


Class Info"

■  Objective: !
!
●  introductory
course to the theory, design
and implementation of operating
systems !
●  OSis the software layer between user
programs and the computer hardware!
●  abstractions(processes, file system,
etc.) of the underlying hardware!
●  Hand-onexperiences (shell, processes,
threads, kernel & device driver). !
! 1.4! Silberschatz, Galvin and Gagne ©2002
Grading"

■  3 Programming assignments               30%                             !


!
■  2-5 Homework assignments             !15%!
■  Term Paper                                  !10%    !
■  Midterm exam ! ! ! ! !20%!
■  Final exam ! ! ! ! !25%!

1.5! Silberschatz, Galvin and Gagne ©2002


Important Dates"

              !
!
■  April 10, 2014: Midterm exam!
■  April 22, 2014: Term Paper                      !
■  May 15, 2014 : Final exam " !
! ! !!

1.6! Silberschatz, Galvin and Gagne ©2002


Box’s 1 minute Bio"
■  PhD in CS (1995): "
✦  PhD Thesis: Resource management/allocation in Heterogeneous
Parallel Distributed Computing!
■  7 years in industry labs (Bell-Labs, Lucent Technologies)"
✦  Highly Reliable Software/system (IN, Service Management)!
✦  Architect, PM, Tech lead (15-30 team size)!
✦  R&D -> 4 major network management products!
■  Associate Professor in CS since 2002."
✦  15 graduate students (4 PhD)!
■  Research Interest"
✦  Cluster computing, Fault Tolerance OS/Runtime, Reliability ,
Availability and Serviceability and Security (RASS) in HPC/HEC,
Software Engineering!
■  Services"
✦  IEEE Cluster Computing Program committee member 2004-2005!
✦  A founder and CO-Chair: High Availability and Performance
Computing 2003-2004!
✦  2003 Outstanding Teach Award, COES, Louisiana Tech U.!
✦  Creator of www.searchkatrina.org !
Operating System Concepts! 1.7! Silberschatz, Galvin and Gagne ©2002
Appeared in a front cover in two major Linux magazines, various
technical papers, research exhibitions.

web site: http://xcr.cenit.latech.edu/ha-oscar

"
HA-OSCAR beta was released to open source community

Operating System Concepts! 1.8! Silberschatz, Galvin and Gagne ©2002


Research Collaborators"

✦  National, Academic and Industry Labs "

✔  ORNL
✔  Intel, Dell, Ericsson
✔  Lucent, CRAY
✔  IU, NCSA, OSU, NCSU, UNM, TTU, UIUC, ASU
✔  Systran
✔  Sandia, Ames

✔  More on the way; US Army, NetQoS, MIT, IBM, Apple

Operating System Concepts! 1.9! Silberschatz, Galvin and Gagne ©2002


Chapter 1: Introduction"

■  What is an Operating System?!


■  Mainframe Systems!
■  Desktop Systems!
■  Multiprocessor Systems!
■  Distributed Systems !
■  Clustered System!
■  Real -Time Systems!
■  Handheld Systems!
■  Computing Environments!

Operating System Concepts! 1.10! Silberschatz, Galvin and Gagne ©2002


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.!
✦  Make the computer system convenient to use.!
■  Use the computer hardware in an efficient manner.!

Operating System Concepts! 1.11! Silberschatz, Galvin and Gagne ©2002


Computer System Components"

1. !Hardware – provides basic computing resources (CPU,


memory, I/O devices).!
2. !Operating system – controls and coordinates the use of
the hardware among the various application programs for
the various users.!
3. !Applications programs – define the ways in which the
system resources are used to solve the computing
problems of the users (compilers, database systems,
video games, business programs).!
4. !Users (people, machines, other computers). !

Operating System Concepts! 1.12! Silberschatz, Galvin and Gagne ©2002


Abstract View of System Components"

Operating System Concepts! 1.13! Silberschatz, Galvin and Gagne ©2002


Operating System Definitions"

■  Resource allocator – manages and allocates resources.!


■  Control program – controls the execution of user
programs and operations of I/O devices .!
■  Kernel – the one program running at all times (all else
being application programs).!

Operating System Concepts! 1.14! Silberschatz, Galvin and Gagne ©2002


Hardware platforms & OS"

■  Question? !
■  What are hardware and OS you have used?!

■  Will you have any issue to buy $40 computer for class
learning experiences?!

Operating System Concepts! 1.15! Silberschatz, Galvin and Gagne ©2002


Raspberry Pi"

Operating System Concepts! 1.16! Silberschatz, Galvin and Gagne ©2002


Goals: why & some Ideas"

■  To have hand-on experiences in hardware &OS!


■  $40-50 a complete computer for class materials (granted
you have keyboard & mice and use Ethernet, LCD
terminal) !

Operating System Concepts! 1.17! Silberschatz, Galvin and Gagne ©2002


Possibilities"

■  If everyone can effort to get a raspberry pi, and I


successful evaluate my sample unit this weekend, we will
have this as a platform for our class learning experiences.!
■  stay tuned!!!!

Operating System Concepts! 1.18! Silberschatz, Galvin and Gagne ©2002


Migration of Operating-System Concepts and Features"

Operating System Concepts! 1.19! Silberschatz, Galvin and Gagne ©2002


Mainframe Systems"

■  Reduce setup time by batching similar jobs!


■  Automatic job sequencing – automatically transfers
control from one job to another. First rudimentary
operating system.!
■  Resident monitor!
✦  initial control in monitor !
✦  control transfers to job !
✦  when job completes control transfers pack to monitor!

Operating System Concepts! 1.20! Silberschatz, Galvin and Gagne ©2002


Memory Layout for a Simple Batch System"

Operating System Concepts! 1.21! Silberschatz, Galvin and Gagne ©2002


Multiprogrammed Batch Systems"

Several jobs are kept in main memory at the same time, and the !
CPU is multiplexed among them. !

Operating System Concepts! 1.22! Silberschatz, Galvin and Gagne ©2002


OS Features Needed for Multiprogramming"

■  I/O routine supplied by the system.!


■  Memory management – the system must allocate the
memory to several jobs.!
■  CPU scheduling – the system must choose among
several jobs ready to run.!
■  Allocation of devices.!

Operating System Concepts! 1.23! Silberschatz, Galvin and Gagne ©2002


Time-Sharing Systems–Interactive Computing"

■  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).!
■  A job swapped in and out of memory to the disk.!
■  On-line communication between the user and the system
is provided; when the operating system finishes the
execution of one command, it seeks the next “control
statement” from the user’s keyboard.!
■  On-line system must be available for users to access data
and code.!

Operating System Concepts! 1.24! Silberschatz, Galvin and Gagne ©2002


Desktop Systems"

■  Personal computers – computer system dedicated to a


single user.!
■  I/O devices – keyboards, mice, display screens, small
printers.!
■  User convenience and responsiveness.!
■  Can adopt technology developed for larger operating
system’ often individuals have sole use of computer and
do not need advanced CPU utilization of protection
features.!
■  May run several different types of operating systems
(Windows, MacOS, UNIX, Linux)!

Operating System Concepts! 1.25! Silberschatz, Galvin and Gagne ©2002


New computers with multicore architecture"

■  more Hz is more speed – improve application runtime!


■  Issues in the past were thermo wall – heat and power
consumption too high!
■  Solution trends!
✦  More than one CPUs in one die. !
✦  Intel & AMD mutlcore CPUs!
✦  Sony PS3!

Operating System Concepts! 1.26! Silberschatz, Galvin and Gagne ©2002


Parallel Systems"

■  Multiprocessor or multi-core systems with more than on


CPU in relatively close communication.!
■  Tightly coupled system – processors share memory and a
clock; communication usually takes place through the
shared memory.!
■  Loosely coupled system – cluster computing!
■  Advantages of parallel system: !
✦  Increased throughput!
✦  Economical !
✦  Increased reliability!
✔  graceful degradation!
✔  fail-soft systems!

Operating System Concepts! 1.27! Silberschatz, Galvin and Gagne ©2002


Parallel Systems (Cont.)"

■  Symmetric multiprocessing (SMP)!


✦  Each processor runs and identical copy of the operating
system.!
✦  Many processes can run at once without performance
deterioration.!
✦  Most modern operating systems support SMP!
■  Asymmetric multiprocessing!
✦  Each processor is assigned a specific task; master
processor schedules and allocated work to slave
processors.!
✦  More common in extremely large systems!

Operating System Concepts! 1.28! Silberschatz, Galvin and Gagne ©2002


Symmetric Multiprocessing Architecture"

Operating System Concepts! 1.29! Silberschatz, Galvin and Gagne ©2002


IBM Cell Processor"

Operating System Concepts! 1.30! Silberschatz, Galvin and Gagne ©2002


Clustered Systems"

■  Clustering allows two or more systems to share storage.!


■  Provides high reliability and/or performance!
■  Asymmetric clustering: one server runs the application
while other servers standby.!
■  Symmetric clustering: all N hosts are running the
application.!

Operating System Concepts! 1.31! Silberschatz, Galvin and Gagne ©2002


Clustered Systems (continue)"

Operating System Concepts! 1.32! Silberschatz, Galvin and Gagne ©2002


Distributed Systems"

■  Distribute the computation among several physical


processors.!
■  Loosely coupled system – 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 !
✦  Computation speed up – load sharing !
✦  Reliability!
✦  Communications!

Operating System Concepts! 1.33! Silberschatz, Galvin and Gagne ©2002


Distributed Systems (cont)"

■  Requires networking infrastructure.!


■  Local area networks (LAN) or Wide area networks (WAN)!
■  May be either client-server or peer-to-peer systems.!

■  Ex of DS applications!

✦ www!
✦ Cloud!
✦ On-line stuffs!
✦ Social network etc.. !
!

Operating System Concepts! 1.34! Silberschatz, Galvin and Gagne ©2002


General Structure of Client-Server"

Operating System Concepts! 1.35! Silberschatz, Galvin and Gagne ©2002


Peer-to-Peer"

■  “Any network that relies on computing power at the


edges (ends) of a connection rather than in the network
itself. Any node is able to initiate or complete any
supported transaction with any other node. ” from
wikipedia, http://en.wikipedia.org/wiki/Peer-to-peer!
■  B-2-B!
■  File sharing services, napster, kazza etc.!

Operating System Concepts! 1.36! Silberschatz, Galvin and Gagne ©2002


Real-Time Systems"

■  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.!
■  Well-defined fixed-time constraints.!
■  Real-Time systems may be either hard or soft real-time.!

Operating System Concepts! 1.37! Silberschatz, Galvin and Gagne ©2002


Real-Time Systems (Cont.)"

!
■  Hard real-time:!
✦  Secondary storage limited or absent, data stored in short
term memory, or read-only memory (ROM)!
✦  Conflicts with time-sharing systems, not supported by
general-purpose operating systems.

!
■  Soft real-time!
✦  Limited utility in industrial control of robotics!
✦  Useful in applications (multimedia, virtual reality) requiring
advanced operating-system features.!

Operating System Concepts! 1.38! Silberschatz, Galvin and Gagne ©2002


Handheld Systems"

■  Personal Digital Assistants to Smart


telephones!
■  Old Issues:!
✦  Limited memory!
✦  Slow processors!
✦  Small display screens.!
■  Smart telephones
✦  Much more capable!
✦  More powerful!
✦  Issue remain on power consumption !

Operating System Concepts! 1.39! Silberschatz, Galvin and Gagne ©2002


Embedded system"

Operating System Concepts! 1.40! Silberschatz, Galvin and Gagne ©2002


Web-Based Computing"

■  Web has become ubiquitous!


■  PCs most prevalent devices!
■  New device has web OS, eg. ChromeOS machine!
■  More devices becoming networked to allow web access!
■  New category of devices to manage web traffic among
similar servers: load balancers"
■  Use of operating systems like Windows, client-side, have
evolved into Andriod, IoS Linux and Windows 8, which can
be clients and servers & more mobile!

1.41! Silberschatz, Galvin and Gagne ©2002


Migration of Operating-System Concepts and Features"

Operating System Concepts! 1.42! Silberschatz, Galvin and Gagne ©2002


Recap.."

Operating System Concepts! 1.43! Silberschatz, Galvin and Gagne ©2002


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!

1.44! Silberschatz, Galvin and Gagne ©2002


Four Components of a Computer System"

1.45! Silberschatz, Galvin and Gagne ©2002


Operating System Definition"
!
■  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!

1.46! Silberschatz, Galvin and Gagne ©2002


Operating System Definition (Cont.)"

■  No universally accepted definition!


■  “Everything a vendor ships when you order an operating
system” is good approximation!
✦ But varies wildly!
■  “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!

1.47! Silberschatz, Galvin and Gagne ©2002


Computer Startup"

■  bootstrap program is loaded at power-up or


reboot!
✦  Typically stored in ROM or EEPROM,
generally known as firmware"
✦  Initializates all aspects of system!
✦  Loads operating system kernel and starts
execution!

1.48! Silberschatz, Galvin and Gagne ©2002


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!

1.49! Silberschatz, Galvin and Gagne ©2002


Computer-System Operation"

■  I/O devices and the CPU can execute concurrently.!


■  Each device controller is in charge of a particular device
type.!
■  Each device controller has a local buffer.!
■  CPU moves data from/to main memory to/from local
buffers!
■  I/O is from the device to local buffer of controller.!
■  Device controller informs CPU that it has finished its
operation by causing an interrupt.!

1.50! Silberschatz, Galvin and Gagne ©2002


A Quick Tour on various OS Architectures"

Operating System Concepts! 1.51! Silberschatz, Galvin and Gagne ©2002


UNIX System Structure"

1.52! Silberschatz, Galvin and Gagne ©2002


Unix/Linux Kernel interface"

Note:Concepts!
Operating System This picture is excerpted from Write a Linux Hardware
1.53! Device Driver, AndrewGalvin
Silberschatz, O’Shauqhnessy, Unix world
and Gagne ©2002
Mac OS"

Operating System Concepts! 1.54! Silberschatz, Galvin and Gagne ©2002


Android"

Operating System Concepts! 1.55! Silberschatz, Galvin and Gagne ©2002


IOS"

Operating System Concepts! 1.56! Silberschatz, Galvin and Gagne ©2002


Window"

Operating System Concepts! 1.57! Silberschatz, Galvin and Gagne ©2002


End of Chapter 1
End of Chapter 1

You might also like