This repository contains practical implementations of fundamental Operating System concepts and mechanisms. Each implementation is thoroughly documented and includes example usage.
This repository serves as a comprehensive collection of Operating System programming concepts implemented in C and Java. Perfect for students, developers, and anyone interested in understanding OS internals through practical coding examples.
- Implementation of
fork()
,exit()
,wait()
, andexec()
system calls - Demonstrates process creation, termination, and parent-child relationships
- Examples of process synchronization
- Implementation of
open()
,read()
, andwrite()
operations - File handling and management demonstrations
- Error handling and file permissions
- First Come First Serve (FCFS) ⏱️
- Non-preemptive scheduling implementation
- Process timing and turnover analysis
- Round Robin Scheduling 🔄
- Time quantum based scheduling
- Context switching demonstration
- Priority Scheduling ⭐
- Priority-based process execution
- Priority queue implementation
- Java Implementation ☕
- Thread creation and management
- Synchronization mechanisms
- Thread pool demonstrations
- Pthread Implementation 🧵
- POSIX thread programming
- Thread synchronization
- Mutex and semaphore usage
- Pipe Implementation 📡
- Parent-child process communication
- Data transfer demonstrations
- Bidirectional communication examples
- GCC Compiler (version 7.0+)
- Java Development Kit (JDK 11+)
- POSIX-compliant operating system
- Make utility
# Clone the repository
git clone https://github.com/username/os-concepts-implementation.git
# Navigate to the project directory
cd os-concepts-implementation
# Compile C programs
make all
# Compile Java programs
javac src/java/*.java
Each topic has its own directory with specific instructions and examples:
# For System Calls
cd system-calls
./fork_example
# For Scheduling Algorithms
cd scheduling
./fcfs_scheduler
# For Multithreading (Java)
cd multithreading/java
java ThreadExample
# For Multithreading (Pthread)
cd multithreading/pthread
./pthread_example
# For IPC
cd ipc
./pipe_example
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
If you find this repository useful, please consider giving it a star! It helps others discover this resource.
Made with ❤️ by Shubham