1 / 12

Exploring Threads and Processes in Distributed Systems: A Comprehensive Overview

This comprehensive overview delves into the intricate world of threads and processes in distributed systems, covering topics such as thread sharing, code migration, software agents, and design issues in servers. Understand the differences between threads and processes, their context switching, and implications for system performance. Learn about multithreaded clients and servers, alternatives to threaded servers, and the challenges and benefits of using threads in distributed systems. Explore code migration models and agent technology, including collaborative, mobile, and information agents. Gain insights into managing agents and agent communication channels, and delve into agent communication languages for effective platform communication. Discover the complexities and solutions related to code migration in heterogeneous systems. Dive into the nuances of processors, threads, and processors' contexts, and explore how to handle system resources and bindings during migration.

Download Presentation

Exploring Threads and Processes in Distributed Systems: A Comprehensive Overview

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Processes Threads & OS Threads in distributed systems Object servers Code migration Software agents

  2. 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

  3. 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 (?)

  4. 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

  5. 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

  6. Code Migration • Why? • Performance • Flexibility • Models • Process segments: • Code: set of instructions • Resource: external resources needed (files, printers, …) • Execution: current execution state • ...

  7. Models for Code Migration

  8. 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 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

  9. 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

  10. What’s an Agent? • Def.: Autonomous process that can react/initiate changes in its environment, possible in collaboration • Collaborative agents • Mobile agents • Interface agents • Information agents

  11. 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

  12. Agent Communication Languages • ACL is application-level protocol making distinction bet/ purpose and content of msg.

More Related