Giter Site home page Giter Site logo

os-xv6_v3's Introduction

OS-xv6_V3

Enabling memory to be shared between different processes

This was a university project we had to do. The point of this project is that two processes can share memory. In the xv6OS we have virtual addresses that point to physical addresses. This is made by the whole operation of "pageing" which was the whole point of our project. We made changes to the following functions fork(),exec(). We also added system calls to share memory and to get that same shared memory (share_mem(), get_shared()). The struct for holding these shared memory structures is in the proc.h file. It holds a name, a size and the virtual address for the shared variable. There are simple user programs that demonstrate the work of sharring a array of 100 000 ints, an two more integers, one as a counter for the array, and the other as a command indicator.

To see this program work you can start the xv6OS on a Linux machine by going to the folder where you clone these project folders through the terminal and by typing "make qemu". The xv6OS will bootup and you can start the program primestart which will automatically start the other two primecom and primecalc. The idea is that primestart is used to start the other two programs, primecom for getting user input and primecalc calculates first 100 000 prime numbers. You can type "prime " to find the nth prime number if it is calculated, "latest" to get the latest prime number calculated, "pause" to pause the primecalc calculation, "resume" to continue primecalc calculation and end which is supposed to end the program but actually crashes for unknown resons to me, that's the only flaw in my implementation.

So you can see the work of process memory sharing where primestart, primecom, primecalc share memory between themselves.

os-xv6_v3's People

Contributors

kaashoek avatar rsc avatar phf avatar aclements avatar mikecat avatar zeldovich avatar kovelja009 avatar chibby0ne avatar bmilojkovic avatar gw avatar icenowy avatar beordle avatar saarett avatar tchajed avatar kehao95 avatar

Watchers

 avatar  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.