Docsity

Buffering Problems - Architecture of Parallel Computers | ECE 506, Study notes of Electrical and Electronics Engineering

Toggle sidebar
bg1
Buffering Problems
[§7.2.5] Certain challenges arise in realizing SAS or message-
passing programming models.
Two of these are input-buffer overflow and fetch deadlock.
Input-buffer overflow
Suppose a large number of processors send messages to the same
module in rapid succession.
If the module has a fixed buffer size, it may overflow. Something has
to be done to prevent this.
• Make input buffers large, and reserve a portion for each
source (called a ā€œcreditā€).
A source will transmit to a module only if it (the source) has
space free in the module’s buffer.
This requires the receiving module to notify the sender in
some way when space is available (e.g., acknowledge or
reply to transaction).
• Destination can refuse incoming transactions when input
buffer is full.
This leads to ā€œback-pressure.ā€ Explain.
When back-pressure reaches the sources, it causes the
sources to slow down to the point that the destination
module can handle the incoming messages.
Other messages in the system are also delayed.
Lecture 18 Architecture of Parallel Computers 1
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Buffering Problems - Architecture of Parallel Computers | ECE 506 and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

Buffering Problems

[§7.2.5] Certain challenges arise in realizing SAS or message- passing programming models.

Two of these are input-buffer overflow and fetch deadlock.

Input-buffer overflow

Suppose a large number of processors send messages to the same module in rapid succession.

If the module has a fixed buffer size, it may overflow. Something has to be done to prevent this.

  • Make input buffers large, and reserve a portion for each source (called a ā€œcreditā€). A source will transmit to a module only if it (the source) has space free in the module’s buffer. This requires the receiving module to notify the sender in some way when space is available (e.g., acknowledge or reply to transaction).
  • Destination can refuse incoming transactions when input buffer is full. This leads to ā€œback-pressure.ā€ Explain.

When back-pressure reaches the sources, it causes the sources to slow down to the point that the destination module can handle the incoming messages.

Other messages in the system are also delayed.

Lecture 18 Architecture of Parallel Computers 1

0 1 2 3 4 5 6 7 0 4 1 5 2 6 3 7 0 2 4 6 1 3 5 7 0 1 2 3 4 5 6 7

Exch. 1

Exch. 2

Exch. 3

Shuffle Shuffle Shuffle

However, deadlock does not occur in a reliable network.

  • Destination can NACK transactions if buffer is full.

Then the sender has to try again. Either— the destination informs the sender, over a special acknowledgment path, or the source times out (as in Ethernet).

Fetch Deadlock

For a network to remain deadlock free, nodes must continue accepting messages, even when they cannot initiate their own messages.

The incoming transaction may generate a request, which cannot be initiated when the network is full.

What happens if the node’s internal buffer fills up?

Three approaches—

  • Provide two logically independent request/reply networks. These may be — physical networks, or — virtual channels with separate input/output queues.

In either case, responses can be initiated,

Ā© 2003 Edward F. Gehringer CSC/ECE 506 Lecture Notes, Spring 2003 2

The CA at the destination must interpret the transactions and cause the appropriate actions to take place.

Output processing

**- checks

  • translation
  • formatting
  • scheduling** (^) M

M

C

C

Message

Scalable

Communication

Input processing

**- checks

  • translation
  • buffering
  • action**

Node

Key design issues: How much interpretation of the message?

How much dedicated processing in the CA?

If processing is not done in the CA, it must be done in the node.

In order of increasing hardware support and specialization, the options for processing in the CA are these.

None: Physical bit stream

• blind, physical DMA nCUBE, iPSC,...

User/system

• User-level port CM-5, *T

• User-level handler J-Machine, Monsoon,...

Remote virtual address

• Processing, translation Paragon, Meiko CS-

Global physical address

• Processor + memory controller RP3, BBN, T3D

Cache-to-cache

• Cache controller Dash, KSR, Flash

Ā© 2003 Edward F. Gehringer CSC/ECE 506 Lecture Notes, Spring 2003 4

Physical DMA

Most early message-passing machines used designs where no interpretation was placed on the data within a network transaction.

This allows for—

  • very simple hardware, and
  • very general communication abstraction.

What is the downside?

Memory P

Cmd

Data Dest

Addr Length Rdy

Memory P

DMA channels

Status, interrupt

Addr Length Rdy

° ° °

