IPC Pipe & Zombie Process Prevention

Bypassing standard high-level system calls, this architecture utilizes fork and execlp for strict process generation. A custom inter-process communication (IPC) pipe is established between parent and child processes to instantly catch execution failures, safely passing the errno back to the parent to prevent defunct ‘zombie’ tasks from populating the system.

Deadlock Prevention & Thread Synchronization

To handle parallel task execution without race conditions, this allocation loop utilizes pthread_mutex_lock to establish a safe critical section. Non-blocking sem_trywait calls actively poll resource availability, ensuring threads can dynamically manage shared CPU and RAM allocation without deadlocking.