delorie.com/archives/browse.cgi   search  
Mail Archives: opendos/2000/12/06/13:55:05

To: opendos AT delorie DOT com
Date: Wed, 6 Dec 2000 03:32:04 -0800
Subject: Re: BASIC & EMS (Virtual Memory)
Message-ID: <20001206.033205.-471663.0.domanspc@juno.com>
X-Mailer: Juno 4.0.11
MIME-Version: 1.0
X-Juno-Line-Breaks: 0-63,65-71,73-109,111-114,116-151
X-Juno-Att: 0
X-Juno-RefParts: 0
From: Robert W Moss <domanspc AT juno DOT com>
X-MIME-Autoconverted: from 8bit to quoted-printable by r1.boston.juno.com id GAAAA28231
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id NAA09125
Reply-To: opendos AT delorie DOT com

Sorry Arkady,

The only reference I have found in any of my DOS manuals for 
'VIRTUAL MEMORY' is in reference to M$WINDOWS 3.0-9x. 

All other references are to VIRTUAL DISKS, RAM DISKS, and 
MEMORY DISKS, which are explained in all my DOS books as 
'also known as'.  These Disks can be configured as a disk drive, 
with sector sizes of 128, 256, or 512 bytes.  Size can be from 1 to 
256k unless you put it in expanded or extended memory, where 
it can be up to 32MB in size.  Rootsize  parameter determines 
how many entries the root directory can hold and can be from 
2 to 512 entries. In DR DOS 3.41-6.0 this was done with 
VDISK.SYS, AND IN dr dos 6.0 there was DiskMAX, a collection 
of utilities used for customizing your system. These included 
DELWATCH : Preserves deleted files for later recall. 
(Unless you had a bad habit of accidently erasing files, you 
probably would not want to use this because of excessive 
overhead in memory usage and system speed because it had 
to watch every keystroke.)
DISKMAP : Prepares a map of the disk File Allocation Table. 
SUPER PC-KWIK : Disk Cache utility for speeding file access. 
VDISK : Provides fast RAM as a disk drive.
(Above information from USING DR DOS 6 BY QUE BOOKS & 
NOVELL DOS 7 UNLEASHED BY SAMS Publishing).

I have never used any DOS Utilities Programs that wrote 
Cache Memory to disk.  Since I  am not a programmer I 
never had the need to use anything except what came 
with my various versions of DOS.  I use MEMMAX and 
generally get about 730k of lower memory available.  
Diskmanager gave me about 726K.  WITH IBM PCDOS 7 
I got 750k. I heard once that you should list your devices 
in order from largest to smallest in order to get the largest 
ones in UMB and the smaller ones will fill in to what is left.  
I did that with M$DOS 6.22 and then ran MEMMAX and 
lost 60k.  What I did was redo my config.sys file after using 
MEMMAX the first time.  MEMMAX left all my device entries 
low and never changed any of the Autoexec.bat files it had 
loaded high the first time.  What do I know?  All my 
programs still run fine, either way.

VIRTUAL MEMORY applies to all versions of M$WINDOWS but, 
in particular, I was thinking of M$WIN9X Virtual Memory swap file, 
SWP386. 

What I was referring to here was the use by M$ WINDOWS9x of 
setting aside a SWP386 file on a designated drive (C:\ by default) 
using the startup\settings\control Panel\system\performance\_ 
Virtual Memory tabs. 

Since Windows does not use memory in the same manner that DOS 
does this is another case of "virtualize everything".  WIN9X uses 
the built-in capability of the 386 (and higher) chip to address memory 
using a linear addressing model, also known as a flat memory model, 
that provides access to up to 4GB of RAM.  (This could surely wipe 
out a system with only 768MB of memory or less, and a 4.3GB hard 
drive, "older AT PCs normally use less than 32MB or 16MB or 8MB" 
and a 540MB or 850MB hard drive".)  
This is done by taking advantage of a feature of the 386 chip design 
called PAGING. When the PAGING feature of the 386 is turned on, the 
4GB of potential addresses is divided into 4KB chunks, each of which 
is called a page.  A page table is used to map virtual addresses to 
physical memory locations. The page table is used to keep track of the 
condition of the information of the information stored in physical
memory.

When WIN95 boots up it requires 1MB of memory just for the virtual 
machine manager, the Windows 95 shell, and the normal complement 
of device drivers for the keyboard, video card, and the built-in cache 
VxD that replaced SmartDrive.  In addition , Windows 95 is capable of 
dynamically loading and unloading and unloading device drivers in the 
form of VxDs.  Most of this memory is locked down for the entire session.
 

Eventually, as you continue to work, launching other programs and 
opening other documents, you'll probably reach a point where the 
virtual memory manager is asked to allocate more memory than 
physically exists on the system.  That's when it uses the LRU 
algorithem to determine what can be swapped out to the hard disk.  
Anything that is already on the hard disk, such as  program files, 
 does not have to be written to disk. Windows 95 just has to make a 
note of what was swapped out of RAM.  Information that has been 
changed or has never been written to disk will have to be written out 
to the swap file, because Windows 95 can not determine whether or 
not you will save it at some future time in the session.
(This information was taken from Windows 95 Unleashed, by SAMS 
Publishing.)

With older Windows versions the virtual memory had to be written to 
an uncompressed partition, but with Windows 95 it can be written to 
any partition.   It is preferable to set up a separate partition for the 
SWAP file of a size about 2 or 3 times as large as your system ram, 
and for speeds sake it should not be more than 250MB.  You should  
also set your system to act as a network server rather than a desktop 
computer to take advantage of the different manner in which a server 
handles memory.  You should set graphics to maximum and CD-ROM 
to 4X or better. I got this from Maximum PC Magazine and it works for me.
Of course you who are dedicated DOS users will not get any benefit from
this since you would not get caught dead using *$#@ Windows. 
Personally I mostly use Windows 95 because I can get free IP access, 
but I still have 6 or 7 old computers running DOS and GEOS which I 
use for fun. 

Enough about Windows. I will try to limit myself to DOS in future. 

BOB "DOMAN" MOSS 'Chocolate is a vitamin' 
"Mostly I am an Airhead.  Most of what I write I get from someone else. 
I am a dedicated Plagiarist.  I now have over 400 books in my computer, 
electronics, photography, and religion library, and my wife swears the 
whole thing will fall through the ceiling into the kitchen and squash her

in her kitchen. Since I turned 62 I seem to have forgotten 90% of what I 
previously knew I knew."

On Tue,  5 Dec 2000 04:04:19 +0300 (MSK) "Arkady V.Belousov"
<ark AT belous DOT munic DOT msk DOT su> writes:
> X-Comment-To: Robert W Moss
> 
> Hi!
> 
> 4-δΕΛ-2000 15:42 domanspc AT juno DOT com (Robert W Moss) wrote to 
> opendos AT delorie DOT com:
> 
> RM> Virtual memory is not "memory".  It is the swap space on the
> RM> hard drive which is used to opn up space in real memory by
> RM> copying frequently used information out to the hard disk
> RM> where the program can call it up when needed.
> 
>      Not necessarily. I.e. I mean this is only _one_ way to implement
> virtual memory (VM). VM is a memory which exists as plain memory for
> application which works in this memory, but it should be mapped into 
> some
> physical medium (RAM, disk, etc.). For example, some DOS extenders 
> implement
> swap files to increase available VM, other not.
> 
> RM> It is slow because it is limited to the access speed of the hard 
> drive.
> 
>      _Only if_ part of VM, which must be accessed, currently swapped 
> into
> disk. If all used VM already mapped into phisycal memory then there 
> is no
> drawback, only advantages.
> 
>      Advantages: VM blocks can be moved in the physical memory to 
> avoid
> memory fragmentaion. VM allow to isolate separate application and 
> prevent
> one app memory contents corruption from other app.
> 

________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
http://dl.www.juno.com/get/tagj.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019