Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Virtual Memory

  1. #11
    Senior Member nihil's Avatar
    Join Date
    Jul 2003
    Location
    United Kingdom: Bridlington
    Posts
    17,188
    I'm guessing I can set the Virtual Page Size on my machine to 2MB even if the Cluster Size on the Hard Disk is 4KB. Would that be an accurate statement?
    I honestly have no idea at all.

    I know that a variety of page sizes are supported by other systems, but was under the impression that boxes running XP or 2000 only supported 4K or 4Mb?

    The default cluster size is also 4K, but you can change that to meet certain specialist requirements. For "normal" usage, 4K is considered to be the optimal cluster size.

    Obviously the Page File has clusters just like the rest of the drive, so the same considerations apply. With the large page file you will risk greater fragmentation and sector slack.

    Also, if the clusters are smaller you will need some sort of buffering and management facility, which would presumably reduce efficiency?

  2. #12
    nihil, Thankyou.

    Say, I've a small application that performs basic arithmetic functions; Now, when the application is run, say the application is given X-Number of Virtual Pages.

    Now how does the Memory Manager decides which Page is

    -ReadOnly, or
    -ReadWrite or
    -Execute or
    -Execute_ReadWrite etc.

    I would greatly appreciate if any examples can be provided why a Page would be one of the above.

    Thanks
    -We May Need To Solve Problems Not By Removing The Cause, But By Designing The Way Forward Even If The Cause Remains In Place-

    Edward de Bono

  3. #13
    Senior Member nihil's Avatar
    Join Date
    Jul 2003
    Location
    United Kingdom: Bridlington
    Posts
    17,188
    I don't think it works like that, but I am no expert on MMUs (there is no money in it, from my personal viewpoint ).

    Virtual memory is effectively using part of the HDD as if it were an extension of RAM. "Pages" are not traditional/conventional "files" so I do not see why they should have similar attributes/properties.

    One thing I do know is that there is a non-paged area in RAM. Mess with that and you get a BSOD.

    The usual cause is failing RAM or a corrupt program due to failing HDDs. However, if you have just loaded or updated software you would roll that back first, before following the hardware route.


  4. #14
    Senior Member
    Join Date
    Apr 2004
    Posts
    1,130
    [ Now how does the Memory Manager decides which Page is

    -ReadOnly, or
    -ReadWrite or
    -Execute or
    -Execute_ReadWrite etc.
    Examples:
    read only - for reentrant code (and shared). Suppose you have a routine on memory that is shared among several processes. So you need to protect it to avoid code corruption.

    Execute - on some architecures you can protect system flagging pages with execute or not execute. Marking as No-exec will protect O.S. and process against those infamous Buffer overflow attacks for example. Also keep coders in a strict way to program

    About your previous question about page size: basically choosing a page size is a kind of balance between page tables size and efficiency on memory allocation for user processes.

    If you use a small page, you will increase the size of page table as real storage grows.
    If use use a large one, you will thrash memory usage since small processes will ocuppy a lot of memory (but not use, since pages usually belongs to one process)
    Meu sítio

    FORMAT C: Yes ...Yes??? ...Nooooo!!! ^C ^C ^C ^C ^C
    If I die before I sleep, I pray the Lord my soul to encrypt.
    If I die before I wake, I pray the Lord my soul to brake.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •