MPICH.NT Design of the Windows NT device. Introduction n Port MPICH to NT quickly n Emulate the P4 device.

Slides:



Advertisements
Similar presentations
Review: Name/Address conversion: –What does the domain name system do? –Which system calls use the domain name system? –How does it work? –How does getservbyname.
Advertisements

Socket Programming 101 Vivek Ramachandran.
Device Drivers. Linux Device Drivers Linux supports three types of hardware device: character, block and network –character devices: R/W without buffering.
Primary Author: Girish Verma Secondary Author(s): Navya Prabhakar Presenter: Navya Prabhakar Company/Organization: CircuitSutra USB Modeling Quick Start.
Inter-Process Communication: Message Passing Tore Larsen Slides by T. Plagemann, Pål Halvorsen, Kai Li, and Andrew S. Tanenbaum.
Processes Management.
Computer Net Lab/Praktikum Datenverarbeitung 2 1 Overview Sockets Sockets in C Sockets in Delphi.
Parallel Processing1 Parallel Processing (CS 667) Lecture 9: Advanced Point to Point Communication Jeremy R. Johnson *Parts of this lecture was derived.
©2009 Operačné systémy Procesy. 3.2 ©2009 Operačné systémy Process in Memory.
DAPL: Direct Access Transport Libraries Introduction and Example Yufei 10/01/2010.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 7, 2006 Chapter 3: Processes Process Concept.
Netkit ftpd/ftp migration Part 3 Yufei 10/01/2010.
Client Server Model The client machine (or the client process) makes the request for some resource or service, and the server machine (the server process)
Chapter 3: Processes. Process Concept Process Scheduling Operations on Processes Cooperating Processes Interprocess Communication Communication in Client-Server.
P2P Project Mark Kurman Nir Zur Danny Avigdor. Introduction ► Motivation:  Firewalls may allow TCP or UDP connections on several specific ports and block.
Interprocess Communication. Process Concepts Last class.
Practical Session 11 Multi Client-Server Java NIO.
CSE 380 – Computer Game Programming Render Threading Portal, by Valve,
Assignment 3 A Client/Server Application: Chatroom.
Fall 2000Datacom 11 Lecture 4 Socket Interface Programming: Service Interface between Applications and TCP.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 3: Processes Process Concept Process Scheduling Operations.
LWIP TCP/IP Stack 김백규.
Introduction to Processes CS Intoduction to Operating Systems.
LWIP TCP/IP Stack 김백규.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 7, 2006 Process Concept Process – a program.
Operating Systems Recitation 9, May 19-20, Iterative server Handle one connection request at a time. Connection requests stored in queue associated.
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.
Parallel Programming with MPI Prof. Sivarama Dandamudi School of Computer Science Carleton University.
Winsock Programming Blocking and Asynchronous Sockets for Windows.
Socket Models Different ways to manage your connections.
---- IT Acumens. COM IT Acumens. COMIT Acumens. COM.
Message Passing Programming Model AMANO, Hideharu Textbook pp. 140-147.
Performance Oriented MPI Jeffrey M. Squyres Andrew Lumsdaine NERSC/LBNL and U. Notre Dame.
3.1 Silberschatz, Galvin and Gagne ©2009Operating System Concepts with Java – 8 th Edition Chapter 3: Processes.
AE4B33OSS Chapter 3: Processes. 3.2Silberschatz, Galvin and Gagne ©2005AE4B33OSS Chapter 3: Processes Process Concept Process Scheduling Operations on.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 7, 2006 Outline n Process Concept n Process.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 3: Processes Process Concept Process Scheduling Operations.
Share Memory Program Example int array_size=1000 int global_array[array_size] main(argc, argv) { int nprocs=4; m_set_procs(nprocs); /* prepare to launch.
1 Overview on Send And Receive routines in MPI Kamyar Miremadi November 2004.
Queues, Pipes and Sockets. QUEUE A structure with a series of data elements with the first element waiting for an operation Used when an element is not.
Processes. Chapter 3: Processes Process Concept Process Scheduling Operations on Processes Cooperating Processes Interprocess Communication Communication.
Practical Session 12 Reactor Pattern. Disadvantages of Thread per Client It's wasteful – Creating a new Thread is relatively expensive. – Each thread.
FTP Server API Implementing the FTP Server Registering FTP Command Callbacks Data and Control Port Close Callbacks Other Server Calls.
Practical Session 11 Multi Client-Server Java NIO.
Processes CSCI 4534 Chapter 4. Introduction Early computer systems allowed one program to be executed at a time –The program had complete control of the.
Socket Programming Lab 1 1CS Computer Networks.
Chapter 3: Process-Concept. Process Concept Process Scheduling Operations on Processes Cooperating Processes Interprocess Communication Communication.
Sockets Socket = abstraction of the port concept: –Application programs request that the operating system create a socket when one is needed –O.S. returns.
Client/Server Socket Programming Project
Part 4: Network Applications Client-server interaction, example applications.
Chapter 3: Processes-Concept. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 3: Processes-Concept Overview Process Scheduling.
Socket Programming.
Chapter 16 – Data Structures and Recursion. Data Structures u Built-in –Array –struct u User developed –linked list –stack –queue –tree Lesson 16.1.
FIT5174 Parallel & Distributed Systems Dr. Ronald Pose Lecture FIT5174 Distributed & Parallel Systems Lecture 5 Message Passing and MPI.
Inter-Processor Communication (IPC). Agenda IPC Overview IPC Configurations IPC Module Details.
An Introduction to MPI (message passing interface)
 Wind River Systems, Inc Chapter - 7 Intertask Communication.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 3: Processes Process Concept Process Scheduling Operations.
Message Passing Computing 1 iCSC2015,Helvi Hartmann, FIAS Message Passing Computing Lecture 2 Message Passing Helvi Hartmann FIAS Inverted CERN School.
FTP Client API FTP in embedded devices Implementing an FTP Client FTP Command APIs Other FTP Client APIs.
Queues 1. Introduction A sequential collection of data Changes occur at both ends, not just one Queue applications –files waiting to be printed –"jobs"
LWIP TCP/IP Stack 김백규.
Java Byte IPC: Part 6-Summary
Queues.
Implementation CAN Communication Engine
SLC Executive Message Service
Handles disk file 0000: array of file-offsets 0001: 0002: 0003: 0: …
I/O Systems I/O Hardware Application I/O Interface
Hardware Environment VIA cluster - 8 nodes Blade Server – 5 nodes
Intertask Communication
Presentation transcript:

MPICH.NT Design of the Windows NT device

Introduction n Port MPICH to NT quickly n Emulate the P4 device

MPICH P4 device P4 PIbsend(…) PIbrecv(…) PInprobe(…) MPID MPI Channel

MPICH NT device MPID MPI Channel ReceiveSend NT NT_PIbrecv(...)NT_PIbsend(...)

NT device : Send NT Send TCP/IP VIA SHMEM NT_PIbsend() ShmemLockedQueue.Insert(...) NT_ViSend(...) SendBlocking(...) MPID MPI Channel

NT device : Receive multi-threaded NT Receive MessageQueue ShmemLockedQueue ShmRecvThread ViWorkerThread CommPortWorkerThread NT_PIbrecv(...) FillThisBuffer(...) GetBufferToFill(...) SetElementEvent(...) RemoveNextInsert(...) VipCQWait(...) GetQueuedCompletionStatus(...) TCP/IP VIA SHMEM MPID MPI Channel

NT device : Receive “single” threaded MessageQueue Poll SHMEM VIA CommPortWorkerThread NT_PIbrecv(...) FillThisBuffer(...) GetBufferToFill(...) SetElementEvent(...) RemoveNextInsert(...)ViWorkerThread(...) GetQueuedCompletionStatus(...) MPID MPI Channel NT Receive TCP/IP PollShmemAndViQueues(...)

NT device : MessageQueue n Retrieving a buffer from the message queue: n void* GetBufferToFill( int tag, int length, int from, MsgQueueElement **ppElement ) n bool SetElementEvent( MsgQueueElement *pElement ) n Supplying a buffer to be filled by the message queue: n bool FillThisBuffer( int tag, void *buffer, int *length, int *from ) n bool PostBufferForFilling( int tag, void *buffer, int length, int *pID ) n bool Wait( int *pID ) n bool Test( int *pID ) n Miscellaneous: n bool Available( int tag, int &from ) n void SetProgressFunction( void (*ProgressPollFunction)() )

NT device: ShmemLockedQueue n Single reader / Multiple writer n Inserting a buffer into the shared memory queue: n bool Insert( unsigned char *buffer, unsigned int length, int tag, int from ); n Supplying a buffer to be filled by the shared memory queue: n bool RemoveNext( unsigned char *buffer, unsigned int *length, int *tag, int *from ); n Removing the next message directly into a buffer supplied by a message queue: n bool RemoveNextInsert( MessageQueue *pMsgQueue, bool bBlocking = true ); n Miscellaneous: n void SetProgressFunction( void (*ProgressPollFunction)() );

ShmemLockedQueue n Memory layout with two messages in the queue : state tag from length next offset Message header m_plQMutex m_plQEmptyEvent m_plMsgAvailableTrigger m_pBase m_pBottom head tail m_pEnd m_hMsgAvailableEvent

ProcTable : g_pProcTable[nproc] // Structure accessed by completion port or via thread to store the current message struct NT_Message { int tag; int length; void *buffer; int nRemaining; DWORD nRead; OVERLAPPED ovl; MessageQueue::MsgQueueElement *pElement; int state; // NT_MSG_READING_TAG, NT_MSG_READING_LENGTH, NT_MSG_READING_BUFFER }; struct NT_Tcp_shm_ProcEntry { SOCKET sock;// Communication socket WSAEVENT sock_event;// Communication socket event NT_Message msg;// Current working message for sockets or via VI_Info vinfo; // VIA connection information int shm;// FALSE(0) or TRUE(1) if this host can be reached through shared memory int via;// FALSE(0) or TRUE(1) if this host can be reached through VI int listen_port;// Port where thread is listening for connections int control_port;// Port where thread is listening for control message connections // Description of process long pid;// process id char host[NT_HOSTNAME_LEN];// host where process resides char exename[NT_EXENAME_LEN];// command line launched on the node HANDLE hValidDataEvent; // Event signalling the data in this structure is valid // This does not include sock and sock_event };

Send Call Tree MPI_Send MPID_SendDatatype (MPID_PackMessage) MPID_SendContig MPID_CH_Eagerb_send_short MPID_SendControlBlock NT_PISend NT_ShmSend Insert or InsertSHP NT_ViSend ViSendFirstPacket – tag,length,buffer ViSendMsg SendBlocking – tag SendBlocking – length SendBlocking - buffer MPID_CH_Eagerb_send MPID_SendControlBlock NT_PISend MPID_NT_Rndvn_send MPID_NT_Rndvn_isend MPID_SendControlBlock NT_PISend Wait CheckDevice

Receive Call Tree MPI_Recv MPID_RecvDatatype MPID_IRecvDatatype MPID_IrecvContig MPID_Search_unexpected_queue_and_post MPID_Search_unexpected_queue MPID_Enqueue MPID_RecvComplete check device non-blocking MPID_CH_Check_incoming PInprobe = NT_Pinprobe blocking MPID_RecvAnyControl = PIbrecv = NT_Pibrecv msgQ.PostBufferForFilling msgQ.Wait

Limitations n MessageQueue has no concept of Datatypes, only contiguous buffers. n Blocking, single threaded sends. n Large buffers are completely filled before any unpacking is done.