CS-495 Distributed Systems Fabián E. Bustamante, Winter 2004 Processes Threads & OS Threads in distributed systems Object servers Code migration Software.

Slides:



Advertisements
Similar presentations
Processes: Code Migration Chapter 3 Will Cameron CSC 8530 Dr. Schragger.
Advertisements

PlanetLab Operating System support* *a work in progress.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Lightweight Remote Procedure Call Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented by Alana Sweat.
Describe the concept of lightweight process (LWP) and the advantages to using LWPs Lightweight process (LWP) lies in a hybrid form of user-level & kernel-level.
Threads Clients Servers Code Migration Software Agents Summary
EECS122 - UCB 1 CS 194: Distributed Systems Processes, Threads, Code Migration Computer Science Division Department of Electrical Engineering and Computer.
Computer Science Lecture 8, page 1 CS677: Distributed OS Code and Process Migration Motivation How does migration occur? Resource migration Agent-based.
Processes Chapter 3. Thread Usage in Nondistributed Systems Context switching as the result of IPC –Process: a running program (mgmt. unit of OS) –Thread:
EEC-681/781 Distributed Computing Systems Lecture 3 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Processes After today’s lecture, you are asked to know The basic concept of thread and process. What are the advantages of using multi-threaded client.
Processes After today’s lecture, you are asked to know
EEC-681/781 Distributed Computing Systems Lecture 8 Wenbing Zhao Cleveland State University.
CS 603 Threads, Processes, and Agents March 18, 2002.
Foundations of Agents. Agent World Agent Definitions Agent’s Properties Classification of Agents Agent Autonomy Concurrent Programming.
Processes. Communication takes place between processes. But, what’s a process? “A program in execution” Traditional operating systems: concerned with.
Processes After today’s lecture, you are asked to know The basic concept of thread and process. What are the advantages of using multi-threaded client.
Processes After today’s lecture, you are asked to know The basic concept of thread and process. What are the advantages of using multi-threaded client.
A. Frank - P. Weisberg Operating Systems Introduction to Tasks/Threads.
Processes Chapter 3.
Threads CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Chapter 3  Processes 1 Processes Chapter 3 Chapter 3  Processes 2 Introduction  A process is a program in execution  For OS important issues are.
1 Processes and Distributed Computing Issues: moving processes around design of server and client processes migration of processes/programs agent programs.
Give an example to show the advantages to using multithreaded Clients See page 142 of the core book (Tanebaum 2002).
Lecture 8 Epidemic communication, Server implementation.
Processes.
Chapter 51 Threads Chapter 5. 2 Process Characteristics  Concept of Process has two facets.  A Process is: A Unit of resource ownership:  a virtual.
Advances in Language Design
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED.
Processes, Threads and Virtualization
1 Processes Chapter 3. 2 Processes  Communication takes place between processes. But, what ’ s a process?  “ A program in execution ”  Traditional.
Kyung Hee University 1/57 Communication Chapter 3.
Computer Science Lecture 8, page 1 CS677: Distributed OS Last Class Threads –User-level, kernel-level, LWPs Multiprocessor Scheduling –Cache affinity –Preemption.
Processes Chapter 3. Table of Contents Multithreading Clients and Servers Code Migration Software Agents (special topic)
Processes Chapter 3. Thread Usage in Nondistributed Systems Context switching as the result of IPC.
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Processes Chapter 3. Processes  OS provides concurrency transparency of multiple processes (sharing CPU, memory)  High price  Process creation  Context.
OPERATING SYSTEM SUPPORT DISTRIBUTED SYSTEMS CHAPTER 6 Lawrence Heyman July 8, 2002.
Processes. Processes and threads Process forms a building block in distributed systems Processes granularity is not sufficient for distributed systems.
Distributed Systems Principles and Paradigms Chapter 03 Processes 00 – 1.
Computer Science Lecture 7, page 1 CS677: Distributed OS Multiprocessor Scheduling Will consider only shared memory multiprocessor Salient features: –One.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
Processes Chapter 3. Processes Process: Program in execution. In DSs, more concepts come into consideration, eg. Multi-treading, process migration, code.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
1 Reasons for Migrating Code The principle of dynamically configuring a client to communicate to a server. The client first fetches the necessary software,
Processes Chapter 3. Processes Topics discussed in this chapter: –Threads improve performance. In distributed systems threads allow clients can servers.
© Chinese University, CSE Dept. Distributed Systems / Distributed Systems Topic 1: Characterization of Distributed & Mobile Systems Dr. Michael R.
1 Chapter 3 Processes Dowon Cho (RTMM Lab) & Jongwon Lee (SE Lab)
Acknowledgement: These slides are adapted from slides provided in Thißen & Spaniol's course Distributed Systems and Middleware, RWTH Aachen Processes Distributed.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
Concepts and Structures. Main difficulties with OS design synchronization ensure a program waiting for an I/O device receives the signal mutual exclusion.
Processes, Threads and Virtualization Chapter The role of processes in distributed systems.
Major OS Components CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Background Computer System Architectures Computer System Software.
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
Processes Chapter 3. Processes in Distributed Systems Processes and threads –Introduction to threads –Distinction between threads and processes Threads.
Processes Chapter 3. Processes  Process is a program in running state  PROCESSES ARE THE BUILDING BLOCKS OF DISTRIBUTED SYSTEMS, ESPECIALLY IN unix.
Introduction to Operating Systems Concepts
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Processes Chapter 3.
Chapter 15, Exploring the Digital Domain
Processes Chapter 3.
Chapter 2: Operating-System Structures
Prof. Leonardo Mostarda University of Camerino
Processes Chapter 3.
Processes Chapter 3.
Chapter 2: Operating-System Structures
CS Introduction to Operating Systems
Presentation transcript:

