64
operating system Conc epts -mahabadi Silberschatz and Galvin 1 م ی ح ر ل ا ن م ح ر ل ه ا ل ل م ا س ب ی ن ف کده ش ب دا ی ن ف کده ش ب دا ی س د ن ه م ی س د ن ه م اهد گاه ش ش ب دا اهد گاه ش ش ب دا

Operating system Concepts -mahabadiSilberschatz and Galvin1 بسم الله الرحمن الرحیم دانشکده فنی مهندسی دانشگاه شاهد

Embed Size (px)

Citation preview

operating system Concepts -mahabadi

Silberschatz and Galvin 1

بسم الله الرحمن الرحیم

فنی فنی دانشکده دانشکده

مهندسی مهندسی شاهد شاهد دانشگاه دانشگاه

operating system Concepts -mahabadi

Silberschatz and Galvin 2

سیستمسیستمعاملعامل

OperatingOperatingSystemSystem

Copyright Notice: The lecture notes are mainly produced for this university based on Silberschatz’s , Galvin’s & Gagne’s book (“Operating System Concepts”, 7th ed., Wiley, 2005). No part of the lecture notes may be reproduced in any form, due to the copyrights reserved by mahabadi. These lecture notes should only be used for internal teaching purposes at the Shahed University.

operating system Concepts -mahabadi

Silberschatz and Galvin 3

Books &References

Siberchatz, Galvin and Gagne. Operating System Concepts, Seventh Edition, John-Wiley and Sons, 2005.

William Stallings. Operating Systems: Internals and Design Principles, 4th edition. Prentice Hall, 2001.

Andrew Tanenbaum. Modern Operating Systems, 2nd edition. Prentice Hall, 2001.

Andrew Tanenbaum. Operating Systems, 2nd edition. Prentice Hall.

H.M.Deitel .Introduction to Operating Systems, Addison Wesly.

operating system Concepts -mahabadi

Silberschatz and Galvin 4

Books &References (Cont.)E-Book

Understanding the linux kernel,2nd edition,M.cesati,Daniel.P.Bort 2003,O’Rielly.

Interprocess Communication in linux, jhon shapley.Gray, prentice Hall PTR.

Linux kernel internals ,2nd edition M.Beck ,H.Bohme, M.Dziadzka,…

Linux Device Driver, Alessandro Rubini,jonattan Gorbet, O’Rielly.

operating system Concepts -mahabadi

Silberschatz and Galvin 5

Goals for the course Goals for the course

StudyStudy the working of an OS. Study the design & implementationdesign & implementation of various

components of an OS. Learn about the alternatives availablealternatives available to a

designer at all levels of abstraction in an OS. Learn concurrent programmingconcurrent programming using

processes, threads, & system calls. Understand the basics of distributed systems.

operating system Concepts -mahabadi

Silberschatz and Galvin 6

Where are OS’s Used? In more & more places! Desktop & Server Computers

DOSDOS + + WindowsWindows 95/98/ME/XP 95/98/ME/XP Windows NT/2000Windows NT/2000 Free Unix variants: Free Unix variants: LinuxLinux, , FreeBSDFreeBSD, , NetBSDNetBSD, ,

etc.etc. Commercial Unix variants: Commercial Unix variants: SolarisSolaris, HP-UX, , HP-UX, AIX AIX

(In RISC )(In RISC ) , etc. , etc. MacOSMacOS

Cars (fancy ones) Some Game Consoles

XboxXbox: Cut-down Windows 2000 : Cut-down Windows 2000

operating system Concepts -mahabadi

Silberschatz and Galvin 7

Where are OS’s Used? (Cont.) Personal Digital Assistants (PDAs)

PalmOSPalmOS:=>:=>option Windows CE Windows CE Windows MobileWindows Mobile Embedded LinuxEmbedded Linux

Mobile Phones SymbianSymbian OS: OS:Gives access to graphics,

