CS 5523 Operating Systems: Intro to Distributed Systems

Similar documents
CS 5523 Operating Systems: Synchronization in Distributed Systems

CS 5523: Operating Systems

CS 5523: Operating Systems

COMP 635: WIRELESS & MOBILE COMMUNICATIONS COURSE INTRODUCTION. Jasleen Kaur. Fall 2017

4th International Industrial Supercomputing Workshop Supercomputing for industry and SMEs in the Netherlands

Dependability in Distributed Systems

Cloud Tutorial: AWS IoT. TA for class CSE 521S, Fall, Jan/18/2018 Haoran Li

Servilla: Service Provisioning in Wireless Sensor Networks. Chenyang Lu

Last Time. Bit banged SPI I2C LIN Ethernet. u Embedded networks. Ø Characteristics Ø Requirements Ø Simple embedded LANs

File Systems: Fundamentals

Estonian National Electoral Committee. E-Voting System. General Overview

ForeScout Extended Module for McAfee epolicy Orchestrator

Real-Time CORBA. Chenyang Lu CSE 520S

CSE 520S Real-Time Systems

M-Vote (Online Voting System)

General Framework of Electronic Voting and Implementation thereof at National Elections in Estonia

HPCG on Tianhe2. Yutong Lu 1,Chao Yang 2, Yunfei Du 1

Cyber-Physical Systems Scheduling

CS 2461: Computer Architecture I

Case Study. MegaMatcher Accelerator

Final Review. Chenyang Lu. CSE 467S Embedded Compu5ng Systems

Adaptive QoS Control for Real-Time Systems

Uncovering the veil on Geneva s internet voting solution

Secure Electronic Voting

SMS based Voting System

Addressing the Challenges of e-voting Through Crypto Design

Statement on Security & Auditability

State Election Commission Maharashtra (EMP)

ADAMS ISP SERVICES AGREEMENT and NETWORK MANAGEMENT POLICY

Voting Protocol. Bekir Arslan November 15, 2008

Netvote: A Blockchain Voting Protocol

The Digital Appellate Court Introduction to the edca Electronic Portal

BRAIN GAIN INITIATIVE

Management Overview. Introduction

DevOps Course Content

UNITED STATES DISTRICT COURT CENTRAL DISTRICT OF CALIFORNIA CIVIL MINUTES GENERAL

Amendment to the Infinite Campus END USER LICENSE AGREEMENT

Supreme Court of Florida

David R. Johnson and David G. Post, Law and Borders The Rise of Law in Cyberspace 45 Stan. L. Rev (1996)

Review: Background on Bits. PFTD: What is Computer Science? Scale and Bits: Binary Digits. BIT: Binary Digit. Understanding scale, what does it mean?

Comparison Sorts. EECS 2011 Prof. J. Elder - 1 -

Swiss E-Voting Workshop 2010

We should share our secrets

Product Description

Concurrent Programing: Why you should care, deeply. Don Porter Portions courtesy Emmett Witchel

Optimize Web Presence in China

Cadac SoundGrid I/O. User Guide

Economic and Social Council

Fall Detection for Older Adults with Wearables. Chenyang Lu

Kjell-Einar Anderssen. Country Manager Norway - Nutanix

HASHGRAPH CONSENSUS: DETAILED EXAMPLES

Quality of Service in Optical Telecommunication Networks

Real-Time Scheduling Single Processor. Chenyang Lu

Agreement for iseries and AS/400 System Restore Test Service

The Angola National ID Card

Software License Agreement for Beckhoff Software Products

bitqy The official cryptocurrency of bitqyck, Inc. per valorem coeptis Whitepaper v1.0 bitqy The official cryptocurrency of bitqyck, Inc.

Security Analysis on an Elementary E-Voting System

CONCRETE: A benchmarking framework to CONtrol and Classify REpeatable Testbed Experiments

Internet of Things Wireless Sensor Networks. Chenyang Lu

Processes. Criteria for Comparing Scheduling Algorithms

