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

OS Chapter02

Uploaded by

mh3804576
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)
17 views

OS Chapter02

Uploaded by

mh3804576
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/ 35

Operating Systems:

Internals and Design Principles, 6/E


William Stallings

Chapter 2
Operating System Overview

Patricia Roy
Manatee Community College, Venice,
FL
©2008, Prentice Hall
Operating System
• A program that controls the execution of application
programs

• An interface between applications and hardware.

• Responsible for managing hardware resources.

• Kernel is a portion of operating system that is in main


memory. It contains most frequently used functions.
Operating System Objectives
• Convenience
• Efficiency
• Ability to evolve
Layers and Views
OS Services
• Program development
• Program execution
• Access I/O devices
• Controlled access to files
• System access
Evolution of Operating
Systems
• Serial Processing
• Simple Batch Systems
• Multiprogrammed Batch Systems
• Time Sharing Systems
• Parallel Systems
• Distributed Systems
• Real Time Systems
Serial Processing
– No operating system
– Machines run from a console with display lights,
toggle switches, input device, and printer.
– Schedule time
– Programs in machine code are loaded with the input
device.
– If an error occur the program was halted and the
error condition was indicated by lights.
– If the program is success, then output will appear on
the printer.
Serial Processing
• Main problem here is the setup time. That
is single program needs to load source
program into memory, saving the compiled
(object) program and then loading and
linking together.
Simple Batch Systems
qSpeeds up processing.
qMonitor software controls the sequence of events.
qBatch jobs (similar requirements) together.
qProgram returns control to monitor when finished

• The problems with Batch Systems are:


– Lack of interaction between the user and job.
– CPU is often idle, because the speeds of the mechanical I/O
devices are slower than CPU.
Simple Batch Systems
• For overcoming this problem use the Spooling
Technique.

• Spool is a buffer that holds output for a device, such as


printer, that can not accept interleaved data streams.

• when the job requests the printer to output a line, that


line is copied into a system buffer. When the job is
completed, the output is printed.
Job Control Language
• Special type of programming language
• Provides instruction to the monitor
– What compiler to use
– What data to use
Hardware Features
• Memory protection
– Does not allow the memory area containing the
monitor to be altered
• Timer
– Prevents a job from monopolizing the system
• Privileged instructions
– Certain machine level instructions can only be
executed by the monitor
• Interrupts
– Early computer models did not have this capability
Memory Protection
• User program executes in user mode
– Certain instructions may not be executed
• Monitor executes in system mode
– Kernel mode
– Privileged instructions are executed
– Protected areas of memory may be accessed
System Utilization Example
Uniprogramming
• Processor must wait for I/O instruction to
complete before proceeding
Multiprogramming
• When one job needs to wait for I/O, the
processor can switch to the other job
Multiprogramming
Time-Sharing Systems
• Multiple users simultaneously access the system through
terminals.
• Processors time is shared among multiple users
simultaneously.
• Multiple jobs are executed by the CPU by switching
between them.
• User receives an immediate response.
Time-Sharing Systems
Batch Multiprogramming versus
Time Sharing
Multiprocessing / Parallel
Systems
• There are more than one processor.
• Multiprocessing: each processor executes different program.
• Parallel processing: each processor executes part of the
same program (work together) to run it faster.

• The advantages of multiprocessing system are as follows


– Throughput (Number of jobs to finish in a time period)
– Save money by sharing peripherals and power supplies
– Increase reliability
– Fault-tolerant (Failure of one processor will not halt the system).
Multiprogramming and
Multiprocessing
Distributed Systems
• Distribute computation among several processors.
• The processors do not share memory or a clock.
• Each processor has its own local memory.
• The processors communicate with one another
through various communication lines.
• Processors may vary in size and function.
Distributed Systems
• The advantages of distributed systems are as
follows:
– Resource Sharing: With resource sharing facility user at one
site may be able to use the resources available at another.
– Communication Speedup: Speedup the exchange of data with
one another via electronic mail.
– Reliability: If one site fails in a distributed system, the remaining
sites can potentially continue operating.
Real Time Systems
• A real-time system requires that results be
produced within a specified deadline period.
• Real-time systems are typically single-purpose.
• Real-time systems often do not require
interfacing with a user.

Examples:
– Air Traffic control.
– Telecommunications
Soft and Hard Real Time tasks

• Hard real time task:


– Task must complete before or at deadline.
– Value of completing the task after deadline is
zero.

• Soft real time


– Missing deadline incurs a penalty
– Penalty increases as tardiness increases
32
Modern Operating Systems
• Microkernel architecture
– keep the kernel as small as possible and
other OS functions handled by separate
processes
• Address spaces management
• Interprocess communication (IPC)
• Basic scheduling
Modern Operating Systems
• Multithreading
– Process is divided into threads that can run
concurrently
• Thread
– Dispatchable unit of work
– executes sequentially and is interruptable
• Process is a collection of one or more threads
OS Achievements
• Processes
• Memory management
• Information protection and security
• Scheduling and resource management
• System structure
Processes
• Process is a program in execution
• It is an instance of a program running on a
computer
• It is an entity that can be assigned to and
executed on a processor
Process
Memory Management
• Process isolation
– processes cannot interfere with other processes

• Automatic allocation and management


– allocation is transparent, virtual memory

• Support of modular programming


– modules can be of varying size

• Protection and access control


– at times memory needs to be shared

• Long-term storage
– a file system
Information Protection and
Security
• Availability
– Protecting the system against interruption
• Confidentiality
– Assuring that users cannot read data for which
access is unauthorized
• Data integrity
– Protection of data from unauthorized modification
• Authenticity
– Proper verification of the identity of users and the
validity of messages or data
Scheduling and Resource
Management
• Fairness
– Give equal and fair access to resources
• Differential responsiveness
– Discriminate among different classes of jobs
• Efficiency
– Maximize throughput, minimize response time, and
adjust as many uses as possible
System Structure
• View the system as a series of levels
• Each level performs a related subset of
functions
• Each level relies on the next lower level to
perform more primitive functions
• This decomposes a problem into a number
of more manageable subproblems

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy