Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Skill

Inter-Process Communication

Choose and build the right channel between processes on one host - pipes, Unix domain sockets, shared memory, message queues or file locks - and see how the kernel queues socket traffic.

Intermediate1 roadmap

4 objectives 6 steps about 130 min

Check what you know

The lessons are coming later. The knowledge check is ready now.

Take the knowledge check

This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.

Learning objectives

  • Compare pipes and FIFOs, Unix domain sockets, POSIX shared memory, message queues, signals and advisory file locks by data model, copying, synchronization, lifetime and access control, and choose one for a stated design.
  • Build a local client-server service over a Unix domain socket that frames its messages, identifies the peer with SO_PEERCRED and passes an open file descriptor with SCM_RIGHTS.
  • Share data between processes with shm_open and mmap, synchronize it with a process-shared mutex or semaphore, and clean up the objects it leaves in /dev/shm.
  • Explain how the kernel queues socket connections and data - listen backlog, accept queue, send and receive buffers - and diagnose an overflowing accept queue with ss and kernel counters.

Lesson plan

6 steps, about 130 min · 0 of 5 lessons available so far

  1. Choosing a channel: pipes, FIFOs, sockets, shared memory, queues and locks Concept · 20 min · coming later
  2. Worked example: a Unix domain socket service with framing, peer credentials and descriptor passing Worked example · 25 min · coming later
  3. Lab: a shared-memory ring buffer between two processes, guarded by a process-shared semaphore Lab · 30 min · coming later
  4. Inside the socket layer: backlog, accept queue and socket buffers Concept · 20 min · coming later
  5. Lab: overflow an accept queue on purpose and read the evidence in ss and nstat Lab · 20 min · coming later
  6. Check: choose, build and debug an IPC channel Knowledge check · 8 questions

Practise it

Write a small metrics daemon in C (a Python client is fine): clients send records over a Unix domain socket and the daemon rejects peers whose UID is not allowed (SO_PEERCRED); the daemon publishes running counters in a POSIX shared-memory segment that a separate monitor reads under a process-shared semaphore; a nightly compaction job takes an flock so two runs never overlap. Then shrink the listen backlog, overload the daemon with a load generator, and submit the ss and nstat evidence of accept-queue overflow, the fix, and a note on what your tests do not prove.

References

Hard prerequisites

Unlocks

Nothing depends on this skill yet.

On these roadmaps

Progress and evidence for this skill are shared across all of them.