PROCESSES AND THREADS

Similar documents
Interactions A link message

UNIT 5 : Advanced Behavioral Modeling

Software Engineering. Page 1. Objectives. Object-Behavioural Modelling. Analysis = Process + Models. Case Study: Event Identification

Lecture 17: (Architecture V)

UNIT-IV BASIC BEHAVIORAL MODELING-I

Part I Introduction Hardware and OS Review

Ch 1: The Architecture Business Cycle

Scaling Optimistic Concurrency Control by Approximately Partitioning the Certifier and Log

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University

What is a Class Diagram? A diagram that shows a set of classes, interfaces, and collaborations and their relationships

What is a Class Diagram? Class Diagram. Why do we need Class Diagram? Class - Notation. Class - Semantic 04/11/51

Visualizing the Synchronization of Java-Threads with UML

Process Characteristics

UNIT-4 Behavioral Diagrams

Administrative Stuff. We are now in week 11 No class on Thursday About one month to go. Spend your time wisely Make any major decisions w/ Client

Execution Architecture

Chapter 1: Distributed Information Systems

Chapter 4: Threads. Chapter 4: Threads

In this Lecture you will Learn: System Design. System Architecture. System Architecture

Module 4: Processes. Process Concept Process Scheduling Operation on Processes Cooperating Processes Interprocess Communication

Module 4: Processes. Process Concept Process Scheduling Operation on Processes Cooperating Processes Interprocess Communication

Curriculum 2013 Knowledge Units Pertaining to PDC

A Conceptual Model of the UML

System Name Software Architecture Description

SWE 760 Lecture 1: Introduction to Analysis & Design of Real-Time Embedded Systems

user.book Page 45 Friday, April 8, :05 AM Part 2 BASIC STRUCTURAL MODELING

Interaction Modelling: Sequence Diagrams

It also performs many parallelization operations like, data loading and query processing.

Distributed Algorithms. Partha Sarathi Mandal Department of Mathematics IIT Guwahati

Gustavo Alonso, ETH Zürich. Web services: Concepts, Architectures and Applications - Chapter 1 2

Thirty one Problems in the Semantics of UML 1.3 Dynamics

02 - Distributed Systems

Release Consistency. Draft material for 3rd edition of Distributed Systems Concepts and Design

02 - Distributed Systems

UNIT 5 - UML STATE DIAGRAMS AND MODELING

ASSIGNMENT- I Topic: Functional Modeling, System Design, Object Design. Submitted by, Roll Numbers:-49-70

Architectural Styles - Finale

Chapter 4: Threads. Operating System Concepts. Silberschatz, Galvin and Gagne

آنستیتیوت تکنالوجی معلوماتی و مخابراتی ICTI

CS307: Operating Systems

Multiprocessor and Real- Time Scheduling. Chapter 10

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

Chapter 4: Multithreaded

Multiprocessor scheduling

Distributed Systems LEEC (2006/07 2º Sem.)

Unified Modeling Language


ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective

Chapter 4: Processes. Process Concept

UML Unified Modeling Language

Chapter 4: Processes

Concurrency. Lecture 14: Concurrency & exceptions. Why concurrent subprograms? Processes and threads. Design Issues for Concurrency.

Chapter 3: Process Concept

Chapter 3: Process Concept

main read Identical static threads Dynamic threads with Concurrent and

Distributed Systems Question Bank UNIT 1 Chapter 1 1. Define distributed systems. What are the significant issues of the distributed systems?

CS342: Software Design. November 21, 2017

LINDA. The eval operation resembles out, except that it creates an active tuple. For example, if fcn is a function, then

6/20/2018 CS5386 SOFTWARE DESIGN & ARCHITECTURE LECTURE 5: ARCHITECTURAL VIEWS C&C STYLES. Outline for Today. Architecture views C&C Views

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde en Informatica

Exercise (could be a quiz) Solution. Concurrent Programming. Roadmap. Tevfik Koşar. CSE 421/521 - Operating Systems Fall Lecture - IV Threads

Chapter 3: Process Concept

Cloud Computing CS

Chapter 4: Threads. Overview Multithreading Models Thread Libraries Threading Issues Operating System Examples Windows XP Threads Linux Threads

Cover Page. The handle holds various files of this Leiden University dissertation

Concurrent ML. John Reppy January 21, University of Chicago

Distributed Systems Inter-Process Communication (IPC) in distributed systems

CS510 Advanced Topics in Concurrency. Jonathan Walpole

Chapter 8 : Multiprocessors

Processor speed. Concurrency Structure and Interpretation of Computer Programs. Multiple processors. Processor speed. Mike Phillips <mpp>

Frequently asked questions from the previous class survey

Today s class. Scheduling. Informationsteknologi. Tuesday, October 9, 2007 Computer Systems/Operating Systems - Class 14 1

Introduction to parallel computing

Solved MCQs on Operating System Principles. Set-1

Parallel And Distributed Compilers

Chapter 13. Concurrency ISBN

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University

Multiprocessor and Real-Time Scheduling. Chapter 10

Chapter 6: Process Synchronization

The Problem with Threads

Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions

A UML 2 Profile for Variability Models and their Dependency to Business Processes