multimedia, networking, telephony, crypto, PC connectivity, etc.

Windows MobileWindows Mobile In the future also:

Digital Cameras (fancy ones)Digital Cameras (fancy ones) MP3 Players (iPods, etc.)MP3 Players (iPods, etc.) Refrigerators!Refrigerators! Others?

operating system Concepts -mahabadi

Silberschatz and Galvin 8

Example of modern OS: PalmOS

operating system Concepts -mahabadi

Silberschatz and Galvin 9

Example OS: PalmOS

operating system Concepts -mahabadi

Silberschatz and Galvin 10

Example OS: Symbian OS

operating system Concepts -mahabadi

Silberschatz and Galvin 11

Example OS: Symbian OS

operating system Concepts -mahabadi

Silberschatz and Galvin 12

Services Provided by the OS

Program execution Access to Input/Output (I/O) devices

Disks, screens, keyboards, miceDisks, screens, keyboards, mice Printers, cameras, speakers, etc.Printers, cameras, speakers, etc.

Controlled access to files System access Sometimes: Program development

Compilers, editors and debuggersCompilers, editors and debuggers

operating system Concepts -mahabadi

Silberschatz and Galvin 13

Services Provided by the OS (Cont.)

Error detection and response Internal and external hardware errorsInternal and external hardware errors

Memory errorsMemory errors Device failuresDevice failures

Software errorsSoftware errors Arithmetic overflowArithmetic overflow Division by zeroDivision by zero Access to forbidden memory locations (why?)Access to forbidden memory locations (why?)

Operating system cannot grant request of Operating system cannot grant request of applicationapplication

Accounting Collect statisticsCollect statistics Monitor performanceMonitor performance Used to anticipate future enhancementsUsed to anticipate future enhancements Used for billing usersUsed for billing users

operating system Concepts -mahabadi

Silberschatz and Galvin 14

1: Introduction1: Introduction

1.1 What is an operating system? 1.2 Computer System & Components 1.3 User Interface 1.4 Resource Manager 1.5 Memory Management 1.6 Protection & Security 1.7 File System 1.8 History of Operating System 1.9 1.9 OS Strategies 1.10 Multiuser

operating system Concepts -mahabadi

Silberschatz and Galvin 15

1.1 What is an Operating System?

At any time only one Operating Systemonly one Operating System can execute on a computer.

Operating system goals: – ExecuteExecute user programs &make solving user problems

easier. – Make the computer system convenient to useuse.

A program/Software that acts as an intermediary between a user A program/Software that acts as an intermediary between a user of a computer & the computer hardware.of a computer & the computer hardware.

Use the computer hardwarehardware in an efficient manner. Interface managerInterface manager :Human interaction made easy interfacing,

abstraction, control & sharing. Resource manager Resource manager :Manage &Efficient use of resources. Enhances hardware featuresEnhances hardware features : “virtual” time, space & resource

(processes, threads). System & data securitysecurity and protectionprotection provider . Improves performanceperformance (response time, throughput, etc)

operating system Concepts -mahabadi

Silberschatz and Galvin 16

Application /System Software

Banking Reservation Web Bowser

Compiler Interpreter Editors

Operating System

Machine LanguageMachine Language

Microprogramming (CISC) Microprogramming (CISC)

Physical DevicePhysical Device

Application Application SoftwareSoftware

System System

SoftwareSoftware

HardwareHardwareCISCCISCRISCRISC

AMIN
RISC :Reduced Istruction Set ComputerCISC :Complex Istruction Set Computer

operating system Concepts -mahabadi

Silberschatz and Galvin 17

1.2 Computer System Components1.2 Computer System Components

HardwareHardware – provides basic computing resources (CPU ,memory, I/O devices).

Operating systemOperating system – controls & coordinates the use of the hardware among the various application programs for the various users.

Applications programsApplications programs – define the ways in which the system resources are used to solve the computing problems of the users (compilers, database systems, video games, business programs).

UsersUsers (people,machines,other computers).

operating system Concepts -mahabadi

Silberschatz and Galvin 18

Abstract View of System Components

operating system Concepts -mahabadi

Silberschatz and Galvin 19

Operating System Definitions

Resource allocatorResource allocator– manages & allocates resources.

Control program/ Supervisor/ MonitorControl program/ Supervisor/ Monitor– controls the execution of user programs & operation of I/O devices.

KernelKernel– (Core) the one program running at all times & resident in memory (all else being application programsapplication programs).

operating system Concepts -mahabadi

Silberschatz and Galvin 20

A split view of the kernelA split view of the kernel

operating system Concepts -mahabadi

Silberschatz and Galvin 21

1.3 User Interface 1.3 User Interface Operating system provides these facilities for the user: User interface User interface :interface to user/user program. CLI,GUI, Batch. Program creationProgram creation: editors,debuggers,other development tools. Program executionProgram execution: load a program into memory, run it,

terminate it. load, files, IO operations. read & write files & directories, create & delete them, search them, list file information, permission management.

Access to IO devices Access to IO devices : Read & writes. Controlled access to filesControlled access to files: protection mechanisms, abstraction

of underlying device. System access System access : Controls who can access the system. Error

detection & response:external,internal,software or hardware error(Errors may occur in the CPU & memory hardware, in I/O devices,in user program).Debugging facilities.

AccountingAccounting: Collect stats., load sharing ,for billing purposes.

operating system Concepts -mahabadi

Silberschatz and Galvin 22

User Interface (Cont.)User Interface (Cont.)

Command-Line Interface (CLI) :allows direct command entry

Sometimes implemented in the kernel, sometimes by a system program.

Sometimes multiple flavors implemented–shells. Primarily fetches a command from user &

executes it built-in commands or just names of programs ( -> extendible) Unix example (csh): rm file.txt

operating system Concepts -mahabadi

Silberschatz and Galvin 23

User Interface (Cont.)User Interface (Cont.)

Graphics User Interface (GUI): user-friendly desktop metaphor

IconsIcons represent files, programs, actions, etc. FoldersFolders represent directories. MenusMenus (pulldown/popup)show available commands. Various mouse buttonmouse button clicks over objects in the

interface cause various actions (e.g., provide information, show options, execute function, open directory)

Invented at Xerox PARC Batch Many systems now include both CLI & GUI interfaces

Microsoft Windows is GUI with CLI “command” shell Apple Mac OS X as “Aqua” GUI interface with UNIX

kernel underneath & shells available Solaris is CLI with optional GUI interfaces (CDE, Java

Desktop, KDE)

operating system Concepts -mahabadi

Silberschatz and Galvin 24

1.4 Resource Manager 1.4 Resource Manager

ProcessorsProcessors : Allocation of processes to processors, preemption, scheduling.

MemoryMemory : Allocation of main memory. IO devices IO devices : When to access Io

devices, which ones etc. FilesFiles : Partitions, space allocation &

maintenance. ApplicationsApplications, DataData, objectsobjects.

operating system Concepts -mahabadi

Silberschatz and Galvin 25

Resource Manager (Cont.)Resource Manager (Cont.)

operating system Concepts -mahabadi

Silberschatz and Galvin 26

What is Resource Management?What is Resource Management? Process Process : An executing program Resource Resource : Anything that is needed for

a process to run– Memory– Space on a disk– The CPU

“An OS creates resource abstractions” “An OS manages resource sharing”

operating system Concepts -mahabadi

Silberschatz and Galvin 27

Resources Sharing & Preemption

Resource Shared Unshared Preemptible Unpreemptible

Hardware:CPUCPU XX XX Main Main

MemoryMemory XX XX

PrintersPrinters XX XX MonitorsMonitors XX XX Disk DrivesDisk Drives XX XX Tape DrivesTape Drives XX XXData: User User

VariablesVariables XX System System

VariablesVariables XXSoftware: DLL DLL XX

operating system Concepts -mahabadi

Silberschatz and Galvin 28

MultiprogrammingMultiprogramming From uniprogramming to multiprogramming systems:From uniprogramming to multiprogramming systems:

Processor must wait for I/O instruction to complete before preceding & But! Processors are much faster than I/O devices… -> inefficient use of CPUinefficient use of CPU

Multiprogramming systemsMultiprogramming systems:batch programs objective is maximize system (processor) utilization (x%->X%).

Time sharing systems Time sharing systems :Objective is minimize response time. Typical programs are interactive.

operating system Concepts -mahabadi

Silberschatz and Galvin 29

Multiprogramming (Cont.)Multiprogramming (Cont.)

Technique for sharingsharing the CPU among runnable processes

– Process may be blockedblocked on I/O– Process may be blocked waitingwaiting for other

resource While one process is blocked, another

should be able to run Multiprogramming OS accomplishes

CPU sharingCPU sharing “automatically” Reduced time to runtime to run all processes

operating system Concepts -mahabadi

Silberschatz and Galvin 30

Multiprogramming (Cont.)Multiprogramming (Cont.)

operating system Concepts -mahabadi

Silberschatz and Galvin 31

Multiprogrammed Batch Systems Multiprogrammed Batch Systems

If memory can hold several programsseveral programs, then CPU can switch to another one whenever a program is awaiting for an I/O to complete.

This is multitaskingmultitasking (multiprogramming).

operating system Concepts -mahabadi

Silberschatz and Galvin 32

ProcessesProcesses A programprogram in execution, An entityentity that can be assigned to and executed on a

processor, It is a unit of workunit of work. Multiprogramming ,time-sharing and real-time

transaction systems lead to the refinement of the concept of processprocess.

A process can be defined by its attributes and behaviors : it can be viewed as an Abstract Data TypeAbstract Data Type (ADT).

When instances of this ADT co-exist we have concurrent processingconcurrent processing.

Issues in concurrent processing :synchronization, mutual exclusion, deadlock, communication.

operating system Concepts -mahabadi

Silberschatz and Galvin 33

ProcessProcess

Introduced to obtain a systematic way of monitoringmonitoring and controllingcontrolling program execution

A process is an executable program with : associated datadata (variables, buffers…)

execution context: i.e. all the information that the CPU needs to execute the process : content of the processor registers

the OS needs to manage the process: prioritypriority of the process

the eventevent (if any) after which the process is waiting other data other data (that we will introduce later)

operating system Concepts -mahabadi

Silberschatz and Galvin 34

1.5 Memory management 1.5 Memory management

Requirements: Process isolationisolation, automaticautomatic allocation & maintenance, protection & access control, long-term storage facilities.

Virtual memory & file system facilities together satisfy all these requirements.

Virtual memoryVirtual memory allows programs to address the memory from a logical point of view without regard to the amount of main memory available.

FileFile: persistent storage for programs and data. Can view file also as an ADT? File concept makes

access control &protection convenient for the OS.

operating system Concepts -mahabadi

Silberschatz and Galvin 35

1.6 Protection & Security 1.6 Protection & Security When sharing resources, protectionprotection of the

systems & user resources from intentional as well as inadvertent misuse.

ProtectionProtection generally deals with access control. Example: Read only file

SecuritySecurity deals usually with threats from outside the system that affects the integrity & availability of the system and information with the system.

Example: username, password to access system. Data encryption to protect information.

operating system Concepts -mahabadi

Silberschatz and Galvin 36

Scheduling & resource management Scheduling & resource management

Scheduling & resource management is an Operations ResearchOperations Research (OR) problem.

Goals : Efficient use of resources, satisfy the service time requested by a process, say, in a real-time system & of course, fairness.

Short-term & long-term scheduling. QueuingQueuing is one of the basic operations

