Inter-Processor Communication (IPC). Agenda IPC Overview IPC Configurations IPC Module Details.

Slides:



Advertisements
Similar presentations
purpose Search : automation methods for device driver development in IP-based embedded systems in order to achieve high reliability, productivity, reusability.
Advertisements

Threads, SMP, and Microkernels
Dynamic memory allocation
Data Structure Lecture-3 Prepared by: Shipra Shukla Assistant Professor Kaziranga University.
Operating Systems Lecture 7.
More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
Module R2 Overview. Process queues As processes enter the system and transition from state to state, they are stored queues. There may be many different.
Module R2 CS450. Next Week R1 is due next Friday ▫Bring manuals in a binder - make sure to have a cover page with group number, module, and date. You.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Computer Systems/Operating Systems - Class 8
Concurrency: Mutual Exclusion, Synchronization, Deadlock, and Starvation in Representative Operating Systems.
KeyStone IPC Inter-Processor Communications
KeyStone IPC For Internal Audience Only
FreeRTOS.
The University of New Hampshire InterOperability Laboratory Serial ATA (SATA) Protocol Chapter 10 – Transport Layer.
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
Process in Unix, Linux, and Windows CS-3013 A-term Processes in Unix, Linux, and Windows CS-3013 Operating Systems (Slides include materials from.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
LWIP TCP/IP Stack 김백규.
Introduction to Processes CS Intoduction to Operating Systems.
FINAL MPX DELIVERABLE Due when you schedule your interview and presentation.
LWIP TCP/IP Stack 김백규.
Intro to Inter-Processor Communications (IPC). Agenda  Basic Concepts  IPC Services  Setup and Examples  IPC Transports  For More Information.
10/16/ Realizing Concurrency using the thread model B. Ramamurthy.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Introduction to Concurrency.
Ethernet Driver Changes for NET+OS V5.1. Design Changes Resides in bsp\devices\ethernet directory. Source code broken into more C files. Native driver.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
3.1 Silberschatz, Galvin and Gagne ©2009Operating System Concepts with Java – 8 th Edition Chapter 3: Processes.
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
CS333 Intro to Operating Systems Jonathan Walpole.
Module R3 Process Scheduling. Module R3 involves the creation of a simple “Round Robin” dispatcher. The successful completion of this module will require.
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
Socket Programming Lab 1 1CS Computer Networks.
Processes CS 6560: Operating Systems Design. 2 Von Neuman Model Both text (program) and data reside in memory Execution cycle Fetch instruction Decode.
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
APS105 Lists. Structures Arrays allow a collection of elements –All of the same type How to collect elements of different types? –Structures; in C: struct.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
M. Accetta, R. Baron, W. Bolosky, D. Golub, R. Rashid, A. Tevanian, and M. Young MACH: A New Kernel Foundation for UNIX Development Presenter: Wei-Lwun.
12/22/ Thread Model for Realizing Concurrency B. Ramamurthy.
How to write a MSGQ Transport (MQT) Overview Nov 29, 2005 Todd Mullanix.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Linux C6x Syslink. 1.What is Syslink? 2.Syslink Architecture 3.SharedRegion 4.What is Syslink-c6x? 5.Syslink-c6x Features 6.Syslink-c6x Dependency 7.Demo.
Processes. Process Concept Process Scheduling Operations on Processes Interprocess Communication Communication in Client-Server Systems.
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
Major OS Components CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
Lecture 1 Page 1 CS 111 Summer 2013 Important OS Properties For real operating systems built and used by real people Differs depending on who you are talking.
7/9/ Realizing Concurrency using Posix Threads (pthreads) B. Ramamurthy.
A thread is a basic unit of CPU utilization within a process Each thread has its own – thread ID – program counter – register set – stack It shares the.
Process concept.
Realizing Concurrency using the thread model
Windows Programming Lecture 09.
CS399 New Beginnings Jonathan Walpole.
Overview Parallel Processing Pipelining
Programmazione I a.a. 2017/2018.
Realizing Concurrency using Posix Threads (pthreads)
Chapter 4: Threads.
Threads, SMP, and Microkernels
Realizing Concurrency using the thread model
CS510 Operating System Foundations
CHAPTER 4:THreads Bashair Al-harthi OPERATING SYSTEM
Jonathan Walpole Computer Science Portland State University
Realizing Concurrency using the thread model
Realizing Concurrency using Posix Threads (pthreads)
Realizing Concurrency using the thread model
Realizing Concurrency using Posix Threads (pthreads)
Outline Chapter 2 (cont) Chapter 3: Processes Virtual machines
Chapter 3: Process Concept
Presentation transcript:

Inter-Processor Communication (IPC)

Agenda IPC Overview IPC Configurations IPC Module Details

Agenda IPC Overview IPC Configurations IPC Module Details

SYS/BIOS component that allows Communication: – between processors in a Multiprocessor Environment – to Peripherals Communication Methods – Message Passing – Streams – Linked Lists What is IPC? Communication Mechanisms work transparently in both single and multi- processor systems NOTES

How can IPC be used? IPC Can natively be used to communicate with: – Other threads on the same processor – Threads on other processors running SYS/Bios – Threads on General Purpose processors running SYS/Link Supported Operating Systems – Windows XP (SP 2, SP3) – Windows Vista – Windows 7 – Redhat Linux (4, 5)

Supplied Packages Input/Output Package – Streams – ti.sdo.io Inter-Processor Communication Package – Gates, Heaps, Linked Lists (ShMem), Variable Size Messages, Notify – ti.sdo.ipc Utilities Package – List, MultiProc, NameServer – ti.sdo.utils

Agenda IPC Overview IPC Configurations IPC Module Details

IPC Configurations Minimal Use – Minimal data passing Data Passing – Passed linked list elements between processors Dynamic Allocation – Dynamically Allocate linked list elements from a heap Powerful, Easy Messaging – MessageQ Module

Minimal Use API Calls made to Notify Module Callback functions can be registered to handle incoming events Notify module MultiProc module Uses /* Send an event message to the destination processor */ status = Notify_sendEvent(dstProc, INTERRUPT_LINE, EVENTID, seq, TRUE); /* * Register call back with Notify. It will be called when the processor with id = srcProc sends * event number EVENTID to this processor. */ status = Notify_registerEvent(srcProc, INTERRUPT_LINE, EVENTID,(Notify_FnNotifyCbck)cbFxn, NULL); /* * ======== cbFxn ======== * This function was registered with Notify. It is called when any event is sent to this processor. */ Void cbFxn(UInt16 procId, UInt16 lineId, UInt32 eventId, UArg arg, UInt32 payload) { /* The payload is a sequence number. */ recvProcId = procId; seq = payload; Semaphore_post(semHandle); } —Application Calls API —Configuration Only —No Configuration Necessary

Data Passing Notify MultiProc Uses ListMP SharedRegion NameServer GateMP Uses ListMP – doubly linked list designed to be shared by multiple processors Address Translation performed internally Cache coherency maintained when cacheable shared memory used GateMP used to protect read/write accesses —Application Calls API —Configuration Only —No Configuration Necessary

Dynamic Allocation Notify MultiProc Uses ListMP SharedRegion NameServer GateMP Uses HeapBufMP, HeapMultiBufMP, or HeapMemMP Uses API Calls made to Notify, ListMP, and a Heap*MP module Heap*MP modules use GateMP —Application Calls API —Configuration Only —No Configuration Necessary /* Send the message to the remote processor */ status = MessageQ_put(remoteQueueId, msg); /* Get a message */ status = MessageQ_get(messageQ, &msg, MessageQ_FOREVER);

MultiProc Notify Messaging with MessageQ ListMPSharedRegion GateMP MessageQ HeapBufMP, HeapMultiBufMP, or HeapMemMP Transport SHM NameServer —Application Calls API —Configuration Only —No Configuration Necessary All API Calls to MessageQ for inter-processor communication Configuration of MultiProc and Shared Region

Agenda IPC Overview IPC Configurations IPC Module Details

IPC Module Initializes subsystems of IPC All applications that use IPC Modules must call IPC_start() Configuration Specifics – setupNotify specifies whether to setup and start the Notify module – setupMessageQ specifies whether to setup the MessageQ module

MessageQ Module MessageQ_Create MessageQ_Open MessageQ_alloc MessageQ_get MessageQ_put MessageQ_freeMessageQ_delete MessageQ_close Typical MessageQ Flow Supports structured sending/receiving of variable length messages OS independent Works with all threading models 3 Priority Levels

ListMP Module Uses shared memory to provide a way for processors to share, pass, and store data buffers Uses multi-processor gate to prevent multiple processors from simultaneously accessing the same linked list

ListMP APIs ListMP_empty() – test for empty ListMP ListMP_getHead() – Get the element from the front of the ListMP ListMP_getTail() – Get the element from the end of the ListMP ListMP_insert() – Insert element into ListMP at current location ListMP_next() – Return the next element in the ListMP ListMP_prev() – Return the previous element in the ListMP ListMP_putHead() – Put an element at the head of the ListMP ListMP_putTail() – Put an element at the tail of the ListMP ListMP_remove() – Remove the current element from the ListMP

Heap*MP Modules HeapBufMP – Fixed size memory manager (All allocated buffers are of the same size) HeapMultiBufMP – Each instance supports up to 8 different fixed sizes of buffers. HeapMemMP – Variable-size memory manager

GateMP Module Can be used to enforce both local and remote contect protection – Can prevent preemption by another thread running on the same processor – Can prevent a remote processor from entering the same Gate. Typically used to protect reads/writes to a shared resource

GateMP APIs GateMP_open() – create GateMP instance GateMP_close() – free GateMP instance GateMP_delete() – similar to –close() with the addition of the shared memory being flagged GateMP_enter() – gain access to the shared data protected by the gate GateMP_leave() – Return access control to the shared data GateMP_query() – Test a gate for Blocking and Preempting qualities

Utilities Package List Module MultiProc Module NameServer Module

List Module (Single Core, Multi Thread) Provides support for creating lists of objects Implemented as a doubly-linked list /* * List Element Structure (First field must be List_elem */ typedef struct Rec { List_Elem elem; Int data; } Rec; Void main(){ … List_Handle myList; Rec r1, r2; Rec* rp; r1.data = 100; r2.data = 200; myList = List_create(NULL, NULL); /* No parameters needed for creation */ List_put(myList, &(r1.elem)); /* Put the two elements on the list */ List_put(myList, &(r2.elem)); /* Get all items off the list and print them */ while ((rp = List_get(myList != NULL){ System_Printf(“rec: %d\n”, rp->data); }