2. The system of... generally ran one job at a time. These were called single stream batch processing.

UML Component Diagrams A.Y 2018/2019

CSE 153 Design of Operating Systems Fall 2018

CONTENTS. Computer-System Structures

CSE 486/586 Distributed Systems

Elevator Control System

18-447: Computer Architecture Lecture 30B: Multiprocessors. Prof. Onur Mutlu Carnegie Mellon University Spring 2013, 4/22/2013

How to Make a Correct Multiprocess Program Execute Correctly on a Multiprocessor

FIT: A Distributed Database Performance Tradeoff. Faleiro and Abadi CS590-BDS Thamir Qadah

Chapter 13 Topics. Introduction. Introduction

TDP3471 Distributed and Parallel Computing

SWE 621: Software Modeling and Architectural Design. Lecture Notes on Software Design. Lecture 8 Architectural Design of Distributed Applications

Collaboration Support in Open Hypermedia Environments

STATE MACHINES. Figure 1: State Machines

Java Threads. COMP 585 Noteset #2 1

CHAPTER 7 CONCLUSION AND FUTURE SCOPE

Chapter Outline. Chapter 2 Distributed Information Systems Architecture. Distributed transactions (quick refresh) Layers of an information system

INTERCONNECTION NETWORKS LECTURE 4

Transcription:

PROCESSES AND THREADS A process is a heavyweight flow that can execute concurrently with other processes. A thread is a lightweight flow that can execute concurrently with other threads within the same process. An active object is an object that owns a process or thread and can initiate control activity. An active class is a class whose instances are active objects. Graphically, an active class is rendered as a rectangle with thick lines. Processes and threads are rendered as stereotyped active classes. Figure 1:Active class Figure 1: Active Class Flow of Control In a sequential system, there is a single flow of control. i.e, one thing, and one thing only, can take place at a time. In a concurrent system, there is multiple simultaneous flow of control i.e, more than one thing can take place at a time. Classes and Events Active classes are just classes which represents an independent flow of control Active classes share the same properties as all other classes. When an active object is created, the associated flow of control is started; when the active object is destroyed, the associated flow of control is terminated

two standard stereotypes that apply to active classes are, <<process>> Specifies a heavyweight flow that can execute concurrently with other processes. (heavyweight means, a thing known to the OS itself and runs in an independent address space) <<thread>> Specifies a lightweight flow that can execute concurrently with other threads within the same process (lightweight means, known to the OS itself.) All the threads that live in the context of a process are peers of one another Communication In a system with both active and passive objects, there are four possible combinations of interaction First, a message may be passed from one passive object to another Second, a message may be passed from one active object to another In inter-process communication there are two possible styles of communication. First, one active object might synchronously call an operation of another. Second, one active object might asynchronously send a signal or call an operation of another object a synchronous message is rendered as a full arrow and an asynchronous message is rendered as a half arrow Figure 2: shows Communication Third, a message may be passed from an active object to a passive object Fourth, a message may be passed from a passive object to an active one Figure 2: Communication

Synchronization synchronization means arranging the flow of controls of objects so that mutual exclusion will be guaranteed. in object-oriented systems these objects are treated as a critical region Figure 3 Synchronization three approaches are there to handle synchronization: Sequential Callers must coordinate outside the object so that only one flow is in the object at a time Guarded multiple flow of control is sequentialized with the help of object s guarded operations. in effect it becomes sequential. Concurrent multiple flow of control is guaranteed by treating each operation as atomic synchronization are rendered in the operations of active classes with the help of constraints Figure 3: Synchronization Process Views The process view of a system encompasses the threads and processes that form the system s concurrency and synchronization mechanisms. This view primarily addresses the performance, scalability, and throughput of the system. Modeling Multiple Flows of Control To model multiple flows of control,

Identify the opportunities for concurrent action and reify each flow as an active class. Generalize common sets of active objects into an active class. Be careful not to overengineer the process view of your system by introducing too much concurrency. Consider a balanced distribution of responsibilities among these active classes, then examine the other active and passive classes with which each collaborates statically. Ensure that each active class is both tightly cohesive and loosely coupled relative to these neighboring classes and that each has the right set of attributes, operations, and signals. Capture these static decisions in class diagrams, explicitly highlighting each active class. Consider how each group of classes collaborates with one another dynamically. Capture those decisions in interaction diagrams. Explicitly show active objects as the root of such flows. Identify each related sequence by identifying it with the name of the active object. Pay close attention to communication among active objects. Apply synchronous and asynchronous messaging, as appropriate. Pay close attention to synchronization among these active objects and the passive objects with which they collaborate. Apply sequential, guarded, or concurrent operation semantics, as appropriate. Figure 4 shows part of the process view of a trading system. Figure 4: Modeling Flows of Control

Modeling Interprocess Communication To model interprocess communication, Model the multiple flows of control. Consider which of these active objects represent processes and which represent threads. Distinguish them using the appropriate stereotype. Model messaging using asynchronous communication; model remote procedure calls using synchronous communication. Informally specify the underlying mechanism for communication by using notes, or more formally by using collaborations. Figure 5 shows a distributed reservation system with processes spread across four nodes. Figure 5: Modeling Interprocess Communication