associated with scheduling. Interrupt is another important concept in the context of scheduling.

operating system Concepts -mahabadi

Silberschatz and Galvin 37

Scheduling & resource management (Cont)Scheduling & resource management (Cont)

Differential responsiveness Differential responsiveness : discriminate between different classes of jobs

FairnessFairness :give equal and fair access to all processes of the same class

EfficiencyEfficiency :maximize throughput, minimize response time, & accommodate as many users as possible

operating system Concepts -mahabadi

Silberschatz and Galvin 38

1.7 File System 1.7 File System

Implements long-term storestore (often on disk)

Information stored in named objects called files files :a convenient unit of access& protection for OS

Files (&portions) may be copied into virtual memory for manipulation by programs

operating system Concepts -mahabadi

Silberschatz and Galvin 39

1.8 Brief History of OS First GenerationFirst Generation of computers had no OS: single-

user. All coding done directly in machine language , memory resident code (no other resources to manage)

Second GenerationSecond Generation has basic OS: batch processing . Read input (tape/cards), process, output to tape or print

Third GenerationThird Generation improved life: multiprogramming! Careful partitioning of memory space (4-12KB), drums & disks added for reading cards and spooling outputs (Simultaneous Peripherals Operations On-Line)

Time-sharing created several virtual machines

operating system Concepts -mahabadi

Silberschatz and Galvin 40

Brief History of OS (cont)

Fourth GenerationFourth Generation: PCs and workstations. Cheaper, faster, more user-friendly (Thank Macs for interfaces!)

UNIX precursor MULTICS (MULTIplexed Information & Computing Services) was the first “modern” OS. Bell+MIT+GE (MULTICS --> units --> Unix)

Berkeley improved on it: paging, virtual memory, file systems, signals (interrupts), networking!

operating system Concepts -mahabadi

Silberschatz and Galvin 41

OS - Microsoft World

Excellent marketing, some good products OSs started with DOSDOS (Disk OS), no nothing,

just very simple commands! Windows 3.1Windows 3.1 was a huge jump (based on

decades-old technology initially developed at Xerox then Macs)

Windows 95Windows 95 (released in 96/98/XP) improved tremendously the state-of-the-affairs for MS, but still unreliable

Windows NTWindows NT approaches Unix distributions, with more user-friendly interface.

operating system Concepts -mahabadi

Silberschatz and Galvin 42

OS - UNIX World Created at AT&T, re-written/improved by Berkeley ATT had majority control and good support (reliable

OS) OSF (Open SW Foundation, now Open Group) is a

consortium of several companies to standardize UNIX

Different subgroups (syscalls, shells, RT, etc) Standardization is with respect to interfaces and

not implementation of primitives. Impln is left to the implr

Modern applications are time constrained (tel, video, etc)

Real-Time playing an increasingly important role

operating system Concepts -mahabadi

Silberschatz and Galvin 43

OS – Linux World

operating system Concepts -mahabadi

Silberschatz and Galvin 44

1.9 Types of OS or 1.9 Types of OS or OS Strategies Bare Machines Simple BatchBatch Systems Multiprocessing - multiple CPUsCPUs Multiprogramming Systems :Batch ,Time sharing, interactive Personal-Computer Systems Parallel Systems DistributedDistributed systems:Sharing & fault tolerance, reliability,

dependability. Real-timeReal-time Systems :deadlines, time constraints, predictability Network OS Network Transparent Systems : CORBA-like Network-centric Systems : Jini-like Specialized OSSpecialized OSs are built for specific purposes: routing engines

(Networking), lisp machines (AI), time constrained applications (Real-Time), Internet (WWW servers), massively parallel uses (supercomputers), Smart Card ,mobile ,etc

Component-based systems: Enterprise Java

operating system Concepts -mahabadi

Silberschatz and Galvin 45