process will save judges, sheriffs, clerks, and attorneys' time and money.

IF YOU DO NOT AGREE TO THESE TERMS, DO NOT DOWNLOAD, INSTALL OR USE BSC.

FEDEX SAMEDAY CITY WEB SERVICES END USER LICENSE AGREEMENT

City of Toronto Election Services Internet Voting for Persons with Disabilities Demonstration Script December 2013

YOOCHOOSE GmbH Terms and Conditions Subject Matter

OPEN SOURCE CRYPTOCURRENCY E-PUB

Key Considerations for Implementing Bodies and Oversight Actors

SECURITY, ACCURACY, AND RELIABILITY OF TARRANT COUNTY S VOTING SYSTEM

Google App Engine 8/10/17. CS Cloud Compu5ng Systems--Summer II 2017

Electronic Voting For Ghana, the Way Forward. (A Case Study in Ghana)

DATA PROCESSING AGREEMENT. (1) You or your organization or entity as The Data Controller ( The Client or The Data Controller ); and

CUG Members' Handbook

IF YOU DO NOT AGREE TO THESE TERMS, DO NOT DOWNLOAD, INSTALL OR USE BSC.

Philips Lifeline. Ø Chenyang Lu 1

Citizen engagement and compliance with the legal, technical and operational measures in ivoting

Installation Guide: cpanel Plugin

Contributary Platform User Terms of Service

Why Biometrics? Why Biometrics? Biometric Technologies: Security and Privacy 2/25/2014. Dr. Rigoberto Chinchilla School of Technology

CSE 308, Section 2. Semester Project Discussion. Session Objectives

PRACTICE DIRECTION [ ] DISCLOSURE PILOT FOR THE BUSINESS AND PROPERTY COURTS

Union Elections. Online Voting. for Credit. Helping increase voter turnout & provide accessible, efficient and secure election processes.

IC Chapter 15. Ballot Card and Electronic Voting Systems; Additional Standards and Procedures for Approving System Changes

Public Libraries and Access to Justice: #2. The Role of Public Libraries

THE PROPOSAL OF GIVING TWO RECEIPTS FOR VOTERS TO INCREASE THE SECURITY OF ELECTRONIC VOTING

Best Practices for Preservation of ESI John Rosenthal

Local differential privacy

One View Watchlists Implementation Guide Release 9.2

THE PRIMITIVES OF LEGAL PROTECTION AGAINST DATA TOTALITARIANISMS

CASE TRANSLATION: GREECE

UTAH LEGISLATIVE BILL WATCH

Netizen Participation in Internet Governance

Economic and Social Council

Hoboken Public Schools. PLTW Introduction to Computer Science Curriculum

Assumption of TOBT Responsibility and Usage Agreement HAM CSA

Bylaws of Information Technology Sector Coordinating Council

ETSI TS V1.4.1 ( )

30 Transformational Design with Essential Aspect Decomposition: Model-Driven Architecture (MDA)

Aspect Decomposition: Model-Driven Architecture (MDA) 30 Transformational Design with Essential. References. Ø Optional: Ø Obligatory:

RULES OF EVIDENCE LEGAL STANDARDS

Transcription:

CS 5523 Operating Systems: Intro to Distributed Systems Instructor: Dr. Tongping Liu Thank Dr. Dakai Zhu, Dr. Palden Lama for providing their slides. Outline Different Distributed Systems Ø Distributed computing systems Ø Distributed information systems Ø Distributed pervasive systems OS in distributed systems Ø Distributed OS vs. Network OS vs. Middleware Design objectives of distributed systems Ø Transparency, openness and scalability Architecture of distributed systems Ø Software vs. system architectures 2 Computer System Revolution Computers" " "large/expensive à small/cheap" Networks: " "LAN à WAN " " "bps à Kbps à Gbps" Now, it is easy to put together many computers. Why? " Ø Solve problems" Ø Share resources" Ø Increase collaboration" Centralized systems à Distributed systems! What are Distributed Systems? ISP intranet desktop computer: server: network link: satellite link backbone A collection of networked independent computers that appears to its users as a single coherent system 4 1

Different Types of Distributed Systems Distributed Computing Systems: Ø Cluster computing: similar components Ø Grid computing / Cloud computing: different components Distributed Information Systems Ø Web servers Ø Distributed database applications Distributed Pervasive Systems: instable Ø Smart home systems Ø Electronic health systems: monitor Ø Sensor networks: surveillance systems Cluster Computing Systems (Supercomputer) High-performance computing Ø a group of high-end systems connected through a LAN Ø Homogeneous: same OS, near-identical hardware Ø Single managing node 5 6 Grid Computing Systems Lots of nodes from everywhere share resources and collaborate" Ø Heterogeneous! Ø Dispersed across several organizations" Ø Can easily span a wide-area network" To allow for collaborations, grids generally use virtual organizations. " Ø Same organization: a grouping of users (or better: their IDs) have the same access rights" Ø The key questions are " ü Authorize users from different administrative domains" ü Provide authorized users with the access to specific resources " Grid Computing Systems (cont.) Application: " Ø Use the grid computing environment" Collective layer: " Ø Handles access to multiple resources (resource discovery, allocation and scheduling, data replication)" Connectivity layer: " Ø Communication protocols " (transfer data across resources, access a remote resource, security) "" Resource layer: " Ø Manage a single resource " (create a process, access control)" Fabric layer: " Ø Interface to local resources (query, locking)" 7 8 2

Cloud Computing Systems Cloud computing has become another buzzword after Web 2.0. " We won t compute on local computers, but on centralized facilities operated by third-party compute and storage utilities "" There are dozens of different definitions for cloud computing and there seems to be no consensus on what a cloud is. Here is one definition:!! A large-scale distributed computing paradigm that is driven by economies of scale, in which a pool of abstracted, virtualized, dynamically-scalable, managed computing power, storage, platforms, and services are delivered on demand to external customers over the Internet. " Cloud computing is not a completely new concept; it has intricate connection to the relatively new but thirteen-year established grid computing paradigm, and other relevant technologies such as utility computing, cluster computing, and distributed systems in general. " DIS: Distributed Information Systems Organizations have legacy networked applications, but it is hard to make them interoperate " Middleware can help " Integration can take place at several levels" Ø Client-servers wrap a number of requests into one and have it executed as a Distributed Transaction (all or none of requests would be executed)" Ø Applications can be detached from their databases and may need to directly communicate with each other" I. Foster, Cloud Computing and Grid Computing 360-Degree Compared, Grid Computing Environments Workshop, 2008. GCE '08 9 DIS: Transaction Processing Systems Database applications, transactions properties (ACID) " Atomic: A transaction happens indivisibly; " Ø All operations either succeed, or all of them fail; " Consistent: Don t violate system invariants " Ø Internal transfer: total money should be the same" Ø Intermediate states may violate if not visible outside" Isolated (serializable): Concurrent transactions do not interfere with each other" Durable: Once a transaction commits, the changes are permanent " DIS: Distributed Database Transactions n Transaction Processing Monitor: coordinate the execution of a transaction (subtransactions) when data is distributed across servers middleware 3

DIS: Enterprise Information Systems Inter-application Communication" Ø RPC (Remote Procedure Calls) or" RMI (Remote Method Invocations)" ü both applications must be up and running" ü know exactly how to refer to each other" Ø Message-Oriented Middleware (MOM)" ü send data to a logical contact" ü publish/subscribe" Stability: nodes are fixed and have high-quality connection to the system 13 DPS: Distributed Pervasive Systems DCS and DIS: stable distributed systems (fixed nodes good connections)" Unstable with mobile and embedded devices " Distributed Pervasive Systems:" Ø Computing anywhere and anytime! Ø Contextual change: environment changes should be immediately react." Ø Ad hoc composition: Each node may be used in a very different ways by different users. Requires ease-of-configuration." Ø Sharing is the default: Nodes come and go, providing sharable services and information. Calls again for simplicity." Expose distribution instead of hiding it! 14 DPS: Electronic Health Care Systems DPS: Sensor Networks Devices are physically close to a person Ø Where and how should monitored data be stored? Ø How can we prevent loss of crucial data? Ø How can security be enforced? Ø How can physicians provide online feedback? The nodes to which sensors are attached are: n Many (10s-1000s) n Simple (small memory/compute/communication capacity) 15 16 n Often battery-powered (or even battery-less) 4

