[comp.sys.apple2] Virtual Memory

ericmcg@pnet91.UUCP (Eric Mcgillicuddy) (10/11/90)

>What I'm doing is designing a virtual memory system for the GS.
>It's a simplistic type, with just a BASE and BOUNDS register.  But
>that's enough to do memory protection, and make all processes

>Jawaid Bazyar               | Blondes in big black cars look better wearing
>Senior/Computer Engineering | their dark sunglasses at night. (unk. wierdo)
>jb10320@uxa.cso.uiuc.edu    |      The gin, the gin, glows in the Dark!
>                            |                             (B O'Cult)

Copy cat! :)
I think you are going more for a demand paged memory memory management unit,
kinda like a 68851. Lots of luck, but I think you will have problems with the
multiplexed addressing/data lines of the 65816. Also make sure that it is pin
compatible with the 65816 socket on the motherboard and/or various accerators.
I expect you will also have to write some system software to handle page
faults.

On an unrelated topic, where can I find information on PIF's (Permanent
Intialization Files)? When these are loaded are the assigned stack space as
OMF files are or must it explicitly ask for stack/direct page space?i

Eric MCGillicuddy
Apple II Evangelist

UUCP: bkj386!pnet91!ericmcg
INET: ericmcg@pnet91.cts.com

jb10320@uxa.cso.uiuc.edu (Desdinova) (10/15/90)

In article <9010102030.aa01011@generic.UUCP> ericmcg@pnet91.UUCP (Eric Mcgillicuddy) writes:
>
>Copy cat! :)
 :-) 
>I think you are going more for a demand paged memory memory management unit,
>kinda like a 68851. Lots of luck, but I think you will have problems with the
>multiplexed addressing/data lines of the 65816. Also make sure that it is pin
>compatible with the 65816 socket on the motherboard and/or various accerators.
>I expect you will also have to write some system software to handle page
>faults.

   I'm not really looking for paging right now, that would be asking too
much of a hack.  Such a thing would have to be built in to the '816.
However, having a separate v-space for each process gets around the
problem of limited stack space (only 64K for the whole system currently-
but soon, limited only by the imagination!)
   My purpose in this massive hack is to get a very stable *NIX running
on the GS.  I've thought about applications towards GS/OS, and it looks
promising.  Each application can be given it's own bank 0 space...
i.e., the tool sets can be switched between programs with no problems.
Obviously, you want to have them all share the screen space, but
when you're talking HACK, anything is possible.

>On an unrelated topic, where can I find information on PIF's (Permanent
>Intialization Files)? When these are loaded are the assigned stack space as
>OMF files are or must it explicitly ask for stack/direct page space?i
Hmm, that's a good question. I've never seen it in my frequent perusal
of the man-space (? what did I just say), but of course, I wasn't looking
for it.  I would imagine that a permanent init is given it's stack by
the system, but maybe not.  I know TOL files aren't given stacks.

>Eric MCGillicuddy
>Apple II Evangelist

  Amen!  Long live the IIgs (Apple or not!)

>UUCP: bkj386!pnet91!ericmcg
>INET: ericmcg@pnet91.cts.com


--
Jawaid Bazyar               | Blondes in big black cars look better wearing
Senior/Computer Engineering | their dark sunglasses at night. (unk. wierdo)
jb10320@uxa.cso.uiuc.edu    |      The gin, the gin, glows in the Dark!
                            |                             (B O'Cult)
Apple II Users Unite! Storm the New Product Announcement and Demand Justice!

jh4o+@andrew.cmu.edu (Jeffrey T. Hutzelman) (10/16/90)

As far as I know, PIF's are given stack space like regular applications,
but it disappears when the application quits.  When a TIF quits, it
exits and is unloaded like a regular application.  When a PIF exits, the
same thing happens, but the program itself is not unloaded from memory.
-----------------
Jeffrey Hutzelman
America Online: JeffreyH11
Internet/BITNET:jh4o+@andrew.cmu.edu, jhutz@drycas.club.cc.cmu.edu,
                jh4o@cmuccvma

>> Apple // Forever!!! <<

dat33228@uxa.cso.uiuc.edu (Derek A. Taubert) (10/17/90)

>>On an unrelated topic, where can I find information on PIF's (Permanent
>>Intialization Files)? When these are loaded are the assigned stack space as
>>OMF files are or must it explicitly ask for stack/direct page space?i
>Hmm, that's a good question. I've never seen it in my frequent perusal
>of the man-space (? what did I just say), but of course, I wasn't looking
>for it.  I would imagine that a permanent init is given it's stack by
>the system, but maybe not.  I know TOL files aren't given stacks.

From the Programmer's Introduction to the Apple IIgs:

* Permanent initialization files (type $B6) are loaded and executed just like
applications ($B3), except for these conditions:

- They must not be in special memory
- They cannot permanently allocate any direct-page/stack space
- They must terminate with an RTL rather than a QUIT

Don't know if this helps or not, but I thought I'd let you know.

--
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+                                                                             +
+ Derek Taubert --> derek@mrcnext.cso.uiuc.edu  ||  dat33228@uxa.cso.uiuc.edu +
+ Anyone who programs or has an idea for a program for the IIgs, send me mail +
+                                                                             +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

nether@wpi.WPI.EDU (Joel C Belog) (01/20/91)

	A littl bit back (two days ago?)  Some one was asking about virtual
memory.  Someone else responed that there was an article in nibble magazine
about it.  Well, as I was going throught my old apple mags, I came across
the mentioned nibble.  Since I can't type the program out you, (the copy
right expressly prohibits this), I'll give you the date and maybe you can
get a back issue from them.  It's August 1990 vol. 11 No. 8.  It's a red
cover w/ a silouette (sp?) of a head on it.  It also has in big blue letters
"Virtual Memory"
	Hope this helps you out.  

	Joel Belog  			Internet:  nether@wpi.wpi.edu

rbannon@mira.acs.calpoly.edu (Roy Bannon) (05/03/91)

Hello all,
  Someone was working on a virtual memory manager.  I seem to remember it
included a patch to apples memory manager.  Anyway, my MMU for the IIgs is
coming along really well.  I can now abort any access that is not permitted
anywhere in memory.  Currently, the prototype is a small daughter board
that works in a stock GS.  If the person working on the virtual memory
system could send me a note, perhaps we could help each other.


Roy
rbannon@cosmos.acs.calpoly.edu

ericmcg@pnet91.cts.com (Eric Mcgillicuddy) (05/04/91)

>that works in a stock GS.  If the person working on the virtual memory
>system could send me a note, perhaps we could help each other.
>
>
>Roy
>rbannon@cosmos.acs.calpoly.edu

I am the person working on it, off and on. I call it ViM, it currently exists
as a PIF, but I am working on making it into a CDEV (not overly successfully 
Imight add). So far  Ihave tested with a number of programs and although it
bombs very few, Orca/Prizm being the main example, it does not give any
immediate benefit to existing applications. Apparently most programmers prefer
to keep their data in a single monolithic structure, my assumption was that
they would break it up into 64k or smaller chunks because of the 65816
segmented architecture. Bad assumption on my part.

Anyhow the basic premise seems to work well, but user friendly it is not.

I have not yet figured oput how to send mail beyond my local BBS, so you will
have to e-mail me first.

Also if anyone can give me a few pointers (or handles  :)  on how to handle a
CDEV message I would much appreciate it. Assembly code would be nice.


UUCP: bkj386!pnet91!ericmcg
INET: ericmcg@pnet91.cts.com