[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

587.0. "Working Set" by EAGLE1::KIRK (Matthew Kirk) Wed Oct 21 1987 13:43

    How do I find out if an unlocked page is part of a process's working
    set?
    
    Matt
T.RTitleUserPersonal
Name
DateLines
587.1ERIS::CALLASStrange days, indeed.Wed Oct 21 1987 14:303
    Try SHOW PROC/PAGE in SDA (analyze/system).
    
    	Jon
587.2SHOW PROC/PAGEEAGLE1::KIRKMatthew KirkWed Oct 21 1987 16:593
    I need to be able to get the information from within a user mode
    program.
    
587.3TLE::BRETTWed Oct 21 1987 17:237
    You can't, since between when you get the answer and when you read
    it the page may have come or gone from the working-set.
    
    I know this is a hackers notes file, but I sure hope you aren't planning
    to ship something with hacks like this in it to customers...
    
    /Bevin
587.4Hacks, etc.EAGLE1::KIRKMatthew KirkWed Oct 21 1987 22:569
    No, this isn't going to customers... I'm working on test software,
    and I'm trying to control which pages are part of the user's working
    set and which aren't at various stages of a test case. Basically,
    I can control which pages are definitely in the test case at the
    start of the test case ($LKWSET) and by purging the remaining pages
    from the working set and by setting the PFC I can control (I think)
    which pages get brought in, but I was hoping there might be some 
    way to find out which pages used by the test case are in the 
    working set at the end of the test case.
587.5Use PCA.CHOVAX::YOUNGBack from the Shadows Again,Wed Oct 21 1987 23:571
   
587.6Can a user-mode process read its own page table entries?JON::MORONEYThu Oct 22 1987 00:430
587.7Undocumented, and therefore unsupported.PASTIS::MONAHANI am not a free number, I am a telephone boxThu Oct 22 1987 07:5910
    	There used to be (and may still be - I haven't looked at that
    part of the fiche for a long time) a system service for getting
    page table information. It was called $GETPTI (reasonably enough).
    
    	It was used by the linker to see which pages had the "modified"
    bit set, so it knew where it could create demand zero sections.
    You might try to find if it is still around and does what you want.
    
    	Though as pointed out, the information you want from the page
    tables may change behind your back before you can use it.
587.8ERIS::CALLASStrange days, indeed.Thu Oct 22 1987 14:5413
    I don't think you're going to be able to do it from user mode. If you
    can go to kernel mode, it's no problem -- I can give you some BLISS
    that will return the PTE of a specified address. But you have to be at
    IPL$_SYNC to do it (and have a spinlock in V5). 
    
    $GETPTI will not give you the information you want. What $GETPTI does
    is search your address space for N contiguous pages that have certain
    attributes. In V4 and before, it will only search for demand-zero
    pages. In V5, it will also search for unmapped pages (holes in the
    address space). It will not tell you if these pages are valid, which is
    what you want to know.
    
    	Jon
587.9PageFault Monitor is in VMSMDVAX3::COARMy hero? Vax Headroom, of course!Thu Dec 17 1987 19:3013
    Whatever happened to the old PFM (PageFault Monitor) utility?  As
    I recall, there is a bit reserved in the hardware PCB (i.e., in
    the VAX architecture itself) saying `this process is being monitored.'
    I think the PFM software used that.  There was a system service
    ($SETPFM) too, which may or may not still be around..  it is in
    V4 at least, although I suppose support and useability is somewhat
    problematical.
    
    The PFM wrote a file containing the PC and faulting address, at
    least.  It may have included the time and number of pages, but I
    don't recall.
    
    #ken	:-)}
587.10PASTIS::MONAHANI am not a free number, I am a telephone boxFri Dec 18 1987 07:073
    	I think the bit in the PCB just runs a line on the backplane. This
    allows a hardware monitor to know when the interesting process is
    current. I don't think it is much use with a software monitor.
587.11PSW::WINALSKIPaul S. WinalskiSun Dec 20 1987 18:245
Yup, the performance monitor bit in the PSL is meant for use in non-intrusive
hardware monitors, such as DIAMOND (DIAgnostic MONitoring Device) for the
11/780.

--PSW