Overview of Operating System -...

77
OVERVIEW OF OPERATING SYSTEM Slides by: Ms. Shree Jaswal OS_chp1 Slides by: Ms. Shree Jaswal 1

Transcript of Overview of Operating System -...

Page 1: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

OVERVIEW OF

OPERATING SYSTEM Slides by: Ms. Shree Jaswal

OS_chp1

Slides by: Ms. Shree Jaswal 1

Page 2: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Topics to be covered:

• Operating system objectives and functions, Evolution of

OS, Characteristics of modern OS,

• Basic concepts: Processes, Files, System calls, Shell,

• Kernel architectures: Monolithic, Micro-kernel, Layered,

• Kernel mode of operations

OS_chp1

Slides by: Ms. Shree Jaswal 2

Page 3: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

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.

OS_chp1

Slides by: Ms. Shree Jaswal 3

Page 4: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

The Operating System as an Extended

Machine

OS_chp1

Slides by: Ms. Shree Jaswal 4

Operating systems turn ugly hardware into beautiful abstractions.

Page 5: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Computer System Structure

• Computer system can be divided into four components • Hardware – provides basic computing resources

• CPU, memory, I/O devices

• Operating system

• Controls and coordinates use of hardware 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

OS_chp1

Slides by: Ms. Shree Jaswal 5

Page 6: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Layers and Views

OS_chp1

Slides by: Ms. Shree Jaswal 6

Page 7: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Services Provided by the OS

• Program execution

• Access I/O devices

• Controlled access to files

• System access

OS_chp1

Slides by: Ms. Shree Jaswal 7

Page 8: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Services Provided by the OS

• Error detection and response

• Internal and external hardware errors

• Software errors such as arithmetic overflow and inability to grant

request of an application

• Accounting

• Collect usage statistics

• Monitor performance

• Used to anticipate future enhancements

• Used for billing purposes

OS_chp1

Slides by: Ms. Shree Jaswal 8

Page 9: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Operating System as a Resource Manager

• Responsible for managing resources

• Functions same way as ordinary computer software

• It is a program that is executed by the processor

• Operating system frequently relinquishes control and

must depend on the processor to allow it to regain control

OS_chp1

Slides by: Ms. Shree Jaswal 9

Page 10: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

OS as Resource Manager

OS_chp1

Slides by: Ms. Shree Jaswal 10

Page 11: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Kernel

• Portion of operating system that is in main memory

• Contains most frequently used functions in the OS and at

a given time other portions of the OS currently in use.

OS_chp1

Slides by: Ms. Shree Jaswal 11

Page 12: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Evolution of Operating Systems

• Reasons for evolution of OS are:

• Hardware upgrades plus new types of hardware

• Device drivers

• New services

• Fixes

• Mostly: security fixes!

OS_chp1

Slides by: Ms. Shree Jaswal 12

Page 13: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

EVOLUTION OF OPERATING

SYSTEMS

… a bit of history…

OS_chp1

Slides by: Ms. Shree Jaswal 13

Page 14: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Evolution of Operating Systems

1 - Serial processing systems

• They are called so due to the fact that users have access to the

computer in series.

• No operating system

• Machines run from a console with display lights, toggle switches,

input device, and printer

• Programs in machine code were loaded via the input device (eg. A

card reader)

OS_chp1

Slides by: Ms. Shree Jaswal 14

Page 15: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

OS_chp1

Slides by: Ms. Shree Jaswal 15

Page 16: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Example of card: Bell Telephone

Laboratories GE 600

OS_chp1

Slides by: Ms. Shree Jaswal 16

This card, probably designed in October 1965 (judging by the notation

"10-65" printed on the left edge), was printed for use with the GE 600

series computers at Bell Labs.

Page 17: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Evolution of Operating Systems

• These early systems presented 2 main problems:

• Scheduling: most installations used a hard copy sign-up sheet to

reserve machine time.

• Setup time: Setup included loading the compiler, source program,

saving compiled program, and loading and linking. Thus

considerable amount of time was spent in just setting up the

program to run.

OS_chp1

Slides by: Ms. Shree Jaswal 17

Page 18: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Evolution of Operating Systems

2 - Simple batch system

• Monitor

• Software that controls the sequence of events

• Improves job setup time

• Batch jobs together – job control language (JCL)

• Program returns control to monitor when finished

• Hardware support for the monitor model

• Memory protection: some memory areas are accessible only to

the monitor

• Privileged mode instructions: only accessible to the monitor

• Interrupts (early machines did not have this)

OS_chp1

Slides by: Ms. Shree Jaswal 18

Page 19: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

An early batch system

OS_chp1

Slides by: Ms. Shree Jaswal 19

An early batch system.

(a) Programmers bring cards to 1401.

(b)1401 reads batch of jobs onto tape.

Page 20: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

An early batch system

OS_chp1

Slides by: Ms. Shree Jaswal 20

(c) Operator carries input tape to 7094.

(d)7094 does computing.

(e) Operator carries output tape to 1401.

Page 21: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

An early batch system

OS_chp1

Slides by: Ms. Shree Jaswal 21

(f) 1401 prints output.

Page 22: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

IBM 7094

OS_chp1

Slides by: Ms. Shree Jaswal 22

Page 23: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

OS_chp1

Slides by: Ms. Shree Jaswal 23

Page 24: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Uniprogramming

• Processor must wait for I/O instruction to complete before

proceeding

OS_chp1

Slides by: Ms. Shree Jaswal 24

Page 25: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Multiprogramming

• When one job needs to wait for I/O, the processor can

switch to the other job

OS_chp1

Slides by: Ms. Shree Jaswal 25

Page 26: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Multiprogramming

OS_chp1

Slides by: Ms. Shree Jaswal 26

Page 27: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Time Sharing Systems

• Using multiprogramming to handle multiple interactive

jobs

• Processor’s time is shared among multiple users who

simultaneously access the system through terminals

• If there are ‘n’ users actively requesting service at one

time each user will only see on the average ‘1/n’ of the

effective computer speed.

OS_chp1

Slides by: Ms. Shree Jaswal 27

Page 28: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Batch Multiprogramming versus Time

Sharing

OS_chp1

Slides by: Ms. Shree Jaswal 28

Page 29: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Major achievements of operating systems

1. Processes

2. Memory management

3. Information protection and security

4. Scheduling and resource management

OS_chp1

Slides by: Ms. Shree Jaswal 29

Page 30: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

1. Process

It is defined as:

• A program in execution

• An instance of a program running on a computer

• The entity that can be assigned to and executed on a

processor

• A unit of activity characterized by

• A single sequential thread of execution

• A current state

• An associated set of system resources

OS_chp1

Slides by: Ms. Shree Jaswal 30

Page 31: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

1. Process

• Consists of three components

• An executable program

• Associated data needed by the program

• Execution context of the program

• All information the operating system needs to manage the process

OS_chp1

Slides by: Ms. Shree Jaswal 31

Page 32: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Process

OS_chp1

Slides by: Ms. Shree Jaswal 32

Page 33: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

2. Memory Management

• Process isolation

• Automatic allocation and management

• Protection and access control

• Support of modular programming

• Protection and access control

• Long term storage

OS_chp1

Slides by: Ms. Shree Jaswal 33

Page 34: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Virtual Memory

• Allows programmers to address memory from a logical

point of view

• Allow the illusion of operating with a larger memory space

than what is available in reality

• By storing some of the information on the file system

• It is used to meet the requirement of having multiple user

jobs reside in main memory concurrently

OS_chp1

Slides by: Ms. Shree Jaswal 34

Page 35: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Paging

• One way to implement virtual memory

• Allows the process to be comprised of a number of fixed-size blocks, called pages

• Virtual address is a page number and an offset within the page

• Each page may be located anywhere in main memory

• Real address or physical address is the main memory address

OS_chp1

Slides by: Ms. Shree Jaswal 35

Page 36: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

OS_chp1

Slides by: Ms. Shree Jaswal 36

Page 37: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Virtual memory addressing

OS_chp1

Slides by: Ms. Shree Jaswal 37

Page 38: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

3. Information Protection and Security

• Availability

• Concerned with 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

• Authentication

• Concerned with the proper verification of the identity of

users and the validity of messages or data

OS_chp1

Slides by: Ms. Shree Jaswal 38

Page 39: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

4. 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 accommodate

as many uses as possible

OS_chp1

Slides by: Ms. Shree Jaswal 39

Page 40: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Key Elements of an Operating System

OS_chp1

Slides by: Ms. Shree Jaswal 40

Page 41: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Traditional OS structure

• monolithic/layered systems

one/N layers all executed in “kernel-mode”

good performance but rigid

OS_chp1

Slides by: Ms. Shree Jaswal 41

OS kernel

hardware

user

process

file

system

memory

system

user

system calls

Page 42: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Monolithic Systems

OS_chp1

Slides by: Ms. Shree Jaswal 42

A simple structuring model for a monolithic system.

Page 43: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Modes of OS

OS_chp1

Slides by: Ms. Shree Jaswal 43

Page 44: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Modern Operating Systems

• Microkernel architecture

• Assigns only a few essential functions to the kernel

• Address spaces

• Interprocess communication (IPC)

• Basic scheduling

• It interacts with local and remote server processes in

the same way facilitating construction of distributed

systems.

• Working examples Mach, QNX

• Current operating systems: Windows, Linux, Mac OS

are not microkernel based

OS_chp1

Slides by: Ms. Shree Jaswal 44

Page 45: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Micro-kernel OS

client-server model, IPC between clients and servers

the micro-kernel provides protected communication

OS functions implemented as user-level servers

flexible but efficiency is the problem

easy to extend for distributed systems

OS_chp1

Slides by: Ms. Shree Jaswal 45

micro-kernel

hardware

memory

server

IPC

user mode client

process file

server

memory

server

Page 46: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Microkernels

OS_chp1

Slides by: Ms. Shree Jaswal 46

Structure of the MINIX 3 system

Page 47: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Extensible OS kernel

user processes can load customized OS services into

the kernel

good performance but protection and scalability become

problems

OS_chp1

Slides by: Ms. Shree Jaswal 47

extensible kernel

hardware

process user mode

process process

my

memory

service

default

memory

service

Page 48: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Characteristics of 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_chp1

Slides by: Ms. Shree Jaswal 49

Page 49: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Characteristics of Modern Operating

Systems • Symmetric multiprocessing (SMP)

• There are multiple processors

• These processors share same main memory and I/O facilities

• All processors can perform the same functions

OS_chp1

Slides by: Ms. Shree Jaswal 50

Page 50: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Multiprogramming and Multiprocessing

OS_chp1

Slides by: Ms. Shree Jaswal 51

Page 51: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Characteristics of Modern Operating

Systems • Distributed operating systems

• Provides the illusion of a single main memory space and single

secondary memory space

• Eg. Amoeba by Andrew Tannembaum

OS_chp1

Slides by: Ms. Shree Jaswal 52

Page 52: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Characteristics of Modern Operating

Systems • Object-oriented design

• Used for adding modular extensions to a small kernel

• Enables programmers to customize an operating

system without disrupting system integrity

OS_chp1

Slides by: Ms. Shree Jaswal 53

Page 53: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Computer Hardware Review

OS_chp1

Slides by: Ms. Shree Jaswal 54

Some of the components

of a simple personal computer.

Page 54: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Processors

• CPU is brain of the computer

• Has :

• general registers

• Program counter

• Stack pointer

• Program status word (PSW)

OS_chp1

Slides by: Ms. Shree Jaswal 55

Page 55: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Operating System Concepts

OS_chp1

Slides by: Ms. Shree Jaswal 56

(a) A three-stage pipeline. (b) A superscalar CPU.

Page 56: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Memory

OS_chp1

Slides by: Ms. Shree Jaswal 57

A typical memory hierarchy.

The numbers are very rough approximations.

Page 57: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Memory

• Cache memory transparently stores data so that future requests for that data can be served faster.

• The data that is stored within a cache might be values that have been computed earlier or duplicates of original values that are stored elsewhere

• If requested data is contained in the cache (cache hit), this request can be served by simply reading the cache, which is comparatively faster

• Otherwise (cache miss), the data has to be recomputed or fetched from its original storage location, which is comparatively slower

OS_chp1

Slides by: Ms. Shree Jaswal 58

Page 58: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Memory

• Main memory is often called RAM

• RAM, DRAM, DDR SDRAM and SRAM are volatile forms

of memory

• ROM, PROM, EPROM, EEPROM are non volatile forms

of memory

• CMOS is volatile memory used to hold current date and

time

OS_chp1

Slides by: Ms. Shree Jaswal 59

Page 59: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Disks

OS_chp1

Slides by: Ms. Shree Jaswal 60

Structure of a disk drive.

Page 60: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

I/O Devices

OS_chp1

Slides by: Ms. Shree Jaswal 61

(a) The steps in starting an I/O device and

getting an interrupt.

Page 61: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

I/O Devices

OS_chp1

Slides by: Ms. Shree Jaswal 62

(b) Interrupt processing involves taking the

interrupt, running the interrupt handler,

returning to the user program.

Page 62: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Buses

OS_chp1

Slides by: Ms. Shree Jaswal 63

The structure of a large Pentium system

Page 63: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Operating System Concepts

• Associated with each process is its address space, a list

of memory locations from some min(usually 0) to some

max, which the process can read & write

• The address space contains the executable program, the

program’s data and its stack.

OS_chp1

Slides by: Ms. Shree Jaswal 65

Page 64: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Operating System Concepts

• When a process is suspended temporarily, it must later

be restarted in exactly the same state it had when it was

stopped.

• For this, all the info about each process, other than its

own address space is stored in an OS table called the

process table, which is an array of structures, one for

each process in existence.

OS_chp1

Slides by: Ms. Shree Jaswal 66

Page 65: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Processes

• If a process can create one or more other processes &

these processes in turn can create child processes we

arrive at a process tree structure

• IPC: Related processes that are cooperating to get some

job done often need to communicate with one another &

synchronize their activities. This communication is called

interprocess communication.

OS_chp1

Slides by: Ms. Shree Jaswal 67

Page 66: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Processes

OS_chp1

Slides by: Ms. Shree Jaswal 68

A process tree. Process A created two child processes, B and

C. Process B created three child processes, D, E, and F.

Page 67: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Files

OS_chp1

Slides by: Ms. Shree Jaswal 69

A file

system for

a university

department

.

Page 68: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Files

OS_chp1

Slides by: Ms. Shree Jaswal 70

(a) Before mounting, the files on the CD-ROM are not accessible. (b)

After mounting, they are part of the file hierarchy.

Page 69: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Files

OS_chp1

Slides by: Ms. Shree Jaswal 71

Two processes connected by a pipe.

Page 70: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

System Calls

• Interface between user programs and

OS

• Vary from OS to OS

• Example of system call

• Count=read(fd, buffer, nbytes)

OS_chp1

Slides by: Ms. Shree Jaswal 72

Page 71: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

System Calls

OS_chp1

Slides by: Ms. Shree Jaswal 73

The 11 steps in making the

system call

read(fd, buffer, nbytes).

Page 72: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Memory Layout

OS_chp1

Slides by: Ms. Shree Jaswal 74

Processes have three segments:

text, data, and stack.

Page 73: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

UNIX

• Hardware is surrounded by the operating-system

• Operating system is called the kernel

• Comes with a number of user services and interfaces

• shell

• C compiler

OS_chp1

Slides by: Ms. Shree Jaswal 75

Page 74: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

General UNIX architecture

OS_chp1

Slides by: Ms. Shree Jaswal 76

Page 75: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

UNIX

OS_chp1

Slides by: Ms. Shree Jaswal 77

Page 76: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

Modern UNIX Systems

• System V Release 4 (SVR4)

• Solaris 2.x

• 4.4BSD

• Linux

OS_chp1

Slides by: Ms. Shree Jaswal 78

Page 77: Overview of Operating System - ssjaswal.comssjaswal.com/wp-content/uploads/2015/07/Overview-of-OS.pdf · What is an Operating System? •A program that acts as an intermediary between

THANK YOU!

OS_chp1

Slides by: Ms. Shree Jaswal 79