Interactive operating-systems project for simulating and analyzing Inter-Process Communication (IPC) behavior.
The platform lets you create processes, connect them using IPC channels, send messages, visualize communication, detect deadlocks, analyze bottlenecks, and export secure logs.
- Overview
- Key Features
- Tech Stack
- Project Structure
- How It Works
- Setup & Run
- API Reference
- Typical Workflow
- Data Model (In-Memory)
- Important Notes
- Future Enhancements
IPC Debugger is a full-stack web application built with Next.js App Router that simulates process communication patterns and system behavior.
It is designed for:
- Operating systems coursework and labs
- IPC concept demonstration
- Deadlock/bottleneck experimentation
- Event auditing and export for reports
The system currently stores data in-memory (server process lifetime), making it lightweight and fast for academic and local analysis workflows.
- Create, start, stop, inspect, and delete simulations
- Auto-track simulation status and timestamps
- Add processes with priorities
- Update process states (
ready,running,waiting,blocked,terminated) - Delete processes with automatic cleanup of associated channels
- Create channels between processes
- Supported channel types:
pipequeueshmem
- Delete channels and related message records
- Send messages through channels with IPC-type-aware delays
- Pipe transfer checks buffer constraints
- Queue transfer supports priority effect on latency
- Shared memory simulates mutex/no-mutex behavior
- Resource Allocation Graph (RAG)-style cycle detection
- Returns deadlock status, process cycle, and mitigation suggestion
- Generates events when deadlock is detected
- Tracks and analyzes process/channel delays
- Flags slow processes/channels based on threshold (default 500ms)
- Returns optimization suggestions
- Canvas-based process/channel graph
- Live process status and channel views
- Deadlock and bottleneck simulation triggers for visual demo
- Centralized event stream for simulation activities
- Filtering, searching, and pagination in UI
- Optional anonymization in logs page
- Export logs in JSON/CSV
- Framework: Next.js
16.2.2(App Router) - UI: React
19.2.4 - Rendering/Visualization: Canvas API, Chart.js
4.5.1 - Backend: Next.js Route Handlers (
app/api/**) - Storage: In-memory singleton store (
lib/store.js) - Language: JavaScript
app/
page.js # Landing page
about/page.js # Project documentation page
dashboard/page.js # Main control panel (create/process/channel/message/control)
visualization/page.js # Live IPC graph and anomaly simulation
logs/page.js # Event logs, filters, export, anonymization
api/
simulation/* # Simulation lifecycle APIs
process/* # Process creation/state/delete APIs
ipc/* # IPC channel creation/deletion/message send APIs
deadlock/* # Deadlock analysis APIs
bottleneck/* # Bottleneck analysis APIs
statistics/* # Aggregate simulation statistics
events/* # Event feed APIs
export/logs/* # Log export endpoints
reset/* # Reset in-memory store
lib/
store.js # In-memory entities + CRUD + stats + event store
services/
IPCSimulator.js # IPC-type-specific message delay simulation
DeadlockDetector.js # Cycle detection logic
BottleneckAnalyzer.js # Delay analysis and recommendations
- User creates a simulation from the dashboard.
- User adds processes and configures IPC channels.
- User sends messages across channels.
- System computes IPC delay, updates process states, and stores events.
- Stats, logs, visualization, deadlock checks, and bottleneck reports read from the same in-memory state.
- Node.js
18+(recommended latest LTS) - npm (or compatible package manager)
npm installnpm run devOpen: http://localhost:3000
npm run build
npm run startAll APIs are under the /api prefix.
| Method | Endpoint | Purpose |
|---|---|---|
| POST | /api/simulation/create |
Create a simulation |
| POST | /api/simulation/start |
Set simulation status to running |
| POST | /api/simulation/stop |
Set simulation status to stopped |
| GET | /api/simulation/:simId |
Get simulation with processes and channels |
| DELETE | /api/simulation/:simId |
Delete simulation and related data |
Example payloads:
{
"name": "OS Lab Simulation",
"config": {}
}{
"simulation_id": 1
}| Method | Endpoint | Purpose |
|---|---|---|
| POST | /api/process/create |
Create a process |
| PUT | /api/process/:procId/state |
Update process state |
| DELETE | /api/process/:procId |
Delete process and associated channels |
Create process payload:
{
"simulation_id": 1,
"name": "Producer",
"priority": 5
}State update payload:
{
"state": "running"
}| Method | Endpoint | Purpose |
|---|---|---|
| POST | /api/ipc/create |
Create IPC channel |
| POST | /api/ipc/send |
Send message through channel |
| DELETE | /api/ipc/:channelId |
Delete channel |
Create channel payload:
{
"simulation_id": 1,
"type": "pipe",
"sender_id": 1,
"receiver_id": 2,
"config": {}
}Send message payload:
{
"channel_id": 1,
"content": "hello from producer"
}| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/deadlock/detect/:simId |
Detect deadlocks using process-resource graph |
| GET | /api/bottleneck/analyze/:simId |
Analyze process/channel delays and bottlenecks |
| GET | /api/statistics/:simId |
Aggregate counts, latency, deadlock count, IPC distribution |
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/events/:simId?limit=100 |
Fetch simulation events |
| GET | /api/export/logs/:simId?format=json |
Export logs as JSON |
| GET | /api/export/logs/:simId?format=csv |
Export logs as CSV |
| POST | /api/reset |
Reset entire in-memory store |
- Go to Dashboard.
- Create a simulation (auto-created on first load if none exists).
- Add processes (e.g., Producer, Consumer, Worker).
- Create IPC channels between processes.
- Send messages and observe delay feedback.
- Open Visualization for network view and anomaly simulation.
- Open Logs for filtered event analysis and secure export.
- Use analysis APIs or pages to inspect deadlocks and bottlenecks.
Entities managed by lib/store.js:
simulationsprocesseschannelsmessagesevents
ID counters are auto-incremented in memory.
Statistics include:
- Total processes/channels/messages
- Average latency
- Deadlock event count
- IPC distribution by channel type
- Data is not persistent across server restarts.
- The app keeps the current simulation id in browser
localStorage. - Reset endpoint clears all in-memory entities and resets id counters.
- Latency is simulated (not measured from actual OS kernel IPC primitives).
- Add persistent DB support (SQLite/PostgreSQL/MongoDB)
- Add authentication and multi-user simulation ownership
- Add advanced deadlock prevention strategies
- Add message replay and timeline mode
- Add performance trend dashboards over time
Operating Systems Project — IPC Debugger (2026)