/C-COM

C-COM is an implementation of inter-process communication in the OS, it is a simulation for how the OS can implement a scheduler, memory management, and solving producer consumer problem

Primary LanguageCMIT LicenseMIT

Component 16

GitHub contributors GitHub issues GitHub forks GitHub stars GitHub license

Operating Systems common applications

About the project

  • The project contains three main concepts used in any operating system which are process scheduling, memory managemnt using buddy algorithm, and producer consumer problem

  • It is implemented in C (standard 11) and uses make for compilation

  • More explaination for the details of each module and example test cases can be found in the project documentation

Process scheduling problem

The scheduler provides three algorithms to test a single scenario with. each algorithm has different criteria to define what is the most important process to run

  1. Highest Priority First (HPF)
  2. Round Robin (RR)
  3. Shortest Remaining Time Next (SRTN)

Memory management problem

It is an extension of the scheduler but with the memory management module added. it uses buddy algorithm to allocate/deallocate memory for each process according to the situation

Producer consumer problem

This module implements the common problem which is the synchronization between multiple consuming and producing processes and all of them operating on the same resource. the module uses semaphore arrays and shared memory

Testing

  1. For scheduler and memory manager

    cd scheduler              # or memory_manager 
    make 
    ./test_generator.out      # then enter any number of processes 
    ./process_generator.out
    
  2. For producer consumer

    cd producer_consumer 
    gcc -std=c11 producer.c -o producer.out 
    gcc -std=c11 consumer.c -o consumer.out 
    gcc -std=c11 clear_ipc.c -o clear_ipc.out 
    ./producer.out 
    ./consumer.out
    ./clear_ipc.out    # run this after finish testing to clear resources
    

File Structure

root directory
├── README.md
├── LICENSE
├── .gitignore
└── scheduler
│   ├── headers
│   │   ├── file_handler.h
│   │   ├── headers.h
│   │   ├── highest_priority_first.h
│   │   ├── integer_queues.h
│   │   ├── message_buffer.h
│   │   ├── pcb.h
│   │   ├── round_robin.h
│   │   ├── shortest_remaining_time_next.h
│   │   ├── vector.h
│   ├── clk.c
│   ├── process_generator.c
│   ├── process.c
│   ├── scheduler.c
│   ├── test_generator.c
│   ├── key_process_table
│   ├── keyfile
│   ├── Makefile
└── memory_manager
│   ├── headers
│   │   ├── buddy_algorithm.h
│   │   ├── file_handler.h
│   │   ├── headers.h
│   │   ├── highest_priority_first.h
│   │   ├── integer_queues.h
│   │   ├── message_buffer.h
│   │   ├── pcb.h
│   │   ├── round_robin.h
│   │   ├── shortest_remaining_time_next.h
│   │   ├── vector.h
│   ├── clk.c
│   ├── process_generator.c
│   ├── process.c
│   ├── scheduler.c
│   ├── test_generator.c
│   ├── key_buddy
│   ├── key_process_table
│   ├── keyfile
│   ├── Makefile
└── producer_consumer
│   ├── clear_ipc.c
│   ├── consumer.c
│   ├── producer.c
└── ├── headers.h

Contributors

This project was the semester project of operating systems course in 3rd year computer engineering. it is implemented by:

Abdelrhman Fadl Bahaa Eldeen Eman Othman Tarek Samy

Acknowledgement

Big thanks to all people in this team for the great efforts