Uploaded by Shaheer Munawar

Week 1 Intro OS S2022

advertisement

OS performs no useful function by itself

It is similar to a government. and just an environment is
provided within which other programs can do useful
work.
2

A program that acts as an interface between a user of a computer
and the computer hardware
Users
OS
Computer System
3


Important to understand and know how to correctly use when writing user applications.
Large and complex systems that have a high economic impact and result in interesting
problems of management.


Few actually involved in OS design and implementation but nevertheless many
general techniques to be learned and applied.
Combines concepts from many other areas of Computer Science: Architecture,
Languages,
Data Structures, Algorithms, etc.

Computer system main components:
 Hardware which provides basic computing resources like
 CPU, memory, I/O devices
 Operating system
 Controller and coordinator 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
6
7


It depends on the user perspective
If Users is a naive user
◦ user want convenience, ease of use
◦ Naïve or intermediate user don’t take tension about resource
allocation and their usage.

If User is a root or admin
◦ Admin basic goal is to keep all users happy by sharing available
resources
8

User and computer system can interact in many ways. Some general
interactions are:

Command Interpreter get and execute the next user-specified command
 commands can be implemented in two ways
 command interpreter itself contains the code to execute the
command
 implements most commands through system programs like UNIX
9

System calls provide an interface to the services made available by
an operating system.
◦ These calls are generally available as routines written in C and
C++, or Assembly language

Graphical User Interfaces
◦ Usesr interact with mouse, keyboard, menus and icons etc.
 The first CUI appeared on the Xerox Alto computer in 1973
10

The main functions of operating systems are:
1.
Storage
2.
File Management
3.
Input / Output Management
4.
Process Management
5.
Process Synchronization
11

Main memory – only large storage media that the CPU can access
directly
◦ Random access
◦ Typically volatile
◦ Typically random-access memory in the form of Dynamic
Random-access Memory (DRAM)

Secondary storage – extension of main memory that provides large
nonvolatile storage capacity
12

To execute a program all (or part) of the instructions must be in memory

Memory management determines what is in memory and when
◦ Optimizing CPU utilization and computer response to users

Memory management activities
◦ Keeping track of which parts of memory are currently being used and by
whom
◦ Deciding which processes (or parts thereof) and data to move into and
out of memory
◦ Allocating and deallocating memory space as needed
13

Storage systems organized in hierarchy
◦ Speed
◦ Cost
◦ Volatility

Caching – copying information into faster storage system; main
memory can be viewed as a cache for secondary storage

Device Driver for each device controller to manage I/O
◦ Provides uniform interface between controller and kernel
14
15
The operating system is responsible for the following activities in
connection with process management:

User as well as system process creation

Suspend and resume processes

Process synchronization

Process communication

Deadlock handling
16

OS provides uniform, logical view of information storage

OS activities include
 Creating and deleting files and directories
 Primitives to manipulate files and directories
 Mapping files onto secondary storage
 Backup files onto stable (non-volatile) storage media
17


There are three classical views (in literature):
1.
Resource Manager – manages and allocates resources.
2.
Control program – controls the execution of user programs and
operations of I/O devices.
3.
Command Executer – Provides an environment for running user
commands.
But one more modern view: the Operating System as a Virtual Machine.

Resource Manager:
◦ Manages and protects multiple computer resources: CPU, Processes, Internal/External
memory, Tasks, Applications, Users, Communication channels, etc…

Resource Manager:
◦ Handles and allocates resources to multiple users or multiple
programs running at the same time and space (e.g., processor time,
memory, I/O devices).
◦ Decides between conflicting requests for efficient and fair resource
use (e.g., maximize throughput, minimize response time).

Sort of a bottom-up view.
A. Frank - P. Weisberg








DEC RSX – Resource Sharing eXecutive
MIT Multics – MULTiplexed Information and Computing Services
IBM MFT/MVT – Multiple Fixed/Variable Tasks
IBM MVS – Multiple Virtual Storage
DEC VMS – Virtual Memory System
MVS TSO – Time Sharing Option
CTSS – Compatible Time Sharing System
IBM VM – Virtual machine


Control Program:
◦ Manages all the components of a complex computer system in an integrated
manner.
◦ Controls the execution of user programs and I/O devices to prevent errors
and improper use of computer resources.
◦ Looks over and protects the computer: Monitor, Supervisor, Executive,
Controller, Master, Coordinator ….
Sort of a black box view.





Unisys MCP – Master Control Program
DR CP/M – Control Program/Microcomputer
IBM VM/CP – VM Control Program
IBM AIX – Advanced Interactive eXecutive
DEC RSX – Resource Sharing eXecutive

Command Executer:
◦ Interfaces between the users and machine.
◦ Supplies services/utilities to users.
◦ Provides the users with a convenient CLI (Command Language Interface), also
called a Shell (in UNIX), for entering the user commands.

Sort of a top-down view
.


IBM AIX – Advanced Interactive Executive
IBM VM/CMS – Conversational monitor System

Operating System as a Virtual Machine:
◦ An interface between the user and hardware that hides the details of the
hardware (e.g., I/O).
◦ Constructs higher-level (virtual) resources out of lower-level (physical)
resources (e.g., files).
◦ Definition: OS is a collection of software enhancements, executed on the
bare hardware, culminating in a high-level virtual machine that serves as
an advanced programming environment.
 virtual machine = software enhancement = extended machine = abstract
machine = layer = level = ring.
32
33
34
35
Download