OS Unit I - Introduction
OS Unit I - Introduction
A.SWAMY GOUD,
ASSISTANT PROFESSOR,
BVRIT, NSP
A.SWAMY GOUD,
ASSISTANT PROFESSOR,
BVRIT, NSP
UNIT - I
INTRODUCTION
OS Syllabus - Unit I
Operating Systems Objectives and Functions
Computer System Architecture
Generations of Operating Systems
Operating Systems Services
User OS Interface
System Calls
Types of System Calls
System Programs
OS Design and Implementation
OS Structure - Layered, Monolithic, Microkernel,
Concept of Virtual Machines.
Case Studies: Linux, Windows.
Operating System
An Operating System (OS) is a program that acts as
an intermediary between a user of a computer and
the computer hardware
An Operating System (OS) is the program that, after
being initially loaded into the computer by a boot
program, manages all other programs in computer.
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 Structure
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
Operating System Definition
Structure
Single user system.
Programmer/User as operator (Open Shop).
Large machines run from console.
Paper Tape or Punched cards.
Characteristics of Early
Systems
Early software: Assemblers, Libraries of common
subroutines (I/O, Floating-point), Device Drivers,
Compilers, Linkers.
Need significant amount of setup time.
Extremely slow I/O devices.
Very low CPU utilization.
But computer was very secure.
Simple Batch Systems
Use of high-level languages, magnetic tapes.
Jobs are batched together by type of languages.
An operator was hired to perform the repetitive tasks of
loading jobs, starting the computer, and collecting the output
(Operator-driven Shop).
It was not feasible for users to inspect memory or patch
programs directly.
Operation of Simple Batch
Systems
The user submits a job (written on cards or tape) to a computer operator.
The computer operator place a batch of several jobs on an input device.
A special program, the monitor, manages the execution of each program
in the batch.
Monitor utilities are loaded when needed.
“Resident monitor” is always in main memory and available for execution.
STDIO.H
System Call Parameter
Passing
System calls occur in different ways, depending on the computer
in use.
Often, more information is required than simply the identity of the
desired system call.
The exact type and amount of information vary according to the
particular operating system and call.
Three general methods used to pass parameters to the OS
Simplest: pass the parameters in registers. In some cases, may
be more parameters than registers.
Parameters stored in a block, or table, in memory, and address of
block passed as a parameter in a register. This approach taken by
Linux and Solaris
Parameters placed, or pushed, onto the stack by the program and
popped off the stack by the operating system
Block and stack methods do not limit the number or length of
parameters being passed
Parameter Passing via Table
Types of System Calls
System calls can be grouped six major categories: Process
Control, File Manipulation, Device Manipulation,
Information Maintenance, Communication and Protection.
Process Control
end, abort File Management
load, execute create file, delete file
create process, terminate open, close file
process read, write, reposition
get process attributes, set get and set file attributes
process attributes
wait for time
wait event, signal event
allocate and free memory
Types of System Calls
Communication Protection
create, delete set permission and get
communication permission
connection
allow user and deny user
send, receive messages
transfer status
information
attach and detach
remote devices
System Programs
Another aspect of a modern system is the collection of system
programs.
System programs, also known as system utilities, provide a
convenient environment for program development and execution.
Some of them are simply user interfaces to system calls; others
are considerably more complex.
They can be divided into:
File manipulation Program loading and execution
Status information Communications
File modification Application programs
Programming language support
Most users’ view of the operation system is defined by system
programs, not the actual system calls
System Programs
File management – These programs Create, delete,
copy, rename, print, dump, list, and generally manipulate
files and directories
Status information
Some ask the system for info - date, time, amount of
available memory, disk space, number of users
Others provide detailed performance, logging, and
debugging information
Typically, these programs format and print the output to
the terminal or other output devices
Some systems implement a registry - used to store and
retrieve configuration information
System Programs
Design Goals
Internal structure of different Operating Systems can vary
widely
Start by defining goals and specifications
At the highest level, the design of the system will be
affected by the choice of hardware and the type of system
like batch, time shared, single user, multiuser, distributed,
real time, or general purpose.
User goals and System goals
User goals – operating system should be convenient to
use, easy to learn, reliable, safe, and fast
System goals – operating system should be easy to
design, implement, and maintain, as well as flexible,
reliable, error-free, and efficient
Virtualization Implementation
Difficult to implement – must provide an exact duplicate of
underlying machine
Typically runs in user mode, creates virtual user mode and
virtual kernel mode
Timing can be an issue – slower than real machine
Hardware support needed
More support-> better virtualization
i.e. AMD provides “host” and “guest” modes
Solaris 10 with Two Containers
VMware Architecture
The Java Virtual Machine