Git Product home page Git Product logo

Comments (7)

KingAkeem avatar KingAkeem commented on September 25, 2024 1

I'd like to help with this issue. I'm learning about kernels and I really would like to help design one.

from annos.

arthurmco avatar arthurmco commented on September 25, 2024

Nice!

What are your ideas for this memory manager?

from annos.

KingAkeem avatar KingAkeem commented on September 25, 2024

I'm honestly not sure, would you be able to help me with designing it? I understand the theory behind memory management but I've yet to implement it. Do you have any suggestions?

from annos.

arthurmco avatar arthurmco commented on September 25, 2024

I was thinking about starting with a simple bitmap-based physical memory manager, just to get started, and improving it over time.

In it, each bit would represent a physical page of memory, 4kb.

I am still reading about it, but I think it's OK for a start...

from annos.

KingAkeem avatar KingAkeem commented on September 25, 2024

So it's going to be a heap of memory with each block pointing to 4KB of memory?

from annos.

arthurmco avatar arthurmco commented on September 25, 2024

No, more like this: http://wiki.osdev.org/Page_Frame_Allocation#Bitmap

Just a simple array for the bitmap. A heap would consume too much memory.

from annos.

arthurmco avatar arthurmco commented on September 25, 2024

I started doing the physical memory manager in a68ca7f.

It does basic things, but can be improved.

I did some TODO items in the PMM.cpp file, to be solved. I will replicate them here:

  • Use allocation flags, for each one of the memory areas
    This envolves setting a flag for each area that belongs to a determined group, e.g, memory < 16 MB might be used by some old devices, like the floppy or old hardware, that can't use a bigger physical address

  • The CheckPages() method.
    It's missing. We need a function that checks if we can allocate a big area. This is intended to be used by the VMM, that needs to allocate a certain quantity of memory, but it doesn't need to be physically contiguous. So, it can allocate, for example, 2 uncontiguous blocks of 8 pages if a single, contiguous block of 16 pages can't be allocated at once.

  • Detect overlapping zones, alert the user and do something sane
    Some real hardware overlap memory zones, like an old computer I have. Maybe detect what types they are and do something.

  • Merge contiguous zones with the same type
    This might be easy (I don't know, I didn't do it yet). Involves joining them if one ends where other starts and they have the same type.

from annos.

Related Issues (9)

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.