🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #2630

Re: DMA in VM

#2630
From: Joe Smith
Date: Sat, 09 Dec 1989 04:07
44 lines
3146 bytes
>In article <839@tardis.Tymnet.COM> jms@tardis.Tymnet.COM (Joe Smith) writes:
>>On a good implementation of VM, the OS provides support so that program can
>>be fully aware of paging to and from the disk.  In this case, programs do
>>not allocate virtual memory for disk buffers.  Instead, they allocate virtual
>>pages to be mapped to disk pages.

In article <1989Dec4.154624.22658@sjsumcs.sjsu.edu> 33014-18@sjsumcs.SJSU.EDU (Eduardo Horvath) writes:
>Nice idea, but wouldn't it be a little complicated?  Wouldn't you need to
>design your OS from scratch in such a way as to make files and virtual RAM
>identical?

It can be hacked into an existing OS.  When Tymshare when from TOPS-10 to
TYMCOM-X, they defined a new format for the disk file structure that used
pages instead of blocks.  (A page was defined to be 4 blocks, 2048 bytes.)
All files start on a page boundary.  The file information block is a full
page; big files have pointers to indirect pages.  The bit map is done
by pages.  Directories start out as 7 pages long.  (To find a particular
file, convert the name to an integer, divide by 7, use the remainder to
select one of the 7 pages, do a linear search for the name in that page,
follow the linked list pointer if more not found.  Sort of a nice
compromise between the strictly linear search for most OS's and the
strictly hashed search for AmigaDOS.)

To do I/O to blocks, a module called SIMIO was added to the kernel.  When
a program asked to read in a single block, SIMIO would trap the call,
read in the appropriate page, and blit the data into the user's disk buffer.
For writing one block, SIMIO would read in the appropriate page (only if
it was not already in physical memory), blit the data from the user's disk
buffer into the page, and mark the page as being "dirty".  The general
paging routines would eventually write the page back to disk.

This way all the old programs continued to work, and newer programs could
do mapping calls directly and avoid the context switches to and from SIMIO.
Of course the core routines that allocate physical memory and schedule
disk I/O had to be rewritten, but the majority of the OS routines were
unchanged.

In summary: It is possible to transparently add memory mapped paged disk
I/O to an Operating System.
-- 
Joe Smith (408)922-6220 | SMTP: JMS@F74.TYMNET.COM or jms@gemini.tymnet.com
BT Tymnet Tech Services | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!jms
PO Box 49019, MS-D21    | PDP-10 support: My car's license plate is "POPJ P,"
San Jose, CA 95161-9019 | humorous dislaimer: "My Amiga speaks for me."
Technical Details
Message-ID: <854@doctor.Tymnet.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!wuarchive!usc!jarthur!bridge2!3comvax!tymix!doctor!jms
References: <14059@grebyn.com> <839@tardis.Tymnet.COM> <1989Dec4.154624.22658@sjsumcs.sjsu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!wuarchive!usc!jarthur!bridge2!3comvax!tymix!doctor!jms
From: jms@doctor.Tymnet.COM (Joe Smith)
Newsgroups: comp.sys.amiga.tech
Subject: Re: DMA in VM
Summary: It's been done.
Message-ID: <854@doctor.Tymnet.COM>
Date: 9 Dec 89 04:07:06 GMT
References: <14059@grebyn.com> <839@tardis.Tymnet.COM> <1989Dec4.154624.22658@sjsumcs.sjsu.edu>
Reply-To: jms@doctor.Tymnet.COM (Joe Smith)
Organization: BT Tymnet, San Jose, CA
Lines: 44