Git Product home page Git Product logo

leomartineztamuk / virtual-memory_simulation Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 10 KB

This repository hosts a C program simulating virtual memory management using paging techniques. Virtual memory is a crucial concept in modern computer systems, allowing programs to operate as if they have more memory than physically available by utilizing disk storage as an extension of RAM.

License: MIT License

C 100.00%
c main-memory-simulator paging ram simulation virtual-memory

virtual-memory_simulation's Introduction

Virtual Memory Simulation in C (Paging):

Author: Leo Martinez III - LinkedIn

Contact: [email protected]

Created: Spring 2024


Overview:

This repository hosts a C program simulating virtual memory management using paging techniques. Virtual memory is a crucial concept in modern computer systems, allowing programs to operate as if they have more memory than physically available by utilizing disk storage as an extension of RAM. This simulation provides insights into how virtual memory systems manage memory allocation and swapping between physical memory (RAM) and disk storage.

Features:

  • Randomized Process Simulation: The program simulates processes with randomized virtual memory addresses, demonstrating address translation and page fault handling.
  • Page Fault Handling: When a process accesses a page not currently in physical memory, a page fault occurs. The program handles page faults by swapping pages between memory and disk.
  • User Interface: Users can input virtual addresses to see corresponding physical addresses, illustrating the address translation process.

Repository Structure:

  • src: Contains the C source code for the virtual memory simulation program.
  • bin: Houses the compiled executable file generated from the C source code.
  • README.md: Provides context and information about the project (you're currently reading it!).
  • LICENSE: Includes license information (MIT) for the GitHub repository.

Usage:

  1. Compilation:

    • Ensure you have GCC (GNU Compiler Collection) installed on your system.
    • Navigate to the src directory.
    • Compile the virtual_memory.c file using the following command:
      gcc virtual_memory.c -o virtual_memory.exe
  2. Execution:

    • After compilation, navigate to the bin directory.
    • Run the compiled executable:
      ./virtual_memory
  3. Simulation:

    • Follow the on-screen prompts or explore the code to understand the virtual memory simulation process.
    • Input virtual addresses to see corresponding physical addresses and observe how page faults are handled.

Note:

  • The C source code was written in VS Code.
  • Compilation was performed using GCC in a UNIX-based terminal environment.

virtual-memory_simulation's People

Contributors

leomartineztamuk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.