A dynamic, interactive web-based simulation of real-time clock (RTC) management and synchronization across OS partitions.
Built for Linux session.
This project demonstrates master-slave RTC synchronization in a multi-partition system:
- Linux acts as the Master Partition, reading time from the hardware clock.
- Windows OS and Ubuntu are Slave Partitions whose clocks can drift and become out of sync.
- You can simulate clock drift, observe out-of-sync states, and manually synchronize all partitions—just like using
timedatectl set-local-rtc 1in Linux.
- Live RTC Simulation: Visualize how clocks drift and sync in real time.
- Master-Slave Architecture: Linux (master) always stays in sync; others can drift.
- Manual & Bulk Sync: Instantly synchronize all slave partitions with a single click.
- Visual Feedback: Out-of-sync states are clearly highlighted.
- Modern UI: Responsive, attractive interface using React and Next.js.
- Command Simulation: Simulate Linux RTC commands and observe their effects.
git clone https://github.com/yourusername/linux-proj.git
cd linux-projcd rtc-sim
npm install
node index.jscd ../frontend
npm install
npm run devOpen http://localhost:3000 in your browser.
📁 linux-proj/ (Root)
├── frontend/ (Next.js frontend)
│ ├── app/
│ │ ├── layout.js
│ │ ├── page.js
│ │ └── globals.css
│ ├── components/
│ │ └── PartitionClock.js
│ ├── pic/ (Screenshots & images)
│ │ ├── p1.png
│ │ ├── p2.png
│ │ ├── p3.png
│ │ ├── p4.png
│ │ ├── p5.png
│ ├── .gitignore
│ ├── jsconfig.json
│ ├── next.config.mjs
│ ├── package.json
│ ├── postcss.config.mjs
│ ├── README.md
│ ├── requirements.txt
│ └── tailwind.config.mjs
├── rtc-sim/ (Node.js backend)
│ ├── .gitignore
│ ├── index.js
│ ├── package.json
│ └── requirements.txt
├── .gitignore
├── Commands.txt
├── LICENSE
├── Makefile
├── README.md
├── rtc_slave.c
├── rtc_sync.c
- Master Clock: The backend (
rtc-sim/index.js) broadcasts the current time to all partitions. - Partitions: Each partition (component) simulates its own clock, which may drift.
- Synchronization: Slave partitions periodically sync to the master, or can be manually synced via UI buttons.
- Command Simulation: Use the UI to simulate commands like
timedatectl set-local-rtc 1for instant synchronization.
The following commands (from Commands.txt) are useful for working with the kernel RTC module:
make
sudo insmod rtc_sync.ko
sudo dmesg | grep rtc_shm
ls -l /dev/rtc_shm
cat /dev/rtc_shm
gcc rtc_slave.c -o rtc_slave
sudo ./rtc_slave
sudo rmmod rtc_sync- Harsh V M
- Karthik Hegde
This project is licensed under the MIT License. See LICENSE for details.