Early Systems– Bare machine (early1950s)Early Systems– Bare machine (early1950s) StructureStructure – Large machines run from console – Single user system – Programmer/User as operator – Paper tape or punched cards Early SoftwareEarly Software – Assemblers, compilers – Linkers, loaders – Libraries of common subroutines – Device drivers SecureSecure Inefficient use of expensive resourcesInefficient use of expensive resources – Low CPU utilization – Significant amount of setup time

operating system Concepts -mahabadi

Silberschatz and Galvin 46

Batch SystemsBatch Systems Uses multiprogrammingmultiprogramming JobJob (file of OS commands)prepared offlineoffline Batch of jobsBatch of jobs given to OS at one time OS processes jobs one-after-the-otherone-after-the-other NoNo human-computer interactioninteraction OS optimizes resource utilization Batch processing (as an option) still used

today

operating system Concepts -mahabadi

Silberschatz and Galvin 47

Simple Batch SystemsSimple Batch Systems Hire an operator User as operator Add a card reader Reduce setup timesetup time by batching similar jobs Automatic job sequencing– automatically

transfers control from one job to another. First rudimentary operating system.

Resident monitor initial control in monitor control transfers to job when job completes control transferscontrol transfers back to

monitor

operating system Concepts -mahabadi

Silberschatz and Galvin 48

Simple Batch Systems (Cont.)Simple Batch Systems (Cont.)

ProblemsProblems 1. How does the monitor know about the

nature of the job (e.g., Fortran versus Assembly) or which program to execute?

2. How does the monitor distinguish (a) job from job? (b) data from program? SolutionSolution – Introduce control cards – Job Control Language : JCL

operating system Concepts -mahabadi

Silberschatz and Galvin 49

Control Cards (JCL)Control Cards (JCL)

Special cardsSpecial cards that tell the resident monitor which programs to run:

$JOB $FTN $RUN $DATA $END Special charactersSpecial characters distinguish control

cards from data or program cards: $ in column 1 // in column 1 and 2 7-9 in column 1

operating system Concepts -mahabadi

Silberschatz and Galvin 50

Control Cards (Cont.)Control Cards (Cont.) Parts of resident monitor

– Control card interpreterControl card interpreter – responsible for reading & carrying out instructions on the cards.

– LoaderLoader–loads systems programs & applications programs into memory.

– Device driversDevice drivers–know special characteristics & properties for each of the system’s I/O devices.

ProblemProblem: Slow Performance – I/O & CPU could not overlap; card reader very slow.

SolutionSolution: Off-line operation– speed up computation by loading jobs into memory from tapes & card reading & line printing done off-line.

operating system Concepts -mahabadi

Silberschatz and Galvin 51

Off-Line OperationOff-Line Operation

operating system Concepts -mahabadi

Silberschatz and Galvin 52

Off-Line Operation (Cont.)Off-Line Operation (Cont.)

AdvantageAdvantage – main computer not constrained by the speed of the card readers & line printers, but only by the speed of faster magnetic tape units.

No changeschanges need to be made to the application programs to change from direct to off-line I/O operation.

Real gainReal gain – possibility of using multiple reader-to-tape & tape-to-printer systems for one CPU.

operating system Concepts -mahabadi

Silberschatz and Galvin 53

SpoolingSpooling

Overlap I/OOverlap I/O of one job with computation of another job. While executing one job, the OS:

–reads next job from card reader into a storage area on the disk (job queue).

–outputs printout of previous job from disk to printer.

Job poolJob pool – data structure that allows the OS to select which job to run next in order to increase CPU utilization (later has an experiment).

operating system Concepts -mahabadi

Silberschatz and Galvin 54

Multiprogrammed Batch SystemsMultiprogrammed Batch Systems

Several jobs are kept in main memory at the same time, & the CPU is multiplexed among them.

operating system Concepts -mahabadi

Silberschatz and Galvin 55

OS Features Needed for MultiprogrammingOS Features Needed for Multiprogramming

I/O routineI/O routine supplied by the system. Memory managementMemory management – the system

