This repository contains C implementations of various operating system concepts, covering basic Linux commands, process control, CPU scheduling, thread synchronization, deadlock avoidance, page replacement, inter-process communication, disk scheduling, and a kernel system call study.
- Basic Linux Commands
- Address Book Program
- Process Control System Calls
- CPU Scheduling Algorithms
- Thread Synchronization
- Deadlock Avoidance (Banker's Algorithm)
- Page Replacement Algorithms
- Inter-Process Communication (IPC)
- Disk Scheduling Algorithms
- Kernel System Call Study
This section covers the study of basic Linux commands like echo
, ls
, read
, cat
, touch
, test
, loops (arithmetic comparison, conditional), grep
, sed
, etc. [Consider creating a separate file or directory to document these commands and their usage - e.g., linux_commands.md
].
- Description: A C program implementing an address book with the following options:
- Create address book
- View address book
- Insert a record
- Delete a record
- Modify a record
- Exit
- Part A: Sorting integers using
fork
andwait
. Parent and child processes sort using different algorithms. Demonstration of zombie and orphan states. - Part B: Sorting an array. Parent sorts and passes the sorted array to the child process via
execve
. Child process reverses and displays the array.
- Algorithms: Shortest Job First (Preemptive), Round Robin (with varying arrival times)
- Language: C
- Part A: Producer-Consumer problem with counting semaphores and mutex.
- Part B: Reader-Writer problem (reader priority) with mutex.
- Language: C
- Algorithm: Banker's Algorithm
- Language: C
- Algorithms: FCFS, LRU, Optimal (frame size >= 3)
- Language: C
- Part A: Full-duplex communication using FIFOs. Process 1 sends sentences; Process 2 analyzes and sends results back.
- Part B: Shared memory (System V) for client-server communication.
- Language: C
- Algorithms: SSTF, SCAN, C-LOOK (head moving away from spindle)
- Language: C
- Description: Implementation of a new system call in the kernel space. Includes kernel code, compilation instructions, and a user-space program to demonstrate the system call.
- Kernel Source:
- Architecture:
- Distribution:
- Language: C