The communication assist merely deposits the transaction into storage, whereupon it will be interpreted by the processor.

  • DMA is controlled by registers, generates interrupts.
  • Physical addresses are used.
  • Sending normally requires a trap to the OS.

dest addr

sende aut

  • The sender constructs a system ā€œenvelopeā€ around user data in kernel area.
  • Receive must receive into system buffer, since no interpretation in CA.
  • Message arrival normally generates an interrupt, so privileged software can inspect the messages and either process it or deliver it to the appropriate user process.

Lecture 18 Architecture of Parallel Computers 5

Data is forwarded from its source to its destination through intermediate nodes.

The switch ā€œautomaticallyā€ takes a transaction destined for another node and copies it from the input port to the correct output port.

If the transaction is destined for the local node, the input DMA is activated, and the message is placed in memory.

The vendor’s message-passing library had a 150-μs. startup cost. Using an Active Message implementation, von Eicken was able to reduce this to—

  • 13 μs. (16 instrs., 18 mem. refs., 260 cycles) to insert a message into the network.
  • 15 μs. (18 instrs., 26 mem. refs., 300 cycles) to take a message out of the network.

User-level messages

What do you think is the biggest overhead in processing messages in the network we have just described?

How can we avoid this overhead?

With user-level access,

  • a system message causes an interrupt, so the system can extract it from the network.
  • a user-level message can sit in the input queue until the user-level process reads it from the network.

How can this be implemented? Remember, the user-level messages need to be written without OS intervention. What kind of instructions should be used?

What does this tell us about where the input and output queues should be?

Lecture 18 Architecture of Parallel Computers 7

Network transactions are initiated by reading and writing the ports, plus checking the status register.

Notice that each message now contains a user/system flag, as shown below.

Virtual address space

Status

Net output port Net input port

Program count er

Registe rs

Proce ssor

Me m P

Data Dest

User/system

Status,interrupt Mem P

° ° °

In this design, communication primitives allow a portion of the process state to be in the network.

If the program is swapped out, the messages destined for its processes need to be swapped out too.

When it resumes, they can be reinserted into the network or the destination input queues.

An example of this architecture is the Thinking Machines CM-5.

In the CM-5, it is possible to—

  • insert a five-word message into the network in 1.5 μs. ( cycles), and
  • read one out in 1.6 μs.

Ā© 2003 Edward F. Gehringer CSC/ECE 506 Lecture Notes, Spring 2003 8

It can also support a global address space where the CP performs remote reads on behalf of the requesting node.

In this design, the interpretation of messages is not performed in hardware.

  • The general-purpose processor performs arbitrary output processing (at system level).
  • The general-purpose processor interprets incoming network transactions (at system level).

User processor and message processor share memory

Message processor <–> message processor via system network transaction.

Both compute processor and message processor reside on the memory bus.

Alternatively, the message processor can be embedded into the network interface (see Fig. 7.20, p. 498).

The M P provides the compute processor with a very clean abstraction of the network interface.

  • All the details of the physical network are hidden (input/output buffers, status registers, routing).
  • A message can be sent by simply writing it (or a pointer to it) into shared memory.
  • When received, data can be deposited directly into the user address space.

User processor stores cmd / msg / data into the shared output queue. It must still check for output queue full (or make it elastic).

Communication assists make transaction happen. They do checking, translation, scheduling, transport, interpretation.

This protocol is divided between two layers, as shown below.

Ā© 2003 Edward F. Gehringer CSC/ECE 506 Lecture Notes, Spring 2003 10

NI

M P P

Mem

NI

P M P

Mem

dest

Network

User System

Each network transactions flows through memory, or at least across the memory bus in a cache-to-cache transfer between the compute processor and the message processor.

It crosses the memory bus again between the CP and the network interface.

An example of this is the Intel Paragon architecture (1992).

  • Each node is a shared-memory multiprocessor with two or more 50-MHz i860XP processors, a NI chip, 16–32 MB of memory.
  • The processors are connected by a 400-MB/s. cache- coherent memory bus.

Two DMA engines can transfer a contiguous block of data between main memory and the NI chip at 400 MB/s.

Small messages of seven words can be transferred between two compute processors in about 10 μs., in three relatively equal steps:

compute proc. → MP → MP → compute proc.

Shared physical address space

In this style, multiple processors share physical memory. However, access latencies may differ to different parts of the memory.

Lecture 18 Architecture of Parallel Computers 11