must allocate the memory to several jobs.

CPU schedulingCPU scheduling – the system must choose among several jobs ready to run.

Allocation of devicesdevices.

operating system Concepts -mahabadi

Silberschatz and Galvin 56

Time Sharing SystemsTime Sharing Systems Uses multiprogrammingmultiprogramming Support interactiveinteractive computing model

(Illusion of multiple consoles) DifferentDifferent scheduling & memory

allocation strategies than batchthan batch Tends to propagate processes Considerable attention to resource resource

isolationisolation (security & protection) Tend to optimize response timeoptimize response time

operating system Concepts -mahabadi

Silberschatz and Galvin 57

Time-Sharing Systems– Interactive ComputingTime-Sharing Systems– Interactive Computing

The CPU is multiplexed among several jobs that are kept in memory & on disk (the CPU is allocated to a job only if the job is in memory).

A job is swapped in & outswapped in & out of memory to the disk.

On-lineOn-line communication between the user & the system is provided; when the operating system finishes the execution of one command, it seeks the next “control statementcontrol statement” not from a card reader, but rather from the user’s keyboard.

On-line file system must be available for users to access data & code.

operating system Concepts -mahabadi

Silberschatz and Galvin 58

Personal-Computer SystemsPersonal-Computer Systems Personal computers – computer system

dedicated to a single usersingle user. I/O devices – keyboards, mice, display

screens, small printers. User convenience & responsiveness. Can adopt technology developed for

larger operating systems; often individuals have sole use of computer & do not need advanced CPU utilization or protection features.

operating system Concepts -mahabadi

Silberschatz and Galvin 59

Parallel SystemsParallel Systems

MultiprocessorMultiprocessor systems with more than one CPU in close communication.

Tightly coupled system – processors share memory and a clock; communication usually takes place through the shared memory.

Advantages of parallel systems: Increased throughput Economical Increased reliability

graceful degradation fail-soft systems

operating system Concepts -mahabadi

Silberschatz and Galvin 60

Parallel Systems (Cont.)Parallel Systems (Cont.)

SymmetricSymmetric multiprocessing Each processor runs an identical copy

of the operating system. Many processes can run at once

without performance deterioration. AsymmetricAsymmetric multiprocessing

Each processor is assigned a specific task; master processor schedules & allocates work to slave processors.

More common in extremely large systems.

operating system Concepts -mahabadi

Silberschatz and Galvin 61

Distributed SystemsDistributed Systems Distribute the computation among several several

physicalphysical processors. Loosely coupled system – each processor

has its own local memoryown local memory; processors communicate with one another through various communication lines, such as high-speed buses or telephone lines.

Advantages of distributed systems:– Resource sharing– Computation speed up – load sharing– Reliability– Communication

operating system Concepts -mahabadi

Silberschatz and Galvin 62

Distributed Systems (Cont.)Distributed Systems (Cont.)

operating system Concepts -mahabadi

Silberschatz and Galvin 63

Real-Time SystemsReal-Time Systems Often used as a control devicecontrol device in a dedicated

application such as controlling scientific experiments, medical imaging systems, industrial control systems, & some display systems.

Well-defined fixed-timefixed-time constraints. Hard real-timeHard real-time system.

– Secondary storage limited or absent; data stored in short-term memory, or read-only memory (ROM).

– Conflicts with time-sharing systems; not supported by general-purpose operating systems.

Soft real-timeSoft real-time system. – Limited utility in industrial control or robotics.– Useful in applications (multimedia ,virtual reality)

requiring advanced operating-system features.

operating system Concepts -mahabadi

Silberschatz and Galvin 64

1.10 Multiuser One Central System With CPU(s) for process More than One user Each user has a keyboard & Terminal Switch between users Response Time is important for users:

With same operationsWith same operations With different operationsWith different operations Without Time SlicingWithout Time Slicing With Time SlicingWith Time Slicing