Interprocessor Communication Unit: Architecture, Worked Mesh Example and Exam Traps

Trace a three-word processor message, verify handshake ordering, and solve mesh and crossbar numericals without mixing communication, synchronization, and coherence.

KnowledgeGate Team

Exam prep & CS education

Updated 1 Nov 20266 min read
Interprocessor Communication Unit: Architecture, Worked Mesh Example and Exam Traps

IPC is confusing. In Operating Systems, it means interprocess communication between software processes. In this COA lesson, it means data and control moving between processors in a multiprocessor. Keep those ideas separate during GATE CS preparation. A communication-unit path can carry a three-word mailbox message, while a 16 x 16 mesh illustrates hop count and latency in Computer Organization & Architecture.

1. Interprocessor Communication: What Is Being Exchanged

Interprocessor communication is the exchange of data, control information, or synchronization signals among processing elements. Interprocess communication is different. It describes communication between software processes and can happen even when both processes run on one processor.

There are two main programming views. With shared memory, P0 writes a shared location and P1 reads it. Communication is implicit in loads and stores. With message passing, P0 explicitly sends and P1 explicitly receives, usually through a network interface or communication unit.

Communication and synchronization are related, but not identical. Moving operands 12 and 29 is communication. Making P1 wait until both operands are complete is synchronization. A machine can support shared memory and message passing together, so these are useful models, not labels that force every implementation into one exclusive category.

2. Inside an Interprocessor Communication Unit

The communication unit is the hardware boundary between a processor or local memory and the interconnection network. Its three conceptual regions are a processor-side command or descriptor interface, transmit and receive buffers with control and status, and a network side for packetisation, routing, flow control, and delivery.

Typical information includes destination, length, tag or type, payload pointer or words, ready, busy, full, or error status, and an interrupt or doorbell. Short data may move through registers; larger buffers may use DMA. Exact names vary by design.

Suppose P0 submits {destination=P1, length=12 bytes} with three 32-bit words [TAG=17, A=12, B=29]. Three words occupy 3 x 4 = 12 bytes. The transmit side queues them, the network carries them, and P1 receives the same words before computing 12 + 29 = 41.

Message path from P0 to P1: a transmit queue holding TAG=17, A=12 and B=29, the packet crossing the network, and P1 computing 12 + 29 = 41.

3. Worked Mailbox Transfer: Handshake, Ordering and Completion

Use a single-slot receive mailbox for P1 with fields FULL, TAG, A, and B. Initially, FULL=0, so the slot is available. Under this exercise's toy timing, the complete transfer is:

Cycle

Event

0

P0 checks that FULL=0

1

P0 writes TAG=17

2

P0 writes A=12

3

P0 writes B=29

4

P0 publishes FULL=1

5

P1 observes FULL=1

6 to 8

P1 reads TAG=17, A=12, then B=29

9

P1 computes RESULT=12+29=41

10

P1 clears FULL=0

Cycles 0 through 10 give an 11-cycle timeline. This is an invented exercise model, not a universal hardware latency.

Three correctness conditions matter. P0 must not overwrite a full one-slot mailbox. P1 must not consume an empty one. Most importantly, all payload words must be visible before the ready indication is published. If P0 sets FULL=1 first, P1 could observe incomplete values. A real design uses its documented synchronization, queue, and memory-ordering mechanisms to enforce the required order.

Polling makes P1 read FULL repeatedly. An interrupt allows P1 to do other work until notification arrives. The choice changes how waiting costs are paid, but it does not change the payload calculation or the result 41.

4. Worked 16 x 16 Mesh: Hops and Message Latency

A 16 x 16 mesh contains 16 x 16 = 256 processors, with coordinates from (0,0) to (15,15). Under dimension-order routing, the shortest-hop distance is:

|r2-r1| + |c2-c1|

For opposite corners, the distance is |(15-0)| + |(15-0)| = 15 + 15 = 30 hops. This is the worst-case hop count because 15 is the largest possible difference in either coordinate.