Distributed Systems: Definition A distributed system (DS) is a piece of software that ensures that " a collection of independent computers, communicate through network by passing messages! And appears to its users as a single coherent system" " " But HOW can we" Ø hide the differences between independent computers &" Ø provide a single system view?" " OS Structures in Distributed Systems Distributed Operating Systems: OS essentially tries to maintain a single, global view of the resources it manages (Tightly-coupled OS). Network Operating Systems: Collection of independent OSes augmented by network services (Loosely-coupled OS) Middleware: Provide a level of transparency between applications and local OSes 18 Distributed Operating Systems Full transparency: users feel a big system and are not aware of multiple different machines Access to remote services similar to local resources Distributed Operating Systems (Cont.) Each node has its own kernel for managing local resources (memory, local CPU, disk, ) Common software layer implements OS and supports parallel and concurrent execution of various tasks. Possible complete software implementation of shared memory (distributed shared memory) Additional facilities: task assignments, handle hardware failures, transparent storage, inter-process communication, data/computation/ process migration. 19 20 5

Network Operating Systems (NOS) NO single view of the distributed system Users are aware of the multiplicity of the machines Applications use NOS services to access resources Network Operating Systems (Cont.) NOS provide facilities to allow users to make use of services in other machines Ø Remote login (telnet, rlogin) Ø File transfer (ftp) The only communication is message passing Users need to explicitly log into remote machines, or copy files from one machine to another. Need multiple passwords, multiple access permissions. In contrast, adding or removing a machine is relatively simple. 21 22 Middleware-Based Systems Middleware: a higher level of abstraction on top of network operating systems for efficient transparency Middleware-Based Systems (cont.) Each local system is a part of underlying NOS Target of middleware : Ø Resolve the integration problems of various networked applications Examples: Remote Procedure Calls (RPC), Remote Method Invocations (RMI), Distributed File Systems, Distributed Object Systems 23 24 6

Design Objectives of Distributed Systems Goal of distributed systems Ø Make resources (hardware/software) available Ø Make it easy for users to access remote resources Ø Share resources in a controlled and efficient way Distribution transparency: hiding distribution Openness Scalability Distribution Transparency Access Location Migration Relocation Replication Hides differences in data representation and invocation mechanisms Hides where a resource resides Hides that a resource may move Hides that a resource may be moved while in use Hides that a resource is replicated Concurrency Hides that other users may access the same resource Failure Hides failure and possible recovery of resources 25 26 Degree of Transparency Openness of Distributed Systems Full transparency will can be costly Expose distribution of the system Ø Mobile phone is moving around. We may need location and text awareness Completely hiding failures of networks and nodes is (theoretically and practically) impossible Ø You cannot distinguish a slow computer from a failing one Ø You can never be sure that a server actually performed an operation before a crash Users may be located in different continents à distribution is apparent and not something you want to hide Observation: Aiming at full distribution transparency may be too much Offer services according to standard rules that describe the syntax and semantics of those services" How to achieve openness" Ø Well-defined interfaces (often described using IDL)" ü Easy to define syntax. But semantics are hard thus it is defined in a natural language" Ø portability!! ü The same implementation should work on different machines" Ø Easily interoperate! ü Two different implementations should work together" Distributed system should be independent from heterogeneity of the underlying environment Hardware, Software Platforms, and Languages " 27 28 7

Scalability in Distributed Systems Three aspects of scalability Ø size: number of users and/or processes Ø geographical: Maximum distance between nodes Ø administrative : Number of administrative domains Most systems account only, to a certain extent, for size scalability: powerful servers (supercomputer) Challenge nowadays: geographical and administrative scalability Problems with Size Scalability n What happens when more users/resources added? n Limitations of centralized systems l Service (e.g., single server) overloaded servers l Data (e.g., single phone book) saturated communication links l Algorithm (e.g., routing based on global info) too much traffic n Use distributed service, database, and algorithm l No machine has complete info l Make decision based on local info l Failure of one node does affect others l No global clock 29 Problems with Geographical Scalability Suppose we have an interactive application working on a LAN, can we use it over a WAN?" Delay " Ø Blocking read/write might be OK on LAN but not on WAN" Reliability" Ø Longer the distance, higher the chance of loosing messages" Bandwidth " n Locating a service by broadcasting is OK on LAN (e.g., ARP) but not on WAN " Problems with Administrative Scalability n In a single domain: l We can try to optimize resource usage because each entity belongs to the same domain and can be trusted n In case of multiple and independent administrative domains: l We do not own all resources and cannot trust others l Several problems! Conflicting policies (who uses what and pays how much)! Management! Security (access rights and trust management) 8

Techniques for Scalability Hiding communication latency: (Geographical)" Ø Use asynchronous communication: " ü +: separate handler for incoming response and do something while waiting." ü - what if there is nothing else to do " Distribution: splitting it to small parts" Ø Domain naming systems (DNS)" Ø Decentralized data, information systems (WWW)" Ø Decentralized algorithm (Distance Vector)" Replicate: " Ø Increase availability " Ø Load balance" Techniques for Scalability (cont d) Use Replication/caching that makes multiple copies of the same services or data available at different machines" Ø Mirrored Web sites" Ø Replicated file servers and databases" Ø Web caches (in browsers and proxies)" Ø File caching (at server and client)" Ø + increase availability" Ø + improve load balance and performance" Ø + hide communication latency" " Ø - Inconsistencies when one copy is modified " Ø - Global synchronization is need for keeping copies consistent but it precludes large-scale solutions" Ø - Tolerance to inconsistencies depends on application" Techniques for Scalability (cont d) All the techniques discussed so far deal with performance problems due to size and geographical scalability " How about administrative scalability?" Ø The most challenging one (why?)" Ø The problems are often non-technical (Politics!)" Developing Distributed Systems: Pitfalls Mistakes are often due to false assumptions:" Ø The same global time! Ø Perfect network/communication" ü Latency is zero"" ü Bandwidth is infinite" ü The network is reliable" ü The network is secure" ü The network is homogeneous" Ø The topology does not change" Ø There is one administrator! 9

Outline Software Architectures for DS Different Distributed Systems Ø Distributed computing systems Ø Distributed information systems Ø Distributed pervasive systems OS in distributed systems Ø Distributed OS vs. Network OS vs. Middleware Design objectives of distributed systems Ø Transparency, openness and scalability Architecture of distributed systems Ø Software vs. system architectures Logical organization of different components; Ø How to divide to different components Ø How to connect and communicate with each other Ø How to figure different elements into a system division of responsibilities of components; distribute them over multiple machines, and allow them to communicate through connectors Ø Component: a modular unit with well-defined required and provided interfaces," Ø Connector: a mechanism that mediates communication, coordination, and cooperation (e.g., RPC, msg passing) 37 38 Software Architecture Style Layered style " Ø A component at higher layers can call components at a lower layer" Ø Widely adopted by the networking community" Ø Control goes down whereas the results flow upward" Object-based " Ø Components are connected through a procedure call" Ø Used for client-server systems" Two most important styles! Software Architecture Style Event-based(Publish/subscribe) " Ø Communicate through propagation of events" Ø Loosely coupled components" ü decoupled in space or referentially decoupled" processes do not refer to each other Data-centered: " Ø Communicate through a common repository (e.g., shared distributed file system) " Ø Can combine with event-based, yielding shared data spaces " ü processes are now decoupled in space and time" processes do not need to be active at the same time 10

System Architectures for DS Consider how and where to place software components and realize their interactions! About physical realization, placement of software components & interactions Ø Centralized: client-server Ø Decentralized: P2P (Structured vs. unstructured) Ø Hybrid: Combination of centralized and P2P Basic Client-Server Model Clients & servers may across different machines Clients follow request/reply model to use services +: efficient -: reliability. Can t detect whether a request is lost or a reply fail. Connection-oriented protocol: TCP/IP 41 42 Application Layering (logical) How to draw a clear line between client end server?! User-interface layer" Traditional Two-Tiered Configurations How to place the three layers on client and server?! Processing layer: " Ø functions of an application, i.e. without specific data" Data layer: " Ø data that a client wants to manipulate" Observation: layering is found in many distributed information systems, using traditional database technology and accompanying applications. " "Thin client CS5523: " Operating System " @ UTSA "Fat client" 44 11

Multitiered Architectures The server part could be distributed over multiple machines," Three-tiered: each layer on a separate machine" Vertical Distribution Servers and States: Stateful Servers Vertical Distribution: Ø Functions are logically and physically split across multiple machines. Ø Processes are not equal and Interactions are asymmetric: One acts as client while the other acts as server" Keeps track of the status of its clients Ø Record that a file has been opened, so that pre-fetching can be done Ø Knows which data a client has cached, and allows clients to keep local copies of shared data 45 46 Decentralized Architectures: P2P Systems Decentralized Architectures: An Example P2P architectures are horizontal distribution:" Ø split up clients and servers into logically equivalent parts and let each part operate on its own share of data" Processes are equal and Interactions are symmetric" Ø Each acts as both client and server" Tremendous growth in the last couple of years" Star War Sharable! objects! Peer 1! Application! Peer 2! Application! Peer 3! Application! The Beatles Peer 4! An Example: BitTorrent Peers 5... N! Application! Roman Holiday 48 12

Decentralized Architectures: P2P Systems Key question:" Ø How to organize processes in an overlay network, where links are usually TCP channels" Three approaches to organize nodes into overlay networks through which data is routed" Ø Structured P2P: nodes are organized following a specific distributed data structure and deterministic algorithms" Ø Unstructured P2P: randomly selected neighbors" Ø Hybrid P2P: some nodes are appointed special functions in a well-organized fashion" Structured P2P Systems Distributed Hash Table (DHT) is the most used one" Ø Assume we have a large ID space Ω (e.g., 128-bit)" Ø Assign random keys to data items (from Ω)" Ø Assign random number to nodes (from Ω)" Ø The key of DHT: implement an efficient and deterministic scheme that maps the key of a data item to node ID" Ø When looking up a data item, the system should route the request to the associated node and return the network address of that node" Example: Chord" 49 A DHT Example: Chord Data item with key k is mapped to a node with the smallest ID >= k." This node is called as the successor of key k and denoted by succ(k)! Unstructured P2P Architectures Basic principle: Each node maintains a random list of neighbors: Ø Each peer maintain a partial view of the network, consisting of c other nodes Ø Each node P periodically selects a node Q from its partial view: P and Q exchange information and exchange members from their respective partial views Ø Robustness of the network can be maintained depending on the random exchange LOOKUP(key=8)? This should return succ(8), which is node 12 51 52 13

Superpeers Collaborative Hybrid Structures: BitTorrent Combining a P2P with a client-server architecture Basic idea: a node identifies where to download a file from and joins a swarm of downloaders; who get file chunks in parallel from the source, and distribute these chunks among each other Peers maintain an index (for search) Peers monitor the state of the network Peers setup connections Tit-for-tat: A client can download only if he provides contents for others 53 54 Summary Distributed Systems Ø Distributed computing systems Ø Distributed information systems Ø Distributed pervasive systems OS in distributed systems Ø Distributed OS vs. Network OS vs. Middleware Design objectives of distributed systems Ø Transparency, openness and scalability Architecture of distributed systems Ø Software vs. system architectures 55 14