Processes. Processes and threads Process forms a building block in distributed systems Processes granularity is not sufficient for distributed systems.

Slides:



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

Processes: Code Migration Chapter 3 Will Cameron CSC 8530 Dr. Schragger.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Computer Systems/Operating Systems - Class 8
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.
Computer Science Lecture 6, page 1 CS677: Distributed OS Processes and Threads Processes and their scheduling Multiprocessor scheduling Threads Distributed.
1 DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN Chapter 3 Processes Skip
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
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.
3.5 Interprocess Communication Many operating systems provide mechanisms for interprocess communication (IPC) –Processes must communicate with one another.
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:
3.5 Interprocess Communication
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.
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.
Processes Chapter 3.
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.
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.
Processes Part I Processes & Threads* *Referred to slides by Dr. Sanjeev Setia at George Mason University Chapter 3.
Chapter 4 Threads, SMP, and Microkernels Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E.
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.
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
1 Distributed Systems Processes Chapter 3. 2 Course/Slides Credits Note: all course presentations are based on those developed by Andrew S. Tanenbaum.
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.
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
Univ. of TehranDistributed Operating Systems1 Advanced Operating Systems University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
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.
Processes Introduction to Operating Systems: Module 3.
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.
Processes Chapter 3. Processes Process: Program in execution. In DSs, more concepts come into consideration, eg. Multi-treading, process migration, code.
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
CS533 - Concepts of Operating Systems 1 The Mach System Presented by Catherine Vilhauer.
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,
Lecture 5: Threads process as a unit of scheduling and a unit of resource allocation processes vs. threads what to program with threads why use threads.
Processes Chapter 3. Processes Topics discussed in this chapter: –Threads improve performance. In distributed systems threads allow clients can servers.
Department of Computer Science and Software Engineering
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.
Operating Systems Unit 2: – Process Context switch Interrupt Interprocess communication – Thread Thread models Operating Systems.
Processes, Threads and Virtualization Chapter The role of processes in distributed systems.
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.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Processes Chapter 3.
Chapter 2 Processes and Threads Today 2.1 Processes 2.2 Threads
Processes Chapter 3.
Lecture 4- Threads, SMP, and Microkernels
Prof. Leonardo Mostarda University of Camerino
Processes Chapter 3.
Processes Chapter 3.
Presentation transcript:

Processes

Processes and threads Process forms a building block in distributed systems Processes granularity is not sufficient for distributed systems Multiple threads make easier to build distributed applications

Thread Usage in Nondistributed Systems large applications : many cooperating programs (processes) via InterProcess Communication mechanisms (Unix) IPC needs extensive context switching Changes to MMU, TLB … Instead of processes : threads

Thread Implementation user level : switching in a few instructions, no change in memory maps etc. but a blocking system call blocks the entire process O.S. kernel level : no problem with blocking system call but every thread operation has to be carried out by the kernel, so switching contest similar to process Combining kernel-level lightweight processes and user-level threads. Lightweight processes LWP Manipulation of threads at user level A blocking call doesn’t suspend the entire process Applications don’t need to know LWPs Different LWPs on different CPUs

Multithreaded Servers A multithreaded server (file server) organized in a dispatcher/worker model.

Multithreaded Servers Three ways to construct a server: The multi- and single-threaded model are “sequential” and synchronous The finite-state machine model is asynchronous and simulates the multi- threaded model ModelCharacteristics ThreadsParallelism, blocking system calls Single-threaded processNo parallelism, blocking system calls Finite-state machineParallelism, nonblocking system calls

Client-Side Software for Distribution Transparency Access, location, migration, replication, failure transparency: cooperation with client-side software A possible approach to transparent replication of a remote object using a client-side solution.

Servers: General Design Issues Iterative server – the server itself handles the request Concurrent server – the server passes the request to a separate thread or process Stateless server – no information on clients state (Web) Stateful server – maintains informations on clients state (file server) Where clients contact a server? Preassigned endpoint (port) No preassigned endpoint a special daemon running on the server

Servers: General Design Issues a)Client-to-server binding using a daemon as in DCE b)Client-to-server binding using a superserver as in UNIX (inetd) 3.7

Reasons for Migrating Code Improving performances ( optimizing CPU load, minimizing communications…) and flexibility The principle of dynamically configuring a client to communicate to a server. The client first fetches the necessary software, and then invokes the server (security!)

Models for Code Migration Alternatives for code migration. Code segment, program starts from initial state Code and execution segment Migrated prog. starts from where it letf off

Migration and Local Resources Actions to be taken with respect to the references to local resources when migrating code to another machine. 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: Move the resource GR: Establish a global reference CP: Copy the resource value RB: Rebind process to local resource

Migration in Heterogeneous Systems The principle of maintaining a migration stack to support migration of an execution segment in a heterogeneous environment 3-15

Software Agents in Distributed Systems autonomous units capable of performing tasks in collaboration with other agents Collaborative agent is part of a multiagent system Mobile agent can move between different machine Interface agent assists user to interact with an application Information agent manages informations from many different sources Property Common to all agents? Description AutonomousYesCan act on its own ReactiveYesResponds timely to changes in its environment ProactiveYesInitiates actions that affects its environment CommunicativeYes Can exchange information with users and other agents ContinuousNoHas a relatively long lifespan MobileNoCan migrate from one site to another AdaptiveNoCapable of learning

Agent Technology The general model of an agent platform (from Foundation for Intelligent Physical Agents (FIPA)). Creating, deleting, Looking up Naming service Other agents in platform Agent Communication channel

Agent Communication Languages ACL is an application level protocol providing an high level communication protocol between a collection of agents Examples of different message types in the FIPA ACL [fipa98-acl], giving the purpose of a message, along with the description of the actual message content. Message purposeDescriptionMessage Content INFORMInform that a given proposition is trueProposition QUERY-IFQuery whether a given proposition is trueProposition QUERY-REFQuery for a give objectExpression CFPAsk for a proposalProposal specifics PROPOSEProvide a proposalProposal ACCEPT-PROPOSALTell that a given proposal is acceptedProposal ID REJECT-PROPOSALTell that a given proposal is rejectedProposal ID REQUESTRequest that an action be performedAction specification SUBSCRIBESubscribe to an information source Reference to source

Agent Communication Languages (example) A simple example of a FIPA ACL message sent between two agents using Prolog to express genealogy information. FieldValue PurposeINFORM LanguageProlog Ontologygenealogy Contentfemale(beatrix),parent(beatrix,juliana,bernhard)