CHAPTER 3: PROCESSES

CHAPTER OUTLINE

  • Processes and Threads
  • Client/Server/Object Threads
  • Code/Process Migration
  • Agent Technologies

Processes and Threads

Traditional Multiprogramming Systems

  • Process definition
  • Supporting Concurrency
  • State Diagram
  • State: CPU context (PC, stack registers), MMU, TLB, blocked on wait or receive

Need for User-Level Concurrency

  • Multithread clients: concurrent and asynchronous processing
  • Multithread servers: concurrent and asynchronous service
  • Multithread kernels: multiple CPU

Thread Implementation

Major issues: blocking and preemption

  • User-level implementation for portability
  • Kernel-level implementation for efficiency
  • Hybrid implementation using LWP

Client/Server/Object Threads

Client Threads

  • User interface – X Window system: X kernel, window manager (application), X protocol
  • Application – asynchronous operations
  • Distribution (access, location, replication, failure) transparency

Server Threads

  • Iterative/concurrent servers
  • Dispatcher/worker threads
  • Superservers
  • Stateful/stateless servers: client information, cookies, status

Object Servers

Object manager/ service server for configuring service

Activation Policies

  • Transient or persistent
  • Code/data sharing
  • thread per object/per invocation

Code/Process Migration

Bringing Data Closer to Code and Vice Versa

  • Remote access (data)
  • Remote service (code)
  • Remote execution (code)
  • Process migration (code and resource)

Benefits of Code/Process Migration

  • Load balancing
  • Reduce communication
  • Parallelism
  • Flexibility: dynamic configuration

Models for Code Migration

Client MachineServer MachineComment

C-code, C-datalocal execution

C-code, S-dataremote access (cache)

C-code, S-dataremote execution

C-code, C-dataservlet

S-code, S-dataremote service

S-code, C-dataremote service

S-code, S-dataapplet

S-code, C-datalibrary support

------

C-code, - - , S-datacase 2, no cache

S-code, - - , C-data ?

- , C-data S-code, - reversal of C/S

- , S-data C-code, - ?

Code/Resource/Execution Segments

Mobility

  • Weak: code
  • Strong: code, resource, execution

Process Migration: strong mobility

  • System-initiated for load sharing/balancing
  • User-initiated for software agents

Implementation Issues

  • Supporting platform: process server, virtual machine, interpreter
  • Cloning or migration
  • Resource redirection/binding (GR, MV, CP, RB), Figure 3-14
  • Channel forwarding
  • Location service
  • Sender/receiver initiated process migration

Agent Technologies

Distributed Agent-Based Systems (DAS)

  • Agent creation/deletion
  • Agent communication
  • Group management
  • Collaborative decision making

Mobile Agent Systems (MAS)

  • Architecture platform
  • Protection of hosts against hostile agents
  • Protection of agents against hostile hosts
  • Protection of agents against hostile agents

Multiple Mobile Agent Systems

Combining DAS and MAS