Skip to content

somnath503/multi-process-in-c

Repository files navigation

  1. Parent and Child Process Messages

    Creates a child process using fork().

    Both parent and child print their own messages.

    Demonstrates how processes run independently after fork().

  2. Parent Waits for Child

    Parent creates a child process.

    Parent waits for the child to complete using wait().

    Ensures child finishes before parent continues.

  3. Alternate Number Printing with Pipes

    Uses two processes connected by a pipe.

    Parent and child print numbers alternately (e.g., parent prints even, child prints odd).

    Demonstrates inter-process communication with pipes.

  4. Producer-Consumer Problem

    One process produces data, another consumes it.

    Uses pipes or shared memory for communication.

    Illustrates synchronization between processes.

  5. CPU Scheduling Algorithms

    Simulates common CPU scheduling algorithms:

     -FCFS (First Come First Serve): Jobs are executed in order of arrival.
    
     -SJF (Shortest Job First): Jobs with shortest execution time run first.
    
     -Round Robin: Each job gets a fixed time slice in rotation.
    

    Helps understand how CPU manages multiple processes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published