Chapter 11 Distributed Processing Co-routines Each co-routine has own stack for activation records Keeps track of point to RESUME Symmetric (peer) relationship.

Slides:



Advertisements
Similar presentations
CHAPTER3 Higher-Level Synchronization and Communication
Advertisements

Synchronization and Deadlocks
CAS3SH3 Midterm Review. The midterm 50 min, Friday, Feb 27 th Materials through CPU scheduling closed book, closed note Types of questions: True & False,
Ch 7 B.
Concurrency Important and difficult (Ada slides copied from Ed Schonberg)
Previously… Processes –Process States –Context Switching –Process Queues Threads –Thread Mappings Scheduling –FCFS –SJF –Priority scheduling –Round Robin.
Chapter 6 Process Synchronization Bernard Chen Spring 2007.
Chapter 6: Process Synchronization
Process Synchronization. Module 6: Process Synchronization Background The Critical-Section Problem Peterson’s Solution Synchronization Hardware Semaphores.
CH7 discussion-review Mahmoud Alhabbash. Q1 What is a Race Condition? How could we prevent that? – Race condition is the situation where several processes.
Operating Systems Operating Systems - Winter 2009 Chapter 2 - Processes Vrije Universiteit Amsterdam.
Go Language * Go - Routines * Channels. New Concepts Do not communicate by sharing memory; instead, share memory by communicating. creating shared memory.
Intertask Communication and Synchronization In this context, the terms “task” and “process” are used interchangeably.
1 Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Computer Systems/Operating Systems - Class 8
1 Concurrency: Mutual Exclusion and Synchronization Chapter 5.
PZ11B Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ11B - Parallel execution Programming Language Design.
1 Synchronization Coordinating the Activity of Mostly Independent Entities.
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
6/16/2015 Chapter Eight Process Synchronisation. Index Objectives Concurrent processes and Asynchronous concurrent processes Process synchronisation Mutual.
Chapter 11: Distributed Processing Parallel programming Principles of parallel programming languages Concurrent execution –Programming constructs –Guarded.
ISBN Chapter 13 Concurrency. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.13-2 Figure 13.1 The need for competition synchronization.
1 Organization of Programming Languages-Cheng (Fall 2004) Concurrency u A PROCESS or THREAD:is a potentially-active execution context. Classic von Neumann.
Concurrency - 1 Tasking Concurrent Programming Declaration, creation, activation, termination Synchronization and communication Time and delays conditional.
University of Pennsylvania 9/28/00CSE 3801 Concurrent Programming (Critical Regions, Monitors, and Threads) CSE 380 Lecture Note 6 Insup Lee.
Comparative Programming Languages hussein suleman uct csc304s 2003.
1 Chapter 13 © 2002 by Addison Wesley Longman, Inc Introduction - Concurrency can occur at four levels: 1. Machine instruction level 2. High-level.
CS5204 – Operating Systems 1 Communicating Sequential Processes (CSP)
Threads in Java. History  Process is a program in execution  Has stack/heap memory  Has a program counter  Multiuser operating systems since the sixties.
12/1/98 COP 4020 Programming Languages Parallel Programming in Ada and Java Gregory A. Riccardi Department of Computer Science Florida State University.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Concurrency Concurrency is the simultaneous execution of program code –instruction level – 2 or more machine instructions simultaneously –statement level.
TANNENBAUM SECTION 2.3 INTERPROCESS COMMUNICATION OPERATING SYSTEMS.
Chapter 1 Computer System Overview Sections 1.1 to 1.6 Instruction exe cution Interrupt Memory hierarchy Cache memory Locality: spatial and temporal Problem.
1 Copyright © 1998 by Addison Wesley Longman, Inc. Chapter 12 Concurrency can occur at four levels: 1. Machine instruction level 2. High-level language.
ISBN Chapter 13 Concurrency. Copyright © 2009 Addison-Wesley. All rights reserved.1-2 Chapter 13 Topics Introduction to Subprogram-Level.
1 Concurrency Architecture Types Tasks Synchronization –Semaphores –Monitors –Message Passing Concurrency in Ada Java Threads.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
1 Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
Parallel execution Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Using a simple Rendez-Vous mechanism in Java
ICS 313: Programming Language Theory Chapter 13: Concurrency.
PZ12B Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ12B - Synchronization and semaphores Programming Language.
Synchronization and semaphores Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-4 Process Communication Department of Computer Science and Software.
Java Thread and Memory Model
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
13-1 Chapter 13 Concurrency Topics Introduction Introduction to Subprogram-Level Concurrency Semaphores Monitors Message Passing Java Threads C# Threads.
Threads-Process Interaction. CONTENTS  Threads  Process interaction.
Lecture 4 Introduction to Promela. Promela and Spin Promela - process meta language G. Holzmann, Bell Labs (Lucent) C-like language + concurrency dyamic.
C H A P T E R E L E V E N Concurrent Programming Programming Languages – Principles and Paradigms by Allen Tucker, Robert Noonan.
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
1 Parallel execution Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
© 2004, D. J. Foreman 1 Monitors and Inter-Process Communication.
Chapter 13 Concurrency. Corrected and improved by Assoc. Prof. Zeki Bayram, EMU, North Cyprus. Original Copyright © 2012 Addison-Wesley. All rights reserved1-2.
“Language Mechanism for Synchronization”
CSE 466 – Fall Introduction - 1
Concurrency: Mutual Exclusion and Synchronization
Midterm review: closed book multiple choice chapters 1 to 9
COMS Prelim 1 Review Session
Parallel execution Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Background and Motivation
Subject : T0152 – Programming Language Concept
Chapter 3: Process Concept
Monitors and Inter-Process Communication
Parallel execution Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
What is the meaning of process synchronization
Synchronization and semaphores
Chien-Chung Shen CIS/UD
Presentation transcript:

Chapter 11 Distributed Processing Co-routines Each co-routine has own stack for activation records Keeps track of point to RESUME Symmetric (peer) relationship rather than master/slave of subroutines Each co-routines has own data

Concurrent Programming Hoare’s Communicating Concurrrent Programs Dijkstra’s guarded commands if B -> X | C -> Y | D -> Z fi do B=> X || C -> Y || D -> Z od Nondeterministic alternative

Ada tasking and the rendezvous Message passing model Issue of cooperation and mutual exclusion synchronization Task protects critical section Task waits for rendezvous select when buffer.count accept put (item: in data) do Buffer (I) := item; end; or when buffer.count > 0 => accept get (item: out data) do item := Buffer [I]; end; end select;

Monitors and protected types Overhead of tasking Context switching; memory overhead Monitors and protected types are protected subroutine calls; lower overhead for single thread of control Shared memory model

Linda and tuple-space Unreliability of programmer-controlled synchronization of data Shared data space (tuple space) is not owned by any program out (“hello world”, 3, 3.1) Places tuple in tuple space in (“hello world”, ?declared int, ?declared float) – removes matched tuple Eval (key, processB) new process begins execution QIX operating system