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

OS Intro-1

The document discusses the key components and functions of an operating system. It describes how an operating system acts as an interface between the user and computer hardware to make the system convenient to use. It also explains how operating systems manage resources and allow multiple programs to run concurrently through techniques like multiprogramming and timesharing.

Uploaded by

The Reborn
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

OS Intro-1

The document discusses the key components and functions of an operating system. It describes how an operating system acts as an interface between the user and computer hardware to make the system convenient to use. It also explains how operating systems manage resources and allow multiple programs to run concurrently through techniques like multiprogramming and timesharing.

Uploaded by

The Reborn
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

OPERATING SYSTEMS

Introduction

Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
What Is An Operating System?

Inside computer there is Lots of hardware !!

• One or more processors


• Main memory
• Disks
• Printers
• Various input/output devices

Managing all these components requires a layer of


software – the operating system

Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Computer System Structure
• 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)
Abstract View of Components of
Computer
What is an Operating System (2)?

• An Operating System is a program that acts as


an intermediary/interface between a user of a
computer and the computer hardware.
• It provides a user-friendly environment in which a
user may easily develop and execute programs.
• Otherwise, hardware knowledge would be
mandatory for computer programming.
What Operating Systems Do
• Depends on the point of view
• 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
– Operating system is a resource allocator and control program making
efficient use of HW and managing execution of user programs
• Users of dedicate systems such as workstations have dedicated
resources but frequently use shared resources from servers
• Mobile devices like smartphones and tables are resource poor,
optimized for usability and battery life
– Mobile user interfaces such as touch screens, voice recognition
• Some computers have little or no user interface, such as embedded
computers in devices and automobiles
– Run primarily without user intervention
OS goals
• Control/execute user/application programs.
• Make the computer system convenient to use.
• Ease the solving of user problems.
• Use the computer hardware in an efficient manner.
Services provided by an OS
• Facilities for program creation
– editors, compilers, linkers, debuggers, etc.
• Program execution
– loading in memory, I/O and file initialization.
• Access to I/O and files
– deals with the specifics of I/O and file formats.
• System access
– resolves conflicts for resource contention.
– protection in access to resources and data.

A. Frank - P. Weisberg
Layers and Views
The Operating System as a Resource
Manager
• Allow multiple programs to run at the same time
• Manage and protect memory, I/O devices, and
other resources
• Multiplexes (shares) resources in two different
ways:
• In time
• In space
Operating system timeline
• First generation: 1945 – 1955
– Vacuum tubes
– Plug boards
• Second generation: 1955 – 1965
– Transistors
– Batch systems
• Third generation: 1965 – 1980
– Integrated circuits
– Multiprogramming
• Fourth generation: 1980 – present
– Large scale integration
– Personal computers
• Next generation: ???
– Systems connected by high-speed networks?
– Wide area resource management?
First generation: direct input
• Run one job at a time
– Enter it into the computer (might require rewiring!)
– Run it
– Record the results
• Problem: lots of wasted computer time!
– Computer was idle during first and last steps
– Computers were very expensive!
• Goal:
• Make better use of an expensive commodity:
computer time
Third generation: multiprogramming
• Multiple jobs in memory
– Protected from one another
Job 3 • Operating system
protected from each job
as well
Job 2
• Resources (time,
Memory
Job 1 hardware) split between
partitions
jobs
• Still not interactive
Operating – User submits job
system – Computer runs it
– User gets results minutes
(hours, days) later
Timesharing
• Multiprogramming allowed several jobs to be
active at one time
– Initially used for batch systems
– Cheaper hardware terminals -> interactive use
• Computer use got much cheaper and easier
– No more “priesthood”
– Quick turnaround meant quick fixes for problems
Operating System Definition
• No universally accepted 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
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 kernel and starts execution
Types of modern operating
systems
• Mainframe operating systems: MVS
• Server operating systems: FreeBSD, Solaris
• Multiprocessor operating systems: Cellular IRIX
• Personal computer operating systems: Windows,
Unix
• Real-time operating systems: VxWorks
• Embedded operating systems
• Smart card operating systems
Þ Some operating systems can fit into more than one
category
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
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
Operating System Structure
• Multiprogramming (Batch system) 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
– 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

• Timesharing (multitasking) is logical extension in which


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
– Each user has at least one program executing in memory process
– 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
Multiprogramming
• The CPU is wasted if a job waits for I/O.
• This leads to: Multiprogramming (dynamic
switching):
– While one job waits for a resource, the CPU can find another
job to run. It means that several jobs are ready to run and only
need the CPU in order to continue.
• By multiprogramming the CPU time is not wasted, because, while one process
moves on some I/O work, the OS picks another process to execute till the
current one passes to I/O operation.
• Multiprogramming increases CPU utilization by
organizing jobs (code and data) so that the CPU
always has one to execute.
Memory Layout for Multiprogrammed System
Operating System Functions
• User interface - Almost all operating systems have a user
interface (UI).
– Varies between Command-Line (CLI), Graphics User Interface
(GUI), Batch
• Program execution - The system must be able to load a
program into memory and to run that program, end
execution, either normally or abnormally (indicating error)
• I/O operations - A running program may require I/O,
which may involve a file or an I/O device
• File-system manipulation - The file system is of
particular interest. Programs need to read and write files
and directories, create and delete them, search them, list
file Information, permission management.
• Communications
• Error detection
Operating System Functions (Cont.)
• Resource allocation - When multiple users or multiple
jobs running concurrently, resources must be allocated to
each of them
– Many types of resources - Some (such as CPU cycles, main
memory, and file storage) may have special allocation code, others
(such as I/O devices) may have general request and release code
• Accounting - To keep track who uses, how much and
what kinds of computer resources
• Protection and security - Control the use of stored
information, concurrent processes should not interfere with
each other
– Protection
– Security of the system from outsiders requires user authentication,
extends to defending external I/O devices from invalid access
attempts

You might also like