Hi all,
I have just started work on my Process Manager and Memory Manager. I am using paging and have a few questions...
1. I want to be able to track all the pages used by one resource, do I need two seperate structures
2. I also need to be able to set access rights on that area of memory individaul of the ring, do I need another structure for this?
3. I also want to know what method you would use for allocation as I am currently thinking of Best Fit?
Thanks
Memory Management
Re:Memory Management
What do you mean by 'resource'? Where does the number 2 come from?chrisa128 wrote:1. I want to be able to track all the pages used by one resource, do I need two seperate structures
Not necessarily; all protection is encoded in the GDT and page tables. However, if you want to start implementing virtual memory, you'll need to store this information yourself.2. I also need to be able to set access rights on that area of memory individaul of the ring, do I need another structure for this?
Best fit works, as do first fit and worst fit. Try each of them, do some tests, and pick the one you like best. Or pick the one that's easiest and cleanest to implement. Leave enough room in your design that you're able to change algorithms easily.3. I also want to know what method you would use for allocation as I am currently thinking of Best Fit?
Re:Memory Management
I mean that if I set up a structure to map the pagetables, do I also need a structure that points to this for my Virtual Memory?Quote from: chrisa128 on 05-Mar-03, 03:46pm 1. I want to be able to track all the pages used by one resource, do I need two seperate structures
What do you mean by 'resource'? Where does the number 2 come from?
Re:Memory Management
I think that depends on how you work out your design.
My design consists of:
-- a vm_node_t for each range of addresses in one address space, each of which points to:
-- a vm_area_t structure for each block of memory (memory can be shared, so more than one vm_node_t can refer to one vm_area_t). This contains an array of:
-- addr_t, which specify the physical addresses of any pages committed within the memory area.
My design consists of:
-- a vm_node_t for each range of addresses in one address space, each of which points to:
-- a vm_area_t structure for each block of memory (memory can be shared, so more than one vm_node_t can refer to one vm_area_t). This contains an array of:
-- addr_t, which specify the physical addresses of any pages committed within the memory area.