Hello, all.
Paging gets rid of external fragmentation by virtue of being able to map any frame to any page. But that's not the end of the story, since all frames are not created equal. Some frames are accessible by DMA, some are not. There's also page colors to be considered, and NUMA-stuff (which is even weirder).
And I'm sure that's not the end of the possibilities. So what frames *are* (more or less) equivalent?
I ask because I am wondering about the benefits of allowing applications to choose any particular frame for mapping (as is permitted in Nemesis and Xok). Are there any benefits to this over having predetermined frame classes? So maybe I can't ask for some specific frame, but I can ask for any frame of color X, DMA/not, etc.? Is anyone aware of a situation which a system like that doesn't handle just as well?
frame classes
You need to distinguish between soft and hard requirements. Systems have soft requirements (use memory on this cpu, if not possible, use memory on another cpu) and hard requirements (use memory below 16M and if you can't, just fail). You also need to determine the ability to move the memory to another bit within the same class (somebody allocated memory below 16M but that doesn't have the 16M requirement, can I kick it to another place for my 16M required memory?), to make pages have multiple classes (cpu-affinity, bits required for addressing it etc). Having processor affinity is also largely pointless if your OS doesn't allow threads to keep processor affinity too, which makes swapping between them very likely.