Re: Minix memory management

817 views
Skip to first unread message

Erik van der Kouwe

unread,
Nov 4, 2012, 6:23:52 AM11/4/12
to min...@googlegroups.com, lokesh, Tanmay
Hi,

On modern MINIX, the difference between memory allocation mechnisms doesn't really apply anymore as almost all allocations can be filled with non-contiguous ranges of pages. Contiguous allocations have become rare and are usually small, so memory fragmentation shouldn't usually be an issue anymore.

This sounds like a homework exercise, in which case the intention was probably for you to work with an older version of MINIX that did allocate memory contiguously. I recommend you contact the course supervisor to ask which version of MINIX you are supposed to be using.

With kind regards,
Erik

Op zaterdag 3 november 2012 21:01:24 UTC+1 schreef Chirag Choudhary het volgende:
hi,
   I was trying to change the memory allocation algorithm from first fit to best fit in minix 3.2.0 So i need some help understand a few things. 
 In the VM server in alloc.c file ( /usr/src/servers/vm/alloc.c ) 
1.in the function alloc_pages :-   why is PAF_LOWER1MB and PAF_LOWER16MB used simultaneously 
2: and why are boundary16 and boundary1 used simultaneously.

Also what is the significance and use of these variables ?

Regards,
Chirag Choudhary

Antoine LECA

unread,
Nov 5, 2012, 3:37:14 AM11/5/12
to min...@googlegroups.com
Sudarshan S wrote:
> If so, which was the last version to support non paged mode reliably?

I would say, 3.1.3a (which is also the last version without paged mode.)

Versions 3.1.4, 3.1.5, 3.1.6, and 3.1.7 had all been released as
significant enhancements over the previous one, and the world continued
to move; if you prefer, they were equilibrium momentums at the time; but
there were never strong support for non-main things and features (as
could be running in non-paged mode) and support certainly vanished as
soon as the next version was released.
Of all these 3.1.7 was IMHO the most stable, but it is all relative.


Antoine

Chirag Choudhary

unread,
Nov 5, 2012, 12:33:18 PM11/5/12
to min...@googlegroups.com
Hi,

We are required to change memory management algorithm in Minix 3.2.0 only.
We have a few questions on how to do it :

  1. How to set the memory allocation to contiguous, i.e, how to make a serial mapping between logical and physical memory? (i.e. contiguous memory in virtual address space implies contiguous memory in physical address space)
  2. In absence of complete documentation we wanted to know what are these variables used for (in file /usr/src/servers/vm/alloc.c  : 
    1. NONCONTIGUOUS
    2. PAF_LOWER1MB
    3. PAF_LOWER16MB
    4. boundary16
    5. boundary1
    6. PAF_CONTIG



--
You received this message because you are subscribed to the Google Groups "minix3" group.
To post to this group, send email to min...@googlegroups.com.
To unsubscribe from this group, send email to minix3+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/minix3?hl=en.




--
Chirag Choudhary,
4th year, CSE,
Fest. Coord.
ηvision 2012,
IIT Hyderabad

Erik van der Kouwe

unread,
Nov 5, 2012, 12:59:08 PM11/5/12
to min...@googlegroups.com
Hi,

With regards to (1): this really isn't possible anymore. Although mmap-based individual memory allocations can be made contiguous, implicit allocations (such as using a stack page that hasn't been used before) really cannot be done this way anymore. Also, the current virtual memory layout makes it impossible to go back since the stack now ends at 0x80000000. If you want this you should use a version of MINIX older than 3.1.4, the version that introduced paging.

With kind regards,
Erik

Op maandag 5 november 2012 18:33:40 UTC+1 schreef Chirag Choudhary het volgende:
Reply all
Reply to author
Forward
0 new messages