operating system concepts prepared by a.shamila ebenezer

Post on 15-Dec-2015

217 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

OPERATING SYSTEM CONCEPTS

Prepared by A.Shamila Ebenezer

FUNDAMENTALS

An operating system (OS) is software that manages computer hardware and software resources and provides common services forcomputer programs. Operating systems can be found on almost any device that contains a computer—from cellular phones and video game consoles to supercomputers and web servers.

OPERATING SYSTEM

Android BSDiOS

Linux OS X QNX

Microsoft WindowsWindows Phone

IBM z/OS

MOST POPULAR OPERATING

SYSTEMS

2013 Worldwide Device Shipments by Operating System

Operating System 2012 (Million of Units)

2013 (Million of Units)

Android 504 878

Windows 346 328

iOS/Mac OS 214 267

BlackBerry 35 24

Others 1,117 803

Total 2,216 2,300

MARKET STATUS OF USAGE OF OPERATING

SYSTEM

management of multiple processes on a uniprocessor

architecture

multiprogramming

The main objective of multiprogramming is to

have process running at all times. With this design,

CPU utilization is said to be maximized.

Objective of multiprogramming

•FCFS•SJF•PREMPTIVE AND NON PREEMPTIVE SJF•PREEMPTIVE SCHEDULING• ROUND ROBIN

CPU SCHEDULING

management of multiple processes

on a multiprocessor architecture

multiprocessing

each processor is assigned specific

tasks by a "Master processor

Asymmetric Multiprocessing

With an increased number of processors, there is

considerable increase in throughput. It can also save

more money because they can share resources. Finally,

overall reliability is increased as well.

What are the advantages of a multiprocessor

system?

number of processes that complete their

execution per time unit.

Throughput

amount of time to execute a particular process.

Turnaround time

amount of time a process has been

waiting in the ready queue.

Waiting time

time it takes for the computer system to give response to the

service request

Response Time

In a Time sharing system, the CPU executes multiple jobs by

switching among them, also known as multitasking. This process happens so fast that

users can actually interact with each program while it is running.

What are time sharing

systems?

bootstrap program is loaded at power-up or reboot•Typically stored in ROM or EEPROM, generally known as firmware•Initializates all aspects of system•Loads operating system kernel and starts execution

Bootstrap

program

loading a program into memory on

demand

dynamic loading

loading a program all at once in

memorystatic loading

library functions can be

connected at load-time

dynamic linking

all library functions

included in the code

static linking

Switching the CPU to another process requires saving the state of the old process and loading the saved state for the new process. This task is known

as a context switch. Context-switch time is pure overhead, because the system does no useful work while switching. Its speed varies from machine to machine, depending on the memory speed, the number of registers which must be copied, the existed of special instructions(such as a single

instruction to load or store all registers).

Context Switch

signal sent from hardware or software

to CPU to transfer execution to some other instructions

Interrupt

Device drivers provides a standard means of

representing I/O devices that maybe manufactured by different companies. This

prevents conflicts whenever such devices are incorporated

in a systems unit.

What are device drivers?

GUI is short for Graphical User Interface. It provides users with an interface wherein actions can be performed by interacting

with icons and graphical symbols. People find it easier to interact with the computer

when in a GUI especially when using the mouse. Instead of having to remember and type commands, users just click on buttons

to perform a process.

What is GUI?

Preemptive multitasking allows an operating system to switch

between software programs. This in turn allows multiple programs to run without necessarily taking

complete control over the processor and resulting in system

crashes.

What is preemptive

multitasking?

PROCESS MANAGEMENT

A program loaded into memory and executing

Process

A thread is a basic unit of CPU utilization. In

general, a thread is composed of a thread ID,

program counter, register set and the

stack.

What is a thread?

– there is an increased responsiveness to the user

– resource sharing within the process

– economy– utilization of

multiprocessing architecture

Give some benefits of

multithreaded programming.

DEADLOCK

When a process requests an available resource, system must decide if immediate allocation leaves the

system in a safe state. System is in safe state if there exists a safe

sequence of all processes. Deadlock Avoidance: ensure that a system will

never enter an unsafe state.

What is a Safe State and what is its use

in deadlock avoidance?

Banker’s algorithm is one form of deadlock-avoidance in a system. It

gets its name from a banking system wherein the bank

never allocates available cash in such a way that it can no longer

satisfy the needs of all of its customers.

Describe Banker’s

algorithm

SYNCHRONIZATION

when the outcome of the multiple process

execution depends on the order of the execution of the

instructions of the processes

race condition

elementary synchronization problem where a set of

threads indefinitely alternate between

executing the critical section and non-critical

section

mutual exclusion

a requesting thread is not

allowed to enter the critical sectionstarvation

general locking mechanism;

generally initialized to 1

semaphore

MEMORY MANAGEMENT

Main memory is the only large storage

media that the CPU can access directly.

What is main memory?

storage that does not lose its contents when power is removedNVRAM-nonvolatile storage which is DRAM with battery backup power

Nonvolatile storage

in which some parts of memory

take longer to access than other

parts

Non-Uniform Memory Access (NUMA)-

Caching is the processing of utilizing a region of fast

memory for a limited data and process. A cache

memory is usually much efficient because of its high

access speed.

What is caching?

Makes sure that an update of a value of A

in one cache is immediately reflected

in all other caches where A resides

Cache Coherency

Virtual memory is a memory management technique for

letting processes execute outside of memory. This is very useful especially is an

executing program cannot fit in the physical memory.

What is virtual

memory?

Paging is a memory management scheme that

permits the physical-address space of a process to be

noncontiguous. It avoids the considerable problem of having to fit varied sized memory chunks onto the

backing store.

What is the basic function

of paging?

Fragmentation is memory wasted. It can be internal if we are dealing with systems that

have fixed-sized allocation units, or external if we are dealing

with systems that have variable-sized allocation units.

What is fragmentation?

if data is accessed once, it will likely be

accessed again in the future

locality of reference principle

Demand paging is a system wherein area of memory

that are not currently being used are swapped to disk

to make room for an application’s need.

What is demand paging?

Trashing refers to an instance of high paging activity. This happens

when it is spending more time paging instead of

executing.

When does thrashing occur?

When a device controller transfers an entire block of data from its own buffer storage to memory without CPU intervention

Direct Memory Access (DMA)

A computer instruction that can be executed only by a supervisory program - can only be executed only

in kernel mode

Privileged Instruction

added to the hardware of the computer to indicate the

current mode: kernel(0) or user (1). Distinguishes between a task that is

executed on behalf of the OS and one is that executed on

behalf of the user

Mode Bit

Ability to continue providing service proportional to the level of surviving hardware

Graceful Degradation

A trap is a software-generated interrupt caused by either an

error or a user request.

What is a trap?

each process is divided up into a number of small,

fixed-size partitions called pages

pages

physical memory is divided into a large

number of small, fixed-size partitions

called frames

frames

per process data structure that

provides mapping from page to frame

page table

top related