Giter VIP home page Giter VIP logo

distributedsharedmemory's Introduction

distributedSharedMemory

[Part 1] Pairing memorey regions between two systems

Create a (user-land) application named s2dsm that takes as input a local port number and a remote port number. Two instances of s2dsm communicates each other over sockets. For example, when running ./s2dsm 5000 6000 and ./s2dsm 6000 5000, two processes pair up each other. The first s2dsm process listens on the port 5000 and send messages to the port 6000. The second process listens on the port 6000 and send messages to the port 5000. After pairing, the first s2dsm process: • asks a user to specify the number of pages to allocate through stdin: e.g., " > How many pages would you like to allocate (greater than 0)?" • mmaps a memory region of the size specified by * PAGESIZE; • printfs the address of the mmaped region (the return value of mmap) and the mmapped size; and • sends a message including the mmaped address and size to the second process over a socket communication. The second s2dsm process: • receives the message including the mmapped address and size from the first process; • mmaps a memory region of the same size to the same address (by specifying the first argument of mmap); and • printfs the address of the mmaped region and the mma

distributedsharedmemory's People

Contributors

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