CS-495 Distributed Systems Fabián E. Bustamante, Winter 2004 Processes Threads & OS Threads in distributed systems Object servers Code migration Software agents

CS-495 Distributed Systems Threads Idea – we build virtual processors in software –Processor, processes and threads Context switch –Process and thread context –Observations Threads shared the same address space Process switching involves getting the OS in the loop - >$ Creating and destroying threads is cheaper than doing so with processes Threads and the OS –User or kernel threads? –Two level threading and scheduler activations

CS-495 Distributed Systems Threads in Distributed Systems Multithreaded clients – to hide network latency –Web client –RPCs Multithreaded servers – improve performance & structure –Starting a thread is cheaper than starting a process –A single-threaded server is a problem for scalability –Move on to next request instead of waiting –Using blocking calls simplifies overall structure –Simplified flow control (?)

CS-495 Distributed Systems Alternatives to Threaded Servers Alternatives Problems with threads? –Hard to program: synchronization & deadlocks –Hard to debug: data and timing dependencies –Hard to get good performance –Should you abandon threads? No – but avoid them if you can ModelCharacteristics ThreadsParallelism, blocking system calls Single-threaded processNo parallelism, blocking system calls Finite-state machineParallelism, nonblocking system calls

CS-495 Distributed Systems Servers – Design Issues General organization –Basic model & superservers (inetd) Out-of-band communication –Use a separate port –Use a special message State –Stateless – no memory/no problem –Stateful – faster + reliability headache Object servers –Objects – data/state + method –Transient and persistent objects, thread per object or per invocation … –Activation policies and object adapters

CS-495 Distributed Systems Code Migration Why? –Performance –Flexibility Models –Process segments: Code: set of instructions Resource: external resources needed (files, printers, …) Execution: current execution state –...

CS-495 Distributed Systems Models for Code Migration

CS-495 Distributed Systems Migration and Local Resources Problem: what if resources are not available at target? Type of resources: –Fixed: it cannot be migrated –Fastened: it can but it will cost you a lot –Unattached: easy to move UnattachedFastenedFixed By identifier By value By type MV (or GR) CP ( or MV, GR) RB (or GR, CP) GR (or MV) GR (or CP) RB (or GR, CP) GR RB (or GR) Resource-to machine binding Process-to- resource binding MV: just move it GR: Establish global systemwide refer CP: Copy the value of the resource RB: Re-bind to a locally available resource

CS-495 Distributed Systems Migration in Heterogeneous Systems Main problem: –Target machine may not be suitable to run it –The def. of process/thread/processor context is highly dependent on HW/OS/Runtime system One solution: use abstract machine Current solutions: –Interpreted languages running on virtual machine –State the migration points

CS-495 Distributed Systems Whats an Agent? Def.: Autonomous process that can react/initiate changes in its environment, possible in collaboration –Collaborative agents –Mobile agents –Interface agents –Information agents Property Common to all agents? Description AutonomousYesCan act on its own ReactiveYesResponds timely to changes in its environment ProactiveYesInitiates actions that affects its environment CommunicativeYesCan exchange information with users and other agents ContinuousNoHas a relatively long lifespan MobileNoCan migrate from one site to another AdaptiveNoCapable of learning

CS-495 Distributed Systems Agent Technology Management: Keeps track of where the agents on this platform are Directory: Mapping of agents names and attributes to agent IDs ACC: Agent Communication Channel – used to communicate with other platforms

CS-495 Distributed Systems Agent Communication Languages ACL is application-level protocol making distinction bet/ purpose and content of msg. Message purposeDescription INFORMInform that a given proposition is true QUERY-IF Query whether a given proposition is true QUERY-REFQuery for a give object CFPAsk for a proposal PROPOSEProvide a proposal ACCEPT-PROPOSALTell that a given proposal is accepted REJECT-PROPOSALTell that a given proposal is rejected REQUESTRequest that an action be performed SUBSCRIBESubscribe to an information source FieldValue PurposeINFORM LanguageProlog Ontologyweather Contentweather(today,60201,sunny)