Uploaded by adedaratimilehin.gold

COMP214-OL1

advertisement
Chapter 1: Introduction
 What is an Operating System?
 Mainframe Systems
 Desktop Systems
 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.
 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.
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).
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
Operating System Definitions
 Resource allocator – manages and allocates resources
(hardware, software and data).
 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).
Kernel Services:
 Process Management
 Memory Management
 File systems
 Device drivers
 System calls
 Interprocess communication
 Network protocols
OS Features Needed for Multiprogramming
 Memory management – the system must allocate the memory
to several jobs.
 CPU scheduling – the system must choose among several jobs




ready to run. The system must know their exact locations in
memory
Management of devices including allocation.
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 processes so frequently
that the users may interact with each program during execution.
A job swapped in and out of memory to the disk.
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)
General Structure of Client-Server

Client-Server Computing
 Dumb terminals supplanted by smart PCs

Many systems now servers, responding to requests generated by
clients
 Compute-server provides an interface to client to request
services
 File-server provides interface for clients to store and retrieve
files
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
 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 Limewire
Real-Time Systems
 Used when rigid time requirements exist on the operation of
processor or flow of data. Data brought by sensors must be
analyzed and corresponding control adjustments must be done
in a small time interval.
 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. (Robot arm, Weapon
systems)
 Should produce correct results in a fixed time limit.
Handheld Systems
 Personal Digital Assistants (PDAs)
 Cellular telephones
 Issues:
 Limited memory
 Slow processors
 Small display screens.
Chapter 2: Operating-System
Functions
 Process Management
 Main Memory Management
 File Management
 I/O System Management
 Secondary Storage Management
 Networking
 Protection System
Process Management
 A process is a program in execution. A process needs
certain resources, including CPU time, memory, files, and
I/O devices, to accomplish its task.
 The operating system is responsible for the following
activities in connection with process management.
 Process creation and deletion.
 process suspension and resumption.
 Provision of mechanisms for:
 process synchronization
 process communication
Main-Memory Management
 Memory is a large array of words or bytes, each with its
own address. It is a repository of quickly accessible data
shared by the CPU and I/O devices.
 Main memory is a volatile storage device. It loses its
contents in the case of system failure.
 The operating system is responsible for the following
activities in connections with memory management:
 Keep track of which parts of memory are currently being
used and by whom.
 Decide which processes to load when memory space
becomes available.
 Allocate and deallocate memory space as needed.
File Management
 A file is a collection of related information defined by its
creator. Commonly, files represent programs (both
source and object forms) and data.
 The operating system is responsible for the following
activities in connections with file management:
 File creation and deletion.
 Directory creation and deletion.
 Support of primitives for manipulating files and directories.
 Mapping files onto secondary storage.
 File backup on stable (nonvolatile) storage media.
Secondary-Storage Management
 Since main memory (primary storage) is volatile and too
small to accommodate all data and programs
permanently, the computer system must provide
secondary storage to back up main memory.
 Most modern computer systems use disks as the
principle on-line storage medium, for both programs and
data.
 The operating system is responsible for the following
activities in connection with disk management:
 Free space management
 Storage allocation
 Disk scheduling
Networking (Distributed Systems)
 A distributed system is a collection processors that do not




share memory or a clock. Each processor has its own
local memory.
The processors in the system are connected through a
communication network.
Communication takes place using a protocol.
A distributed system provides user access to various
system resources.
Access to a shared resource allows:
 Computation speed-up
 Increased data availability
 Enhanced reliability
Operating System Services
 Program execution – system capability to load a program into




memory and to run it.
I/O operations – since user programs cannot execute I/O
operations directly, the operating system must provide some
means to perform I/O.
File-system manipulation – program capability to read, write,
create, and delete files.
Communications – exchange of information between processes
executing either on the same computer or on different systems
tied together by a network. Implemented via shared memory or
message passing.
Error detection – ensure correct computing by detecting errors
in the CPU and memory hardware, in I/O devices, or in user
programs.
Download