Download Operating Systems

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Process management (computing) wikipedia , lookup

RSTS/E wikipedia , lookup

Distributed operating system wikipedia , lookup

Burroughs MCP wikipedia , lookup

Unix security wikipedia , lookup

VS/9 wikipedia , lookup

CP/M wikipedia , lookup

Transcript
Operating Systems
Ch. 14 - An Overview
1
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
Bare Bones Computer
System
Does not provide for:




Loading instructions into MM
User interface
Storing, retrieving, manipulating files
Controlling peripheral devices
2
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
Solution
Provide a set of programs that is an integral part of
the computer system to:




Control the hardware
Load and start application programs
Provide file services
Provide a user interface
3
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
The Operating System is a collection of
Programs that work together to act as a
system manager, controlling both
Hardware and Software and acting as
a User Interface.
4
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
Evolution of the Role of OS



Earlier systems required the user to know
more about the hardware, file systems, and
I/O devices to get work done, OS smaller
Trend is for the operating system to get
bigger and provide more services so that the
user has an easier time getting useful work
done
The user is less likely to get bogged down
with technical issues
5
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
OS - Services

Objectives
– Convenience
– Efficiency

Services
–
–
–
–
Manage, load and execute programs
Accept and execute commands from user and application programs
Provide interface for user and user’s programs
Manage hardware resources
•
•
•
•
•
•
I/O support
File support
Interrupt handling
Network services - such as, distributed processing
Concurrent Processing
Bootstrapping
6
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
Bootstrapping
1. Execution begins with bootstrap loader stored in ROM
2. Looks for OS program in a fixed location
3. Loads OS into RAM
4. Transfers control to starting location of
OS
5. Loader program in OS used to load and
execute user programs
7
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
OS Services
8
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
OS Parts

Resident Part
– some OS services are critical to system operation and
must be resident in memory at all times (user command
handler, interrupt handler)
– loaded into memory via bootstrapping
– known as OS kernel

Non-Resident Part
– loaded as needed, for example, disk formatting
9
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
OS - Degree of Activity
(between user and system)

Online, interactive (conversational system)
– user is connected directly to and interacting
with system during execution of program (such
as input)

Batch processing
– program is executed in background mode
applied to data contained in a file

Event driven
10
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
Event Driven OS

An OS is usually idle until an event
(interrupt or service request) occurs
–
–
–
–
–
File request
I/O request
Keyboard or mouse input
program memory request
clock interrupt signaling program scheduler for
time slice
– etc
11
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
Operating System - Types



Single User, Single Tasking
MSDOS
Single User, Multitasking
Windows 95 or 98
Multi-user, Multitasking
Unix
12
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
Single Job Processing


Simple
Memory resident components
– Command interface shell containing commands
that must remain resident
– I/O routines that control each of the I/O devices
– File management system for locating and
maintaining files
13
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
Single Job Processing
1. Program is loaded into memory.
2. Execution begins. Program runs w/o OS interference.
3. OS regains control:
a. If the user’s program requests I/O
b. The user wishes to stop the program
execution via a keyboard interrupt
c. System malfunction
4. When program is finished, control is transferred back to
the command interpreter. Note - computer does not halt. OS
just waits for command.
14
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
Single Job Processing



System provides minimum memory
management and no scheduling
Wasteful of system resources - CPU is idle
most of the time
Nearly obsolete
15
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
Concurrent Operations


Multitasking - multiple programs running
on a single CPU
May be applied to a single user system or
to multiple users sharing a single system
16
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
Concurrent Processing



Allocates memory, CPU time, I/O devices to
multiple programs
Protects users and programs from each other
and provides for inter-program
communication
Provides feedback to the system
administrators for tailoring and tuning the
system for optimum performance
17
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
OS Services
Concurrent Operations


User services to each user
Allocation of resources to each user and
task
– Memory
– I/O
– CPU time

OS periodically evaluates status of
resources and reassigns them in order to
meet needs of each task and user
18
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
Achieving Multitasking
1. While one program is waiting for I/O to
take place, another program is using the
CPU to execute instructions
19
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
Sharing CPU during I/O Breaks
20
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
Achieving Multitasking
2. The CPU may be switched rapidly back and
forth between different programs
21
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
Time-Slicing
22
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
Achieving Multitasking
3. Concurrency algorithms usually combine
both approaches, taking into account such
issues as
- fairness to each program
- priorities of the programs
- quick response for critical needs, such as
displaying cursor or keystroke
- etc
23
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
Concurrent OS Tasks






Dispatching - selecting program to execute
Keeping track of each program
Memory management for each program
I/O device scheduling to meet needs of each
program
Suspending and restarting of all programs
with environment remaining intact
Provide security and protection for all
24
programs and users
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
Concurrent OS Tasks




Control and measure performance of the
system
establish and control communication
between programs
Manage network communication
...
25
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
OS - Structure


User interface
– CLI - Command Line Interface
– GUI - Graphical User Interface (menus,
icons, mouse-driven)
I/O control system
– device drivers - programs for each device on the
system, standard method for using each device
– Plug and Play - ideally to add new hardware and
have the OS take care of adding it to all relevant
programs and change settings to reflect change
26
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
OS - Structure

Process control management
– each executing program is a process
– each process acquires and releases resources during
execution
– processes must be synchronized in order to
facilitate sharing of resources
– OS provides process control management to keep
track of each process and its status - executing,
waiting for an event, register content, PC value, etc
27
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
OS Structure

Memory Management
– Each program is provided needed memory for
execution
– For each program, OS keeps track of memory
allocated as well as free space, protects against
writing outside allocated space, etc
– Maintains programs waiting to be loaded into
memory and allocates/deallocates space on
loading
28
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
OS Structure

File Management
– Mapping between a file’s logical name and the
physical address - maintains directories for each
device
– Retrieval and storage of files
– Info kept about each file
• (date, name, size, type, date last modified)
– Copy, move, delete, rename, find
29
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
OS - Structure

Scheduling system
– High level - jobs are placed in queue in some order and
ultimately loaded into memory for execution
– Dispatching - selection of process to be executed at a
given point in time
• Mostly preemptive - that is, programs are multitasked based on
time slicing
• Exception is for the OS itself in order to protect certain OS
operations from being interrupted
30
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
OS - Structure

Secondary storage management
– Many processes may have simultaneous I/O requests
from secondary storage
– Processing of requests affect progress of processes to
completion
– Secondary storage management reorganizes requests to
optimize completion of I/O tasks (by minimizing track
access)
31
Architecture of Computer Hardware and Systems Software
Irv Englander, John Wiley, 2000
OS - Structure

Security and protection management
– processes are limited to assigned memory space
– file access is handled by OS

Support for system administration
– configuring the system
• I/O device drivers, stack sizes, number of open files, ...
–
–
–
–
–
adding/deleting users and passwords
providing backups
recovering lost data
installing/maintaining software
monitoring security and measuring performance
32