Skip to content

Dhruv-Cmds/Python-os-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python OS Simulator

A terminal-based operating system simulator built with pure Python. This project demonstrates core programming concepts such as Object-Oriented Programming, file handling, system simulation, and modular architecture without relying on external frameworks.

The simulator mimics basic operating system components including user authentication, file management, process handling, and memory simulation.


Overview

The goal of this project is to simulate how a simple operating system manages different subsystems. Instead of focusing on UI or frameworks, the emphasis is on core logic, system design, and clean code structure.

This project was built as a learning exercise to strengthen understanding of:

  • Python fundamentals
  • OOP design
  • Modular programming
  • State management
  • File-based persistence

Overview

The goal of this project is to simulate how a simple operating system manages different subsystems.


Screenshots

System Start

System Start

Main Menu

Main Menu

File System

File System

Process Manager

Process Manager

Memory Manager

Memory Manager

System Logs

Logs

Features

  • User Authentication

    • Register and login system
    • Persistent user storage
  • File System Simulation

    • Create virtual files
    • Read stored file content
    • Delete files
    • List available files
  • Process Manager

    • Simulate running processes
    • Assign process IDs (PID)
    • View active processes
    • Terminate processes
  • Memory Manager

    • Simulate memory allocation
    • Track used and free memory
    • Deallocate memory
  • System Logging

    • Track important system events
    • User login activity
    • File operations
    • Process actions

Project Structure

python-os-simulator/
│
├── core/
│   ├── file_system.py
│   └── logger.py
│   ├── Main.py
│   ├── memory.py
│   ├── pos.py
│   ├── process.py
│
├── data/
│   │ └─ files/
│   ├── files.json
│   ├── logs.txt
│   ├── test.txt
│   └── users.txt
│
│
├── screenshots
│
├── .gitattributes
├── .gitignore
└── README.md

Each module is responsible for a specific subsystem of the simulated OS.


How It Works

When the program starts, users are presented with a login/register interface. After authentication, the main system menu allows interaction with various simulated OS components.

The simulator uses file-based storage to persist data between sessions.


Example Usage

====================================
        PYTHON OS
====================================

1. Login
2. Register
3. Exit

Enter choice: 1

Login successful!

Main Menu
1. File System
2. Process Manager
3. Memory Manager
4. View Logs
5. Logout

Technologies Used

  • Python 3
  • Object-Oriented Programming
  • File Handling
  • JSON / Text Storage

No external libraries or frameworks were used.



Changelog

v1.0.1

  • Fixed login validation
  • Fixed process manager edge case
  • Improved memory manager safety

v1.0.0

  • Initial release
  • File system
  • Process manager
  • Memory manager
  • Logging

Author

Dhruv

Python Developer | Exploring System Design, OOP, and Low-Level Programming

GitHub: https://github.com/Dhruv-Cmds

About

A terminal-based operating system simulator built with pure Python demonstrating OOP, file systems, process management, and memory simulation.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages