[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

Title:-={ H A C K E R S }=-
Notice:Write locked - see NOTED::HACKERS
Moderator:DIEHRD::MORRIS
Created:Thu Feb 20 1986
Last Modified:Mon Aug 03 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:680
Total number of notes:5456

584.0. "Page fault cluster size" by EAGLE1::KIRK (Matthew Kirk) Mon Oct 19 1987 17:21

I am currently working on a program with the following memory layout:

                             |---------|
                           0 |  Data   |
                                  .
                                  .
                                  .
                             |---------|
                    %X300000 | Program |
                                  .
                                  .
                                  .

The problem is this: when the program needs data, it may get a page fault.
When a page fault occurs, some unknown number of pages (I assume whatever 
PFCDEFAULT is set to) gets read in. I need to be able to control the size 
of the cluster read into memory without modifying PFCDEFAULT.

The only means which I have been able to find to do this is to create a 
cluster using the linker, but for various reasons, this is not a preferred
means of controlling the page fault cluster size.

Any ideas?
Thanks!
    
T.RTitleUserPersonal
Name
DateLines
584.1$CRMPSCARNOLD::LENNIGDave, SWS, @CYO CincinnatiMon Oct 19 1987 19:252
    the $CRMPSC service allows you to specify the cluster size for the
    section at run-time...
584.2$CRMPSCEAGLE1::KIRKMatthew KirkTue Oct 20 1987 16:379
    $CRMPSC doesn't work for this application because setting the 
    SEC$M_PAGFIL flag requires that the memory mapped be a global
    section, which is unacceptable since most of the machines the
    program will be running on don't have a large enough global
    page table. Not using the SEC$M_PAGFIL flag requires that the
    program create a disk file section, which is also unacceptable
    because of the amount of file space that would be required.
    
584.3OVDVAX::LENNIGDave, SWS, @CYO CincinnatiWed Oct 21 1987 19:5420
    I'm very confused.
    You want to control the pfc size, AND use the pagefile?
    
    My experience with situations involving controlling pfc size always
    used a disk file section; if you're using the pagefile, there is
    no guarentee at all that you'll get 'pfc size' chunks consistently.
    
    You seem concerned about the amount of disk space, but it'll be
    the same number of blocks whether it's the page file or a private
    file. Also, concern about raising GBLPAGES (a relatively cheap
    parameter) seems misplaced
    
    If this is a purely scratch data area, you might try this...
    (I've never done it, but can't see any reason why it won't work)
    
    Modify PHYSICALPAGES to system_memory minus data_area_size.
    PFN map this memory to your address space. You won't use any backing
    store, never incur a page fault, etc...
    
    Dave
584.4Exercise for the abuserMDVAX3::COARMy hero? Vax Headroom, of course!Thu Dec 17 1987 19:248
    Go in and frob your PHD to change your personal PFCDEFAULT (for
    your process only).  A minor hack, needing CMKRNL.
    
    Bear in mind that, if the page fault is satisfied from the modified
    or free lists, ONLY the faulting page gets moved into your WS, NOT
    a whole cluster.
    
    #ken	:-)}