Real Time Systems Communication Services. Communication (part 1) - 2 Outline  Asynchronous Communication  Synchronous Communication  Uses of Synchronous.

Slides:



Advertisements
Similar presentations
INPUT-OUTPUT ORGANIZATION
Advertisements

Distributed Systems Major Design Issues Presented by: Christopher Hector CS8320 – Advanced Operating Systems Spring 2007 – Section 2.6 Presentation Dr.
Timed Distributed System Models  A. Mok 2014 CS 386C.
CS3771 Today: deadlock detection and election algorithms  Previous class Event ordering in distributed systems Various approaches for Mutual Exclusion.
1 Chapter 5 Concurrency: Mutual Exclusion and Synchronization Principals of Concurrency Mutual Exclusion: Hardware Support Semaphores Readers/Writers Problem.
Deadlocks, Message Passing Brief refresh from last week Tore Larsen Oct
Monitors & Blocking Synchronization 1. Producers & Consumers Problem Two threads that communicate through a shared FIFO queue. These two threads can’t.
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
Time Management in the High Level Architecture. Outline Overview of time management services Time constrained and time regulating federates Related object.
Computer Science Lecture 18, page 1 CS677: Distributed OS Last Class: Fault Tolerance Basic concepts and failure models Failure masking using redundancy.
Informationsteknologi Wednesday, September 26, 2007 Computer Systems/Operating Systems - Class 91 Today’s class Mutual exclusion and synchronization 
Transactional Memory Yujia Jin. Lock and Problems Lock is commonly used with shared data Priority Inversion –Lower priority process hold a lock needed.
Interprocess Communications
1 Concurrency: Mutual Exclusion and Synchronization Chapter 5.
CS 582 / CMPE 481 Distributed Systems
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Distributed Snapshots –Termination detection Election algorithms –Bully –Ring.
Group Communications Group communication: one source process sending a message to a group of processes: Destination is a group rather than a single process.
1 Semaphores Special variable called a semaphore is used for signaling If a process is waiting for a signal, it is suspended until that signal is sent.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
Concurrency: Mutual Exclusion, Synchronization, Deadlock, and Starvation in Representative Operating Systems.
USER LEVEL INTERPROCESS COMMUNICATION FOR SHARED MEMORY MULTIPROCESSORS Presented by Elakkiya Pandian CS 533 OPERATING SYSTEMS – SPRING 2011 Brian N. Bershad.
1 Concurrency: Deadlock and Starvation Chapter 6.
Asynchronous Message Passing EE 524/CS 561 Wanliang Ma 03/08/2000.
EEC-681/781 Distributed Computing Systems Lecture 11 Wenbing Zhao Cleveland State University.
User-Level Interprocess Communication for Shared Memory Multiprocessors Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented.
On the Duality of Operating System Structures Hugh C. Lauer Xerox Corporation Roger M. Needham Cambridge University Presented By: Ashwini Kulkarni.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms.
INPUT-OUTPUT ORGANIZATION
ICMP (Internet Control Message Protocol) Computer Networks By: Saeedeh Zahmatkesh spring.
SDS Foil no 1 How to make real systems: Implementation design, deployment and realisation.
Chapter 9 Message Passing Copyright © Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere2 Introduction.
מידול התנהגותי 1. Today’s Session Sequence Diagrams State Machines 2.
Java Threads 11 Threading and Concurrent Programming in Java Introduction and Definitions D.W. Denbo Introduction and Definitions D.W. Denbo.
Lab 2 Group Communication Farnaz Moradi Based on slides by Andreas Larsson 2012.
CE Operating Systems Lecture 11 Windows – Object manager and process management.
1 Concurrency Architecture Types Tasks Synchronization –Semaphores –Monitors –Message Passing Concurrency in Ada Java Threads.
Presenter: Long Ma Advisor: Dr. Zhang 4.5 DISTRIBUTED MUTUAL EXCLUSION.
Farnaz Moradi Based on slides by Andreas Larsson 2013.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 8 Fault.
Lecture 8 Page 1 CS 111 Online Other Important Synchronization Primitives Semaphores Mutexes Monitors.
Interprocess Communications
Real Time Systems Advanced State Machines. Behaviour (part 2) - 2 Outline  Simple and Composite States  Transition Segments and Junction Points  Run-to-Completion.
Operating System Chapter 6. Concurrency: Deadlock and Starvation Lynn Choi School of Electrical Engineering.
Winter 2007SEG2101 Chapter 111 Chapter 11 Implementation Design.
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy. Presented by: Tim Fleck.
Dynamic Models Sequence Diagrams Collaboration Diagrams Activity Diagrams.
Real Time Systems Event Deferral. Communication (part 2) - 2 Event Deferral – defined  real time systems are by default highly reactive  messages can.
Deadlock Operating Systems: Internals and Design Principles.
CS533 – Spring Jeanie M. Schwenk Experiences and Processes and Monitors with Mesa What is Mesa? “Mesa is a strongly typed, block structured programming.
Chapter 7 - Interprocess Communication Patterns
Unit 1 Lecture 4.
EIDE Architecture Overview WECC DEWG. Soap Methods  EIDE provides a “Put” method for data –Sender transfers schedule data, meter data, text message,
Page 1 Mutual Exclusion & Election Algorithms Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content.
ISA 95 Working Group (Business) Process Centric Exchanges Dennis Brandl A Modest Proposal July 22, 2015.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
CSC 8420 Advanced Operating Systems Georgia State University Yi Pan Transactions are communications with ACID property: Atomicity: all or nothing Consistency:
Parallel and Distributed Simulation Deadlock Detection & Recovery.
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
1 Threads in Java Jingdi Wang. 2 Introduction A thread is a single sequence of execution within a program Multithreading involves multiple threads of.
Distributed Computing, M. L. Liu 1 Interprocess Communications Mei-Ling L. Liu.
Lecture 11: Coordination and Agreement Central server for mutual exclusion Election – getting a number of processes to agree which is “in charge” CDK4:
Business Process Execution Language (BPEL) Pınar Tekin.
REAL-TIME OPERATING SYSTEMS
Advanced Topics in Concurrency and Reactive Programming: Asynchronous Programming Majeed Kassis.
Outline Other synchronization primitives
Other Important Synchronization Primitives
Lecture 10: Coordination and Agreement
Lecture 11: Coordination and Agreement
Last Class: Fault Tolerance
Presentation transcript:

Real Time Systems Communication Services

Communication (part 1) - 2 Outline  Asynchronous Communication  Synchronous Communication  Uses of Synchronous Communication  Common Problems  Receiving Messages  Timed Invokes  Coordinated Jammer Example  Event Deferral

Communication (part 1) - 3 Asynchronous Communications  the sending capsule will not “block” while the message is in transit  it will complete all of its transition chain code prior to the sent message(s) even having a chance to be processed  other messages, and other transition chains, may even be processed in the interim  mechanics:  myPort.mySignal( [data] ).send( [priority] );  see Services Library class OutSignal optional

Communication (part 1) - 4 Asynchronous Communications  recall run-to-completion semantics:  when fired, each transition chain will “naturally” run-to-completion.  any messages sent during any code of the transition chain will be queued by the message handling services of the RT Service Library  equal priority messages will be processed FIFO  other messages already in the queue (behind the one which started the original transition) will be processed before the new sent message(s).

Communication (part 1) - 5 Synchronous Communications  provides a means of circumventing normal run-to-completion semantics  the sending (invoking) capsule blocks until a reply is received (procedure call semantics)  the block is effective even against higher priority messages being received  nested synchronous communication is permitted, but not circular

Communication (part 1) - 6 Synchronous Communications - mechanics  OutSignal.invoke( )  //sender  Message[] replies = senderPort.senderSignal().invoke();  if (replies[0] != null)  { code to handle valid reply }  else  { code to handle invalid reply }  //receiver  receiverPort.receiverSignal( ).reply( );

Communication (part 1) - 7 Synchronous Communications – receiver decoupling  RoseRT’s event-driven behavior ensures that states are always in “receive-mode”  messages received are treated the same (on the receiving end) regardless of whether they were sent asynchronously or synchronously  de-couples receiver / sender implementation  however, for this assurance to be used, the receiver must send a reply in all cases

Communication (part 1) - 8 Synchronous Communications – t imed invokes  timeliness of send capsule (or its thread) may require that an invoke only block for a minimum period of time  receiver may be too slow in responding  communication delays may be too long  communications may be lost  therefore an invoke may require a time-out  optional  no implementation mechanism in RoseRT  only returns an exception if no reply is received

Communication (part 1) - 9 Synchronous Communication - why use it?  to control the sequencing of events (state changes)  example: our Receiver/Jammer coordination  to ensure synchronization  example: widget painting system  to ensure non-interference across logical threads or processes (mutual exclusion)  example: a shared database  does NOT work across physical threads

Communication (part 1) - 10 Synchronization Communication - pitfalls  can lead to deadlock (circular invokes)  timeliness on thread of sending capsule may be jeopardized  multi-processor communication problems  long delays  reliability (lossy communications)

Communication (part 1) - 11 Example – an EW Controller

Communication (part 1) - 12 Controller

Communication (part 1) - 13 Jammer rxJamPort.Jamming().send(); // some code to actually transmit // RF energy Asynchronous: rxJamPort.Jamming().invoke(); if (replies[0] != null) { // some code to actually // transmit RF energy } else { // abort jamming} Synchronous:

Communication (part 1) - 14 Receiver Asynchronous: {no code} rxJamPort.ack( ).reply( ); //note that arrowhead would be // blackened in this case. Synchronous:

Communication (part 1) - 15 Synchronous Communication - s upplemental issues  Invoke – Reply in the presence of timers  Invoke – Reply and “lengthy” replies  Invoke – Reply and “delayed” replies  See model file: InvokeTest.rtmdl

Communication (part 1) - 16 Model: “InvokeReplywithTimers” InvokeReplywithTimers - Capsules