Now give the packet an exact size. A 64-byte payload plus a 16-byte header gives 64 + 16 = 80 bytes. If a link transfers 16 bytes per cycle, serialisation takes 80 / 16 = 5 cycles.

Under a simplified cut-through model with one routing cycle per hop, no contention, and serialisation paid once, latency is:

30 x 1 + 5 = 35 cycles

Under a simplified store-and-forward model, every hop waits for all 5 transfer cycles and then spends 1 routing cycle. Latency is:

30 x (5 + 1) = 30 x 6 = 180 cycles

These answers follow from the stated assumptions. The fact that a path has 30 hops does not establish one universal cycle count. Always read the switching and delay model before choosing a latency formula by hand.

A 16 x 16 mesh with a dimension-order path from (0,0) to (15,15) over 30 hops, plus cut-through 35 and store-and-forward 180 cycle results.

5. Bus, Crossbar, Multistage Network and Mesh

These structures differ in endpoint connection, concurrency, and cost.

Structure

Connection idea

Concurrency

Main trade-off

Time-shared bus

One shared path

One granted transfer

Simple, but shared and arbitrated

Crossbar

Crosspoint per input-output pair

Several distinct pairs

Concurrent access costs more hardware

Multistage network

Smaller switch stages

Several paths may operate

Less hardware, but internal conflicts can occur

Mesh

Local neighbour links

Different links can carry traffic

Scalable, but distant nodes need many hops

Use Multiprocessors in COA for Flynn's taxonomy, memory organisation, Amdahl speedup and MESI coherence. For communication-unit problems, follow the message path, mailbox ordering, mesh latency and network backpressure instead.

A 4 x 4 crossbar needs 4 x 4 = 16 crosspoints. Requests P0 -> M2, P1 -> M0, and P3 -> M1 can proceed together because their inputs and outputs are distinct. If P2 -> M2 arrives while P0 -> M2 is active, one must wait for output M2. A non-blocking fabric supports free input-output pairs, not unlimited simultaneous access to one destination.

6. Synchronization, Coherence and Backpressure Are Different Problems

Backpressure means a receiver or downstream link cannot accept another message. In the one-slot mailbox, FULL=1 tells the next sender to wait. A four-entry queue postpones that condition but cannot eliminate it when arrivals outrun departures.

Synchronization enforces event order, such as completing the payload before publishing ready. Mutual exclusion controls simultaneous access. If P0 and P1 both read a shared counter at 20, compute 21, and write 21, the final value is 21, not 22. The compound update needs a lock or atomic operation.

Cache coherence keeps cached views of a shared location consistent under the machine's protocol. It does not make a read-modify-write sequence atomic. For the related cache mechanisms, continue with Cache Write Policies & AMAT Numericals for GATE.

7. How Questions Test Interprocessor Communication

Stable question forms ask you to distinguish interprocess from interprocessor communication, choose shared memory or messages, order handshakes, calculate mesh hops, classify a crossbar, or compare network trade-offs.

Use the worked checkpoints as error detectors. A 16 x 16 grid has a maximum coordinate difference of 15 per dimension, so opposite corners are 15 + 15 = 30 hops apart, not 16, 15, or 32. A 4 x 4 crossbar has 16 crosspoints. Publishing FULL=1 before the payload is ready is an ordering bug. Coherence does not repair the 20 to 21 lost update.

These distinctions only stick once you have attempted questions on them. Use Computer Organization MCQs for broader retrieval practice while keeping communication, synchronization, topology, and switching models distinct.

8. Interprocessor Communication in the Shortest Useful Form

The communication unit connects a processor to the interconnect. Message passing makes send and receive explicit, while synchronization makes the exchange safe. Topology and switching assumptions determine latency. Opposite corners of a 16 x 16 mesh are 30 hops apart; this exercise gives 35 cut-through cycles or 180 store-and-forward cycles only under its stated assumptions. For a structured, subject-by-subject GATE route, continue with GATE Guidance by Sanchit Sir.