Manage the physical memory.
- Some areas of physical memory are unusable and will need to be managed so not to use this memory.
- Manage the memory mapped I/O. May this should be a separate manager, but will have ties with the physical memory manager as shouldn't allocate memory here.
- Biggest of all, manage where everything is, as data and code have to be somewhere in memory.
Also, we can decide with the 32 bit OS, handle 4KB chunks where for 64 bit OS handle 4MB chunks, as who has less than 4GB of RAM these days, am I right ;).
Here is an example written in C:
https://github.com/DrDeano/DeanOS/blob/master/src/kernel/kernel/pmm.c
A good tutorial:
http://www.brokenthorn.com/Resources/OSDev17.html
Manage the physical memory.
Also, we can decide with the 32 bit OS, handle 4KB chunks where for 64 bit OS handle 4MB chunks, as who has less than 4GB of RAM these days, am I right ;).
Here is an example written in C:
https://github.com/DrDeano/DeanOS/blob/master/src/kernel/kernel/pmm.c
A good tutorial:
http://www.brokenthorn.com/Resources/OSDev17.html