<<

CS550

• Distributed Operating Systems (Advanced Operating Systems) • Instructor: Xian-He Sun – Email: [email protected], Phone: (312) 567-5260 – Office hours: 2:10pm-3:10pm Tuesday, 3:30pm-4:30pm Thursday at SB229C, or by appointment • TA: Mr. Cui, Zongjie – Email: [email protected] – Office hours: TBA • Blackboard: – http://courseinfo.iit.edu • Class Web site – http://www.cs.iit.edu/~sun/cs550.html

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 1 Structure of OSs

Five major intellectual achievements • Processes • • Information protection and security • and resource management • System structure

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 2

A process is an active entity and is realized by data structure • Process space: each process is assigned a virtual – Text region, the code being executed by the process – Data region, holding global variables – Stack region, holding execution of the program •Threat – -level threat, system-level threat

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 3 X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 4 Memory Management

• Main-memory management • Second-storage management • I/O system • : allows program to address memory without regard to the amount of main memory physically available

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 5 File Management

• A file is a collection of related information defined by its creator. Commonly, files represent programs (both source and object forms) and data. • The is responsible for the following activities in connection with file management: File creation and deletion, Directory creation and deletion, Support of primitives for manipulating files and directories, Mapping files onto secondary storage, File backup on stable (nonvolatile) storage media

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 6 X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 7 Secondary-Storage Management

• Since main memory (primary storage) is volatile and too small to accommodate all data and programs permanently, the system must provide secondary storage to back up main memory.

• Most modern computer systems use disks as the principle on-line storage medium, for both programs and data.

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 8 I/O Techniques

There are three basic I/O techniques • Programmed I/O: The processor issues an I/O command on behalf of a process to an I/O module – processor busy waiting – no interrupts • Interrupt-driven I/O: same as programmed I/O except – processor may continue execution or suspend – use of interrupts • (DMA): A DMA (I/O) module controls the exchange of data between memory and I/O module – use of interrupts

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 9 X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 10 I/O Channels and I/O Processors

The I/O channel (processor) is an extension of the DMA concept • Able to execute I/O instructions • Direct access both memory and I/O modules • I/O processors have their own memory • Each I/O channel (processor) drive many I/O controllers – select channel: serve one controller at a time (for high speed devices) – multiplexor channel: concurrently handle multiple I/O controllers (for both high and low speed devices) • Each I/O controller may drive many I/O devices

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 11 X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 12 Protection System

• Protection refers to a mechanism for controlling access by programs, processes, or users to both system and user resources. • The protection mechanism must: – distinguish between authorized and unauthorized usage. – specify the controls to be imposed. – provide a means of enforcement.

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 13 Hardware Protection

• Dual-Mode Operation • I/O Protection • • CPU Protection

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 14 Dual-Mode Operation

• Sharing system resources requires operating system to ensure that an incorrect program cannot cause other programs to execute incorrectly. • Provide hardware support to differentiate between at least two modes of operations. 1.User mode – execution done on behalf of a user. 2.Monitor mode (also kernel mode or system mode) – execution done on behalf of operating system.

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 15 I/O Protection

• All I/O instructions are privileged instructions. • Must ensure that a user program could never gain control of the computer in monitor mode (I.e., a user program that, as part of its execution, stores a new address in the interrupt vector).

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 16 Use of A to Perform I/O

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 17 Memory Protection

• Must provide memory protection at least for the interrupt vector and the interrupt service routines. • In order to have memory protection, add two registers that determine the range of legal addresses a program may access: – Base register – holds the smallest legal physical memory address. – Limit register – contains the size of the range • Memory outside the defined range is protected.

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 18 System Design Goals

• User goals – operating system should be convenient to use, easy to learn, reliable, safe, and fast. • System goals – operating system should be easy to design, implement, and maintain, as well as flexible, reliable, error-free, and efficient.

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 19 Any Questions?

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 20 Distributed Systems

• What is a distributed (computing) system?

“A collection of independent that appears to its users as a single coherent system” -A. Tanenbaum

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 21 Examples

• Some examples of distributed systems – Department computing cluster – Corporate systems • Application examples –Email –News – Multimedia information systems- video conferencing – Airline reservation system – Banking system • What is the most used distributed system? – World Wide Web

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 22 Distributed vs. Single Systems

