CoreDawn is not just an Operating System simulator. It is a living kernel narrative — a space where classic OS theory wakes up, moves, competes for CPU time, fragments memory, talks through shared buffers, and finally… terminates.
This project is built to feel like an OS, not merely explain one.
🧠 Designed as a learning battlefield ⚙️ Engineered as a kernel core 💻 Written in pure C with POSIX threads
AbdulRehman Gulfaraz Systems • Low-level Engineering • OS Internals
“Before building applications, I wanted to understand what gives them life.”
CoreDawn is a Mini Operating System Simulator that recreates the heartbeat of an OS kernel:
- Processes compete for CPU
- Memory gets allocated, split, fragmented, and healed
- Files live inside a virtual disk
- Messages travel through shared memory
- A scheduler runs silently on another thread — just like a real CPU
And you control everything through a root-level shell.
This is not a GUI toy. This is a command-driven kernel experience.
When CoreDawn boots, you enter:
root@CoreDawn:/
From here, you can:
- Create and kill processes
- Fork execution trees
- Load programs from
/bin - Switch CPU scheduling algorithms on the fly
- Inspect RAM at the block level
- Watch processes evolve through states
- Read IPC messages protected by mutex locks
- Run a full automated kernel simulation
Every command you type changes the system state.
-
Dynamic process creation
-
PID allocation starting from 1000
-
Parent → Child forking
-
Explicit process states:
READYRUNNINGTERMINATED
Each process owns:
- Priority
- CPU burst time
- Memory segment
- Execution life
Runs on a separate pthread, simulating CPU time slices.
Supported algorithms:
- 🔄 Round Robin (Quantum = 2)
- 📥 FCFS
- ⚡ Shortest Job First
- 🏁 Priority Scheduling
Execution ends with a text-based Gantt Chart, because timing matters.
Simulated RAM: 1024 units
Allocation Strategy:
- First-Fit
Memory intelligence:
- Block splitting on allocation
- Automatic coalescing on free
- External fragmentation awareness
You don’t just use memory — you see it breathe.
A fully navigable disk abstraction:
- Rooted at
/ - Protected
/bindirectory - Dynamic working directory tracking
Supported shell commands:
ls | cd | mkdir | touch | rm
The shell prompt updates as you move — just like a real OS.
Processes speak through a shared circular buffer:
- Stores last 10 messages
- Fully mutex-protected
- Race-condition safe
This module exists to prove concurrency correctness, not just message passing.
CoreDawn/
├── src/
│ ├── process_manager.c # Process lifecycle
│ ├── scheduler.c # CPU logic
│ ├── memory_manager.c # RAM simulation
│ ├── file_system.c # Virtual disk
│ ├── ipc_manager.c # Shared memory + mutex
│ ├── simulation.c # Automated kernel demo
│ └── shell.c # Root CLI
│
├── include/
│ └── core_structs.h # Kernel data structures
│
├── bin/
│ └── coredawn
│
└── Makefile
Each file mirrors a real kernel responsibility.
typedef struct {
int pid;
char name[32];
ProcessState state;
int priority;
int burst_time;
int remaining_time;
int memory_offset;
int memory_size;
} PCB;This is the identity, memory, and fate of a process.
typedef struct {
int start_index;
int size;
int is_free;
int pid;
} MemoryBlock;Every byte knows who owns it — or if it’s waiting.
Run:
simulateCoreDawn will type commands on its own and demonstrate:
- File system creation
- Program installation
- Process loading & forking
- Memory fragmentation
- IPC messaging
- Scheduler execution
Think of it as:
A cinematic kernel self-test
- GCC
- Linux / Unix
- POSIX Threads
make./bin/coredawnmake cleanCoreDawn was built to:
- Transform OS theory into motion
- Understand kernel decision-making
- Practice low-level system design
- Respect how much happens before
main()ever runs
This project is not optimized for shortcuts. It is optimized for clarity, correctness, and control.
- Multi-core scheduler simulation
- Paging & virtual memory
- Deadlock detection
- Persistent disk storage
- User mode vs Kernel mode separation
CoreDawn is where:
- Processes are born
- Memory fragments and heals
- Schedulers decide fate
- And machines quietly come alive
Light doesn’t shine from the UI. It shines from the kernel.