<<

CHAPTER 1: OPERATING FUNDAMENTALS

What is an ?

• A collection of modules to in enhancing system efficiency, flexibility, and robustness

• An Extended from the users’ viewpoint

• A Resource Manager from the system’s viewpoint

What are the primary functions of an operating system?

the processor(s)

processes

• coordinating interaction among processes, interprocess and synchronization

• managing system resources (I/O, memory, files)

• enforcing access control and protection

• maintaining system integrity and performing error recovery

• providing an interface to the users

1 Evolution of modern operating

1. Centralized operating system: resource management and extended ma- chine to support Virtuality

(a) Resident Monitor () - =operator, single (tag">b) Batch Systems - user =6 operator, single → multiple processes () Timesharing Systems - interactive, multiple processes () Personal - user=operator, single → multiple processes

2. : resource to achieve Interoperability

3. Distributed operating system: a single view of a multiple- computer system for Transparency

4. Cooperative autonomous system: cooperative work with Autonomicity

A spectrum of modern operating systems

Decreasing of Hardware and Software Coupling 1st 3rd 4th 2nd centralized distributed cooperative network operating operating autonomous operating system system system system Decreasing Degree of Transparency

2 Operating system structuring methods

• modularization

• vertical partitioning (layered one-in-one-out structure)

• horizontal partitioning

/ model

• minimal (or micro) kernel

• subsystem with API and SPI

Example of OS Partitioning:

Applications accounting word processing manufacturing

Subsystems programming environment system

Utilities

System Services system memory manager scheduler

CPU multiplexing, handling, device drivers Kernel synchronization primitives, interprocess communication

3 API and SPI:

Applications

API Extensible system services SPI (or HAL) Portable

Platforms

Windows NT: an example of operating system structure

OS / 2 client Win 32 client POSIX client

OS / 2 Win 32 POSIX subsystem subsystem subsystem User Mode

system service API Kernel Mode

local virtual object process I / O reference procedure memory manager manager manager monitor call manager Executives kernel with hardware

hardware platform

4 Overview of centralized operating systems:

Resource Manager

• Process management

– interprocess communication – process synchronization – process scheduling

– memory allocation and deallocation – logical to physical address mapping – support: segmentation and paging – protection

• Device management

– buffering –

• Data management

– file access – file sharing – – data

5 Process management • interprocess communication

• process synchronization

• process scheduling

Process States:

Starting Halting

Initialize PCB Halt/ABEND

Dispatch/Context

Ready Running

TRO/ Block Unblock

Blocked

6 Memory management • memory allocation and deallocation

• logical to physical address mapping

• virtual memory support: segmentation and paging

• protection

Paged Memory:

Logical Address Physical Address Number Offset Page Offset

Page Table Control Bits Page Frame ......

VSD ......

7 Device management • device driver

• buffering

• spooling

Device Drivers and DMA:

Hardware Independent Interface

Generic Driver Code

Hardware Dependent Code

Physical Device Interface

CPU RAM

System

DMA

Device 1 ... Device N

8 Data management • file access

• file sharing

• concurrency control

• data replication

Memory Management Unit:

CPU

RAM TLB MMU

System Bus

9 :

Directory Disk Blocks File Name i− number

my_file.txt 0x001af38... i−node Owner UID Owner GID ... i−node Table drwxrwxrwx ...... Direct Blk 10 Direct Blk 11 ... Direct Blk 0 ...

Direct Blk 1 ... Direct Blk 521 ......

Primary IB 0 1−IB 1 Direct Blk 522 Secondary IB 1−IB 2 Direct Blk 523 ...... 1−IB 512

10 Unix File Tables:

Proc Ctl Blk Sys File Tbl i−node Table PID

Proc File Tbl ...... PFT ptr rc loc mode i−node # ...

FID ......

11 Network operating system

• interoperability: ability of information exchange among heterogeneous systems

• supported by network communication protocols

• transport service: the primary interface between operating system and

• characterized by common network applications (servers)

– remote login – file transfer – messaging – browsing – remote

A network file system example

application processes peer application processes communication file service file service protocols local network network local file system file system file system device transport transport device management service service management device network network device driversKERNEL service serviceKERNEL drivers local hardware communication network local hardware

12 Distributed operating system

• transparency

• servers for supporting resource sharing and distributed processing

to implement transparencies

• details in latter chapters

Service Decomposition vs. Integration

Services

Decomposition in Integration in distributed systems autonomous systems

13 Cooperative autonomous system

• client/server model

• object model

• software bus (, broker, or trader)

• CORBA and ODP

• Peer-to-Peer (P2P) systems

• Service Oriented Architecture (SOA) systems

An example of cooperative autonomous system

Yellow communication channels

real estate agency servers

realtor realtor

client well−known server client

buyer newspaper seller

14 Service Oriented Architecture (SOA)

(from http://en.wikipedia.org/wiki/Service-oriented architecture)

Guiding Principles

• Reuse, granularity, , composability, componentization, in- teroperability

• Standards compliance

• Service identification and categorization, provisioning and delivery, mon- itoring and tracking

SOA Elements

General idea of usage is to ”orchestrate” services to develop application.

15 Specific SOA Architectural Principles • Service encapsulation - minimal interface

• Service - minimize dependencies

• Service contract - documented specification and agreement

• Service abstraction - internals hidden

• Service reusability - intentional packaging of multi-use services

• Service composability - composite services formed from building blocks

• Service autonomy - owners control logic encapsulated by services offered

• Service optimization - clients can ”shop” for the ”best” service

• Service discoverability - meaningful descriptions available through dis- covery mechanisms

• Service relevance - granularity is right for meaningful service

Why do we need distributed control algorithms?

An is sometimes called protocol if it specifies coordination than computation.

• algorithm changes due to message passing

• need for consensus algorithms due to lack of global information

• concurrency control algorithms to avoid interference in resource sharing

• coherency control algorithms to maintain consistency for data replica- tion

• protocols for group communication in distributed applications

• fault-tolerance algorithms for handling failure and recovery

• real- and distributed scheduling algorithms 16