lecture 01 (course outline)

26
Operating Systems Operating Systems Lecture 1 Lecture 1

Upload: uzmaabidi8886

Post on 06-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 1/26

Operating SystemsOperating Systems

Lecture 1Lecture 1

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 2/26

 Agenda for Today Agenda for Today

Introduction and purpose of the courseIntroduction and purpose of the course

Organization of a computer systemOrganization of a computer system

Purpose of a computer systemPurpose of a computer system²²settingsettingthe stage for OS concepts and principlesthe stage for OS concepts and principles

Outline of topics to be discussed in theOutline of topics to be discussed in the

coursecourse What is an operating system?What is an operating system?

Recap of the lectureRecap of the lecture

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 3/26

Computer System

Computer System

1.1. HardwareHardware

2.2. Operating systemOperating system

3.3. Applications programs Applications programs

4.4. UsersUsers

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 4/26

Layered View of aLayered View of a

Computer SystemComputer System

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 5/26

Purpose of  a ComputerPurpose of  a Computer

SystemSystem

Computer systems consist of Computer systems consist of 

software and hardware thatsoftware and hardware that

are combined to provide aare combined to provide a

tool to solve specifictool to solve specific

problems in an efficientproblems in an efficientmanner manner 

Execute programsExecute programs

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 6/26

Computer System HardwareComputer System Hardware

Keyboard Mouse

Printer R AM/ROM

HD

MemBus

System Bus

Monitor 

CD

Processor 

Floating Point

Unit

Integer 

Unit

Cache

Control

Unit

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 7/26

Course OutlineCourse Outline Operating system conceptsOperating system concepts

Operating system structuresOperating system structures

Introduction to UNIX/Linux user interfaceIntroduction to UNIX/Linux user interface

Processes and threadsProcesses and threads²²scheduling,scheduling,concurrency, synchronization, etc.concurrency, synchronization, etc.

DeadlocksDeadlocks

Memory managementMemory management Virtual memoryVirtual memory

File systemFile system

Secondary storage managementSecondary storage management

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 8/26

Operating SystemOperating System

ConceptsConcepts SingleSingle--user systemsuser systems

Batch systemsBatch systems

Multiprogrammed systemsMultiprogrammed systems

TimeTime--sharing systemssharing systems

RealReal--time systemstime systems

Interrupts, traps, and software interruptsInterrupts, traps, and software interrupts(UNIX signals)(UNIX signals)

Hardware protectionHardware protection

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 9/26

Operating SystemOperating System

StructuresStructures Operating system servicesOperating system services

System callsSystem calls

Semantics of system call executionSemantics of system call execution

Operating system structures (monolithic,Operating system structures (monolithic,

microkernelmicrokernel--based, layered, virtualbased, layered, virtual

machines, DOSmachines, DOS--Windows, UNIX)Windows, UNIX)

System design and implementationSystem design and implementation

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 10/26

Intr

oducti

on t 

oUN

IX/Linux

Intr

oducti

on t 

oUN

IX/Linux

Directory structure

Directory structure

Browsing directory structureBrowsing directory structure

Useful commandsUseful commands

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 11/26

Processes

Processes

Process concept (process, states,Process concept (process, states,

attributes, etc.)attributes, etc.)

Process scheduling (scheduler)Process scheduling (scheduler) Context switching (dispatcher)Context switching (dispatcher)

Operations on processes (creation,Operations on processes (creation,

termination, signaling, suspend,termination, signaling, suspend,foreground, background, etc.)foreground, background, etc.)

Process management in UNIX (fork, wait,Process management in UNIX (fork, wait,

exec, exit, etc.)exec, exit, etc.)

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 12/26

Processes (c

ontinued)

Processes (c

ontinued)

Sample code for UNIX/Linux processSample code for UNIX/Linux process

managementmanagement

Cooperating processesCooperating processes

Interprocess communication (IPC)Interprocess communication (IPC)

IPC in UNIX/Linux (pipe, FIFO, socket,IPC in UNIX/Linux (pipe, FIFO, socket,

message queue, etc.)message queue, etc.)

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 13/26

Processes (c

ontinued)

Processes (c

ontinued)

Communication between UNIX/LinuxCommunication between UNIX/Linux

processes (pipe, mkfifo, read, write, close,processes (pipe, mkfifo, read, write, close,

etc.)etc.)

Sample codeSample code

UNIX/Linux processes (process images,UNIX/Linux processes (process images,

control structures, etc. explained withcontrol structures, etc. explained with

sample code)sample code)

Managing UNIX/Linux processes (ps, top,Managing UNIX/Linux processes (ps, top,

fg, bg, <Ctrlfg, bg, <Ctrl--Z>, <CtrlZ>, <Ctrl--C>, etc.)C>, etc.)

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 14/26

Threads

Threads

Thread concept (thread, states,Thread concept (thread, states,

attributes, etc.)attributes, etc.)User User-- and kerneland kernel--level threadslevel threads

POSIX threads (the pthreadPOSIX threads (the pthread

library)library)

Sample codeSample code

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 15/26

CPU Sc

h

edulingCP

U Sch

eduling Basic conceptsBasic concepts

Scheduling criteriaScheduling criteria

Scheduling triggersScheduling triggers

