Skip to content

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

License

Notifications You must be signed in to change notification settings

tarek99samy/C-COM

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
    

File Structure

root directory
├── README.md
├── LICENSE
├── .gitignore
├── documentation.pdf
└── 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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 93.3%
  • C++ 6.1%
  • Makefile 0.6%