• Data sharing – Multiple users can access common database, data files,… • Device/resource sharing – Printers,servers,CPUs,…. • Communication – Communication with other machines… •Flexibility – Spread workload to different & most appropriate machines • Extensibility – Add resources and as needed

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 23 Distributed vs. Centralized Systems

• Economics – Microprocessors have better price/performance than mainframes • Speed – Collective power of large number of systems • Geographic and responsibility distribution • Reliability – One machine’s failure need not bring down the system • Extensibility – Computers and software can be added incrementally

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 24 Disadvantages of Distributed Systems

• Software – Little software exists compared to central processing – Complexity of the system: coordination of processes •Networking – Still slow and can cause other problems (e.g. when disconnected) • Security – Data may be accessed by unauthorized users – Authentication, in addition to access and flow control

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 25 Key Characteristics

• Support for resource sharing • Openness • Concurrency • Scalability • Fault tolerance (reliability) • Transparence

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 26 Resource Sharing

• Share hardware,software,data and information • Hardware devices – Printers,disks,memory,… • Software sharing – Compilers,libraries,toolkits,… •Data – Databases,files,…

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 27 Openness

• Determines whether the system can be extended in various ways without disrupting existing system and services • Hardware extensions – Adding ,memory,communication interfaces… • Software extensions – Operating systems features – Communication protocols • Standard rules and protocols

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 28 Concurrency

• In a single system several processes are interleaved • In distributed systems: there are many systems with one or more processors – Many users simultaneously invoke commands or applications – Many servers processes run concurrently, each responding to different client request – What is the difference between parallel and concurrent processing?

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 29 Scalability

• Scale of system – Few PCs servers ->dept level systems->local area networks->internetworked systems->wide area network… – Ideally, system and application software should not change as systems scales • Scalability depends on all aspects – Hardware – Software –Networks – Application

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 30 Fault Tolerance • Ability to operate under failures: possibly at a degraded performance level • Two approaches: – Hardware redundancy: use of redundant components – Software recovery: design of programs to recover, Checkpointing/migration • In distributed systems: – Servers can be replicated – Databases may be replicated – Software recovery involves the design so that state of permanent data can be recovered • Fault detection

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 31 Transparency in a Distributed System

Transparency Description Hide differences in data representation and Access how a resource is accessed Location Hide where a resource is located Hide that a resource may move to another Migration location Hide that a resource may be moved to another Relocation location while in use Hide that a resource may be shared by several Replication competitive users Hide that a resource may be shared by several Concurrency competitive users Failure Hide the failure and recovery of a resource Hide whether a (software) resource is in Persistence memory or on disk

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 32 Distributed Operating System

• Manages resources in a distributed system – Seamlessly and transparently to the user • Looks to the user like a centralized OS – But operates on multiple independent CPUs • Provides transparency – Location, migration, concurrency, replication,… • Presents users with a virtual uniprocessor

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 33 Types of Distributed OSs

System Description Main Goal

Hide and manage Tightly-coupled operating system for multi- DOS hardware processors and homogeneous multicomputers resources Loosely-coupled operating system for Offer local services NOS heterogeneous multicomputers (LAN and to remote clients WAN) Additional layer atop of NOS implementing Provide distribution Middleware general-purpose services transparency

An overview of • DOS (Distributed Operating Systems) • NOS (Network Operating Systems) • Middleware

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 34 Comparison between Systems

Distributed OS Network Middleware- Item OS based OS Multiproc. Multicomp.

Degree of transparency Very High High Low High

Same OS on all nodes Yes Yes No No

Number of copies of OS 1 N N N Basis for Shared Messages Files Model specific communication memory Global, Global, Resource management Per node Per node central distributed Scalability No Moderately Yes Varies

Openness Closed Closed Open Open

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 35 Summary

• Key issues of distributed systems • Hardware concepts – Multiprocessors – Multicomputers – Distributed systems • Software concepts – Uniprocessor OS – Distributed OS –Network OS – Middleware • Readings – Review Central OS, Chapter 1 of the text

X.Sun (IIT) CS550: Distributed OS Lecture 1 Page 36