Scheduling algorithmsScheduling algorithms

UNIX System V scheduling algorithmUNIX System V scheduling algorithm

Optimal schedulingOptimal scheduling

Algorithm evaluation Algorithm evaluation

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 16/26

Process Sync

hronizati

on

Process Sync

hronizati

on Basic conceptBasic concept

The Critical Section ProblemThe Critical Section Problem

Solutions for theC

ritical Section ProblemSolutions for theC

ritical Section Problem SoftwareSoftware--based solutionsbased solutions²²the Bakerythe Bakery

 Algorithm Algorithm

H

ardwareH

ardware--based solutionsbased solutions SemaphoresSemaphores

Binary and counting semaphoresBinary and counting semaphores

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 17/26

Process SynchronizationProcess Synchronization ««

Classic problems of synchronizationClassic problems of synchronization

Deadlocks and starvationDeadlocks and starvation

Critical regionsCritical regions MonitorsMonitors

Synchronization tools used in Solaris,Synchronization tools used in Solaris,

Linux, and WindowsLinux, and Windows Deadlocks and starvationDeadlocks and starvation

Pthread library functionsPthread library functions

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 18/26

D

eadlocks

D

eadlocks Basic conceptBasic concept

Deadlock characterizationDeadlock characterization

Deadlock handling (prevention, avoidance,Deadlock handling (prevention, avoidance,detection and recovery)detection and recovery)

Banker¶s algorithmBanker¶s algorithm

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 19/26

Memory Management Memory Management  Basic conceptsBasic concepts

Various techniques for memoryVarious techniques for memorymanagementmanagement

Logical to physical address translationLogical to physical address translation SwappingSwapping

Contiguous memory allocation: MFT, MVTContiguous memory allocation: MFT, MVT

External fragmentationExternal fragmentation PagingPaging

Hardware support for pagingHardware support for paging

Internal fragmentationInternal fragmentation

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 20/26

Memory Management Memory Management ««

Performance of pagingPerformance of paging

Protection and sharingProtection and sharing

Page table issues: MultiPage table issues: Multi--level paginglevel paging,,

Hashed page tables, Inverted page tablesHashed page tables, Inverted page tables SegmentationSegmentation

Protection and sharingProtection and sharing

Segmentation with pagingSegmentation with paging Intel P4 exampleIntel P4 example

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 21/26

 Virtual Memory Virtual Memory Basic conceptBasic concept

Demand pagingDemand paging

Page faultPage fault

Performance of demand pagingPerformance of demand paging Page replacementPage replacement

Allocation of frames Allocation of frames

ThrashingThrashing OperatingOperating--system examplessystem examples

Other considerations (I/O locking, pageOther considerations (I/O locking, page

size, «)size, «)

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 22/26

F

ile SystemInter

f ace

F

ile SystemInter

f ace Basic concepts (file attributes, operations,Basic concepts (file attributes, operations,

types, structure, etc.)types, structure, etc.)

Access methods (sequential, random, etc.) Access methods (sequential, random, etc.)

Directory structureDirectory structure

UNIX/Linux directory structure (links in UNIX)UNIX/Linux directory structure (links in UNIX)

File system mounting, sharing, andFile system mounting, sharing, and

protectionprotection UNIX/Linux examples for sharing andUNIX/Linux examples for sharing and

protection, and relevant commands (chmod,protection, and relevant commands (chmod,

ln, lnln, ln ± ±s, etc.)s, etc.)

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 23/26

File System ImplementationFile System Implementation Basic concepts (overview of disk structure,Basic concepts (overview of disk structure,

file structure, boot control block, super block,file structure, boot control block, super block,inode, per process file descriptor table,inode, per process file descriptor table,

systemsystem--wide openwide open--file table, etc.)file table, etc.) Directory implementationDirectory implementation

Free space management methodsFree space management methods

Space  Allocation MethodsSpace  Allocation Methods

Time and space performance of allocationTime and space performance of allocationmethodsmethods

Brief introduction to Network File SystemBrief introduction to Network File System(NFS)(NFS)

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 24/26

Mass St orage StructureMass St orage Structure

and Schedulingand SchedulingDisk structure and schedulingDisk structure and scheduling

Disk management (formatting,Disk management (formatting,boot block, bad blocks, etc.)boot block, bad blocks, etc.)

Course RecapCourse Recap

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 25/26

 What is an Operating What is an Operating

System?System? A program that acts as an intermediary A program that acts as an intermediary

between a user of a computer and thebetween a user of a computer and the

computer hardwarecomputer hardware²²provides the user aprovides the user asimpler (virtual) machine to work withsimpler (virtual) machine to work with

A program that allocates and deallocates A program that allocates and deallocates

computer system resources in an efficient,computer system resources in an efficient,fair, and secure manner fair, and secure manner²²a resourcea resource

manager manager 

8/3/2019 Lecture 01 (Course Outline)

http://slidepdf.com/reader/full/lecture-01-course-outline 26/26

Operating System GoalsOperating System G

oals

Execute user programs and make solvingExecute user programs and make solving

user problems easier .user problems easier .

Make the computer system convenient toMake the computer system convenient touse.use.

Use the computer hardware in an efficientUse the computer hardware in an efficient

manner .

manner .