Number: 379

Date: 29-Mar-84 13':38':06

Submitter: Sannella.pa

Source: Masinter

Subject: make DLion virtual memory extend gracefully (avoiding bad pages)

Assigned To: 

Attn: Purcell, vanMelle

Status: Open

In/By: 

Problem Type: Bug

Impact: Serious

Difficulty: Hard

Frequency: Intermittent

Priority: Hopefully

System: Operating System

Subsystem: Virtual Memory

Machine: 1108

Disk: 

Lisp Version: 

Source Files: 

Microcode Version: 

Memory Size: 

File Server: 

Server Software Version: 

Disposition: '
[Date': 13 Apr 84 11':44 PST'
From': vanMelle.pa'
Subject': AR updates'
379': Unlikely, Very Hard]'
[lmm 7 May, raised priority, reduced difficulty after lunch conversation with bvm]

Description: '
'
Interlisp-D on DLions doesn''t extend its vmem correctly; it just writes off the end of the vmem. This is unacceptable for a couple of reasons':'
'
it doesn''t avoid bad pages'
it messes up any other files that might be on the same logical volume'
it doesn''t recognize volume boundaries.'
'
[This AR would obsolete AR#135]'
'
Date':  4 May 84 11':11 PDT'
From': vanMelle.pa'
'
The reason this is hard is that it is hard to extend the virtual memory AT ALL (except for the crude way the DLion does now) from inside Lisp.  Extending a disk file requires access to all the disk allocation structures, and the code on both Dolphin and DLion to do this are written in a way that can cause structure allocation, hence pagefaults.  Therefore, you can''t extend the vmem while you are inside pagefault or inside the "allocate new page" routines (e.g. under Createcell).  Thus, you can only extend the vmem from a "safe place" while there is still plenty of spare vmem to do your allocations in.'
'
HOWEVER, if you boot Lisp and the vmem file is exactly your Lisp.sysout and no more, then there is no vmem to spare.  Your very first call to \NEWPAGE will want a longer vmem, and you don''t have it.'
'
Thus, you must require that your installation utility provide a bigger vmem than your sysout.  And if it''s going to do that, it might as well make it very big and obviate the need to ever extend from within Lisp.'
'
[bvm 5/9 elaboration':'
Fix vmem system to maintain variable "last backing store page allocated".  When Lisp starts up, this is set to the last vmem page, and the local disk''s (mod44 or dlionfs) after exit event''s first task is to set this variable to its true value (and extend the vmem if appropriate)  Swapper will never write out a page beyond that spot.  In \NEWPAGE, if last vmem page gets within N of last backing store page, call for "Extend vmem interrupt" to be done at the next safe place, ala STACK FULL, STORAGE FULL, etc.'
]'


Workaround: 

Test Case: 

Edit-By: vanMelle

Edit-Date:  9-May-84 12':01':00