home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / AMWP-2.ZIP / DOCS.ZIP / MEMORY.SAM (.txt) < prev    next >
Encoding:
Ami Pro/Word Pro document  |  1990-06-26  |  40.5 KB  |  861 lines

  1. [ver]
  2. [sty]
  3. [files]
  4.     .G03
  5.     .G04
  6.     .G05
  7. [prn]
  8.     PCL / HP LaserJet
  9. [lang]
  10. [desc]
  11.     This file discusses in technical terms memory  management in Windows.  It may help you best configure for Ami Pro.
  12.     646422238
  13.     613193102
  14. [fopts]
  15. [lnopts]
  16.     Body Text
  17. [docopts]
  18. [tag]
  19.     Body Text
  20.     [fnt]
  21.         Courier
  22.         240
  23.         49152
  24.     [algn]
  25.         481
  26.     [spc]
  27.         230
  28.         100
  29.     [brk]
  30.     [line]
  31.     [spec]
  32.         65535
  33.     [nfmt]
  34.         280
  35. [frm]
  36.     537591808
  37.     2313
  38.     6572
  39.     9270
  40.     10516
  41.     16777215
  42.     1233
  43.     6957
  44.     [frmlay]
  45.         10516
  46.         6957
  47.         144
  48.         144
  49.         6716
  50.         144
  51.         109
  52.         28104
  53.         2457
  54.         9126
  55.     [isd]
  56.         .G03
  57.         .sdw
  58.         5175
  59.         62701
  60.         100
  61.         256
  62.         186
  63.         2237
  64.         194
  65.         2237
  66.         202
  67.         2237
  68.         210
  69.         2237
  70.         218
  71.         2237
  72.         226
  73.         2237
  74.         234
  75.         2237
  76.         5494
  77.         65535
  78.         65535
  79.         .sdw
  80. [frm]
  81.     537591808
  82.     2656
  83.     1080
  84.     9845
  85.     5470
  86.     16777215
  87.     1576
  88.     7189
  89.     [frmlay]
  90.         5470
  91.         7189
  92.         144
  93.         144
  94.         1224
  95.         144
  96.         33200
  97.         2800
  98.         9701
  99.     [isd]
  100.         .G04
  101.         .sdw
  102.         6896
  103.         61439
  104.         100
  105.         256
  106.         186
  107.         2237
  108.         194
  109.         2237
  110.         202
  111.         2237
  112.         210
  113.         2237
  114.         218
  115.         2237
  116.         226
  117.         2237
  118.         234
  119.         2237
  120.         5494
  121.         65535
  122.         65535
  123.         .sdw
  124. [frm]
  125.     537591808
  126.     2467
  127.     1770
  128.     9710
  129.     5940
  130.     16777215
  131.     1387
  132.     7243
  133.     [frmlay]
  134.         5940
  135.         7243
  136.         144
  137.         144
  138.         1914
  139.         144
  140.         2611
  141.         9566
  142.     [isd]
  143.         .G05
  144.         .sdw
  145.         6951
  146.         61658
  147.         100
  148.         256
  149.         186
  150.         2237
  151.         194
  152.         2237
  153.         202
  154.         2237
  155.         210
  156.         2237
  157.         218
  158.         2237
  159.         226
  160.         2237
  161.         234
  162.         2237
  163.         5494
  164.         65535
  165.         65535
  166.         .sdw
  167. [lay]
  168.     Standard
  169.     [rght]
  170.         15840
  171.         12240
  172.         1080
  173.         1080
  174.         1080
  175.         1080
  176.         1080
  177.         11160
  178.         3258
  179.         3963
  180.         5405
  181.     [hrght]
  182.     [lyfrm]
  183.         11200
  184.         12240
  185.         1080
  186.     [frmlay]
  187.         1080
  188.         12240
  189.         1080
  190.         1080
  191.         1080
  192.         11160
  193.         2193
  194.         2898
  195.         4698
  196.     [txt]
  197.     [frght]
  198.     [lyfrm]
  199.         13248
  200.         14760
  201.         12240
  202.         15840
  203.     [frmlay]
  204.         15840
  205.         12240
  206.         1440
  207.         14760
  208.         1440
  209.         1440
  210.         10800
  211.     [txt]
  212. @Footer@<+B><:P10,0,>
  213. [elay]
  214.     35 0 31 4 16384 0 0 230 65535 Standard    0 0 0    0 0 0 0 0 0 0 65535 0 0 0 0 0 0
  215. [edoc]
  216. <+B>***************************************
  217. <+B>MEMORY.SAM  -  Ami Professional ver. 1.2b
  218. <+B>***************************************
  219. ------------
  220. ------------
  221. If you are using Microsoft Windows Version 3.0 or higher, please refer 
  222. to the section on "Configuring your System's Memory" in the "Optimizing 
  223. Windows" chapter in the Microsoft Windows User's Guide. The information 
  224. below is specific to Microsoft Windows 286 and 386.
  225. ------------
  226. Introduction
  227. ------------
  228. It's important to understand the way that Microsoft Windows/286 and 
  229. Microsoft Windows/386 use memory to achieve the best performance from 
  230. Ami and Ami Professional.  This section, compiled with the assistance 
  231. of Microsoft, will provide you with information and guidelines to 
  232. best configure your system.
  233. Early microprocessors such as the 8088 and 8086 were designed to address 
  234. 1MB of memory. Subsequent hardware and software developments overcame 
  235. early memory limitations, but also brought into play questions of 
  236. compatibility and performance optimization. 
  237. Memory issues are complex and there are no clear directives for setting 
  238. up your system to optimize performance.  You may need to experiment 
  239. to find  the best way to  customize your system to get the most out 
  240. of Ami Professional.
  241. This section will give you an overview of the different kinds of memory 
  242. and suggest various memory strategies.  The following topics will 
  243. be discussed:
  244.      *     Types of Memory
  245.      *     Expanded Memory
  246.      *     LIMulators
  247.      *     Extended Memory
  248.      *     eXtended Memory Specification(XMS)
  249.      *     RAMdrive and SMARTDrive
  250.      *     Windows Specific Memory Issues
  251.      *     Optimizing Ami and Ami Professional
  252. -------------------------------
  253. Overview--Three Types of Memory
  254. -------------------------------
  255. Your PC may have three types of memory available:  Conventional, Expanded, 
  256. and Extended.
  257.      *     Conventional memory is the first 1MB of an 8086/8088/286/386 
  258. based computer.  It was the only kind of memory available when IBM 
  259. introduced the PC.  When you execute a program, it must execute in 
  260. the first 640K of conventional memory.  The remaining 384K is used 
  261. for hardware devices.
  262.      *     Expanded memory is added to the system and is not part 
  263. of the memory addressed directly by the processor.  This memory is 
  264. accessed and managed through a special hardware/software subsystem.
  265.      *     Extended memory is memory that "extends" above 1 MB and 
  266. is accessed by an 80286 or 80386 processor running in protected mode.  
  267. Note that most computer programs that run under DOS are real mode 
  268. applications and cannot take advantage of extended memory.  The 80286 
  269. and 80386 are "backward" compatible and can run real mode applications 
  270. as well.
  271. The following two sections will discuss in greater detail the way 
  272. Windows and others applications use expanded and extended memory.
  273. ----------
  274. Expanded Memory
  275. ----------
  276. Expanded Memory gives the processor access to more memory than would 
  277. otherwise be available under the DOS 640K-byte limit.  It cannot be 
  278. managed by DOS directly so it uses an Expanded Memory Manager (EMM) 
  279. which is typically loaded through the config.sys file.  The EMM tries 
  280. to find an unused portion of memory in the 384K between 640K and 1MB.  
  281. This portion of memory is called the page frame and is typically 64K 
  282. in size.  The page frame is divided into four 16K pages which are 
  283. used as vehicles to "move" information between conventional memory 
  284. and expanded memory.  After the EMM finds the page frame, it can begin 
  285. to "swap" memory between the 16K pages in the page frame with other 
  286. 16K pages in expanded memory.  There are a number of hardware devices 
  287. which occupy the 384K between 640K and 1MB, and hence place a bigger 
  288. burden on the EMM to find an available page frame.  These devices 
  289. include network adapters, video adapters, and ROM BIOS.  All of them 
  290. take away memory that could otherwise be used by the EMM.
  291. Expanded memory is the most flexible type of memory that a PC can 
  292. have.  Along with being the most flexible, it is also the most complex.  
  293. Since there are a number of system related factors that change or 
  294. restrict the way the EMS can be utilized, it must be fully understood 
  295. before attempting optimization.  Some of the factors that determine 
  296. how EMS will be used include:
  297.      *     which expanded memory specification an application is using 
  298. for storing program code or data
  299.      *     how large an area it can claim for memory manipulation
  300.      *     what kind of adapter cards or memory resident programs 
  301. are installed in the system.
  302. Installing expanded memory is actually installing a closely integrated 
  303. hardware/software subsystem.  The hardware includes a specially designed 
  304. memory board and the software includes the EMM device driver which 
  305. is loaded through the CONFIG.SYS file.  The hardware and software 
  306. operate together to give the user access to more memory than would 
  307. otherwise be available.  Expanded memory has characteristics of both 
  308. a normal memory board and a peripheral device.  It has memory chips, 
  309. but the PC accesses it as though it were an I/O port (like a parallel 
  310. port).  It is because of the way that EMS operates that users may 
  311. have a difficult time envisioning how it works.  Refer to the following 
  312. illustration for a graphical display of how EMS memory looks to the 
  313. processor.<:A0>
  314. ------------------------------------
  315. How Programs Address Expanded Memory
  316. ------------------------------------
  317. Expanded memory is divided into physical pages and logical pages.  
  318. The physical pages are located in the page frame area between 640K 
  319. and 1MB.  The logical pages are located outside the 1 MB address space 
  320. on the EMS memory board.  The EMM utilizes a bank switching technique 
  321. which makes the physical pages "point" to the logical pages.  The 
  322. EMM quickly switches where the physical pages point so that you can 
  323. gain access to more expanded memory than just the 64K page frame.
  324. Here is an example of how an application might use expanded memory.  
  325. When an application starts, it checks to see if any expanded memory 
  326. is available.  If the EMM is active, it will tell the program how 
  327. much memory is available and where the page frame is located.  The 
  328. application then tells the EMM to allocate a certain amount of this 
  329. memory for the application to use.  The EMM in turn allocates the 
  330. memory and provides the application with a "handle."  "Handles" are 
  331. used by the application to access the expanded memory allocated to 
  332. it.  The application can now tell the EMM to put a certain portion 
  333. of data or code into the memory area referred to by the "handle."
  334. There are a number of standards which define the exact specifications 
  335. of the functions performed by the memory manager.  It will be useful 
  336. to explain how these work before we discuss some of the Windows specific 
  337. issues.
  338. ----------
  339. LIM EMS 3.2
  340. ----------
  341. In 1985, in an attempt to allow users to create very large spreadsheets, 
  342. Lotus and Intel, and later Microsoft, teamed up to produce the Lotus-Intel-Microsoft 
  343. Expanded Memory Specification, or LIM EMS 3.2.  This standard, like 
  344. the two following standards, allocated a section of memory within 
  345. the physical address range which could reference additional memory 
  346. located in expanded memory.
  347. Specifications for EMS 3.2 are:
  348.      *     a 64K block of memory for the page frame
  349.      *     the 64K page frame must be contiguous
  350. the page frame is divided into four 16K pages
  351.      *     the page frame must be located in the upper 384K of the 
  352. first 1MB of memory
  353.      *     supports up to 8MB of expanded memory
  354. LIM EMS 3.2 is suitable for accessing large amounts of program data, 
  355. but not large amounts of code.  This is due to the limited size of 
  356. the page frame and because the amount of memory allocated is fixed; 
  357. once an application allocates memory, there is no way to change the 
  358. size of the chunk. 
  359. Since it is cumbersome for an application to manage separate chunks 
  360. of memory, the net effect is that an EMS-aware application, such as 
  361. Microsoft Excel, is likely to pre-allocate as large a chunk of memory 
  362. as it might ever use.  This will tie up memory which cannot be used 
  363. by other EMS-aware applications or by Windows if LIM EMS 4.0 is present. 
  364. All Windows applications use LIM EMS 3.2. The implications of this 
  365. will be explored in the section on Windows strategies.
  366. ----------
  367. ----------
  368. Because of the page frame size limitations which limited the use of 
  369. expanded memory for storing program code in RAM, AST Research developed 
  370. the Enhanced Expanded Memory Specification, EEMS. This standard was 
  371. a superset of EMS 3.2, but required different hardware.  The only 
  372. software to fully exploit its capabilities was the multitasking program 
  373. DESQview.
  374. Specifications for EEMS differed from EMS 3.2 in two respects:
  375.      *     the page frame could be larger than four pages
  376.      *     the page frame could be located anywhere in the first 1MB.
  377. ----------
  378. LIM EMS 4.0
  379. ----------
  380. In 1987, Lotus, Intel, Microsoft and AST combined EEMS and EMS 3.2 
  381. and called it EMS 4.0, which is now the only expanded memory specification.
  382. Specifications for EMS 4.0 are:
  383.      *     page frame of any size up to 1MB
  384.      *     the page frame need not be contiguous
  385.      *     the page frame can be located anywhere within the 1MB address 
  386. space 
  387.      *     can access up to 32MB of expanded memory
  388.      *     is suitable for accessing large amounts of program code 
  389. as well as data because of the larger page frame size
  390.      *     the amount of memory allocated is flexible; once an application 
  391. allocates memory, the application can change the amount.
  392. The advances of LIM EMS 4.0 enable environments such as Windows to 
  393. support multiple large applications in memory simultaneously.  Now 
  394. that we have discussed what the differences are between the various 
  395. EMS standards, we'll take a moment to examine some of the specific 
  396. things that EMS 4.0 provides.
  397. --------------------------------
  398. Bankable vs. Non-Bankable Memory
  399. --------------------------------
  400. Applications which use expanded memory categorize the usable memory 
  401. under 1 MB into two categories:  bankable and non-bankable, depending 
  402. on whether or not the memory can be used as a page frame or not.
  403. ----------
  404. Bankable
  405. ----------
  406. Bankable space is another term used for describing the page frame 
  407. from which Windows and other EMS-aware applications access expanded 
  408. memory.  When a Windows application such as Microsoft Excel is loading, 
  409. the application's program code is loaded into a large page frame which 
  410. resides in conventional memory.  A portion of the program is also 
  411. loaded below the page frame (in non-bankable space) in conventional 
  412. memory.  When the user opens another Windows application such as Ami 
  413. Professional, a "context switch" occurs.  The Microsoft Excel large 
  414. page frame is banked out to EMS memory (the small non-bankable portion 
  415. of Excel is still loaded below the large page frame and stays resident 
  416. until Excel is exited),  and the Ami Professional program code is 
  417. loaded into the, now empty, large page frame area.
  418. The net effect is that during context switches the application is 
  419. banked in from the expanded memory instead of being swapped in from 
  420. disk (as it would normally be without expanded memory) and multiple 
  421. large applications can be used at the same time with virtually no 
  422. performance degradation.
  423. ----------
  424. Non-Bankable
  425. ----------
  426. Some things are never placed into expanded memory page frames, and 
  427. thus use non-bankable memory; MS-DOS, device drivers, TSRs (Terminate 
  428. and Stay Resident Programs), network software, most of Windows itself, 
  429. video adapter memory, and System ROM all use non-bankable memory.  
  430. The more programs that are loaded into non-bankable memory, the smaller 
  431. the bankable area becomes.  For example, parts of each application 
  432. running under Windows cannot be placed in expanded memory so these 
  433. portions of programs further reduce the possible bankable space.  
  434. Since the bankable area is used for the EMS page frame, when the bankable 
  435. area becomes too small, applications will not be able to operate at 
  436. optimal efficiency.
  437. -------------------------------------
  438. Large Page Frame vs. Small Page Frame
  439. -------------------------------------
  440. Knowing what bankable and non-bankable space are, we now need to examine 
  441. more closely the way that Windows utilizes these areas.
  442. When Windows is loaded, it checks to see if any LIM EMS 4.0 memory 
  443. is available.  If it is, Windows will check to see how much bankable 
  444. space is available and allocate as much as possible to the EMS page 
  445. frame.  Depending on how much bankable memory is available, Windows 
  446. may choose to run in Large Page Frame mode or Small Page Frame mode.
  447. ----------
  448. Large Page Frame Mode
  449. ----------
  450. Large Page Frame (LPF) mode designates a large amount(200K+) of the 
  451. bankable area to be set aside for the EMS page frame.  In this mode, 
  452. Windows will load one application into the large page frame and when 
  453. another application is started, the first application will be banked 
  454. out to EMS memory and the new application will be loaded into the 
  455. LPF.  This way, when a context switch occurs, Windows can quickly 
  456. bank the application back into conventional memory to continue execution.  
  457. There is one drawback to using Large Page Frame mode:  when the bankable 
  458. area(EMS large page frame) becomes too small to support an application, 
  459. it will give you an out of memory message, even if there are megabytes 
  460. of free EMS memory.  The extra code and resources that Windows needs 
  461. to perform Large Page Frame operation and the resident portion of 
  462. the active Windows applications occupy non-bankable space and reduce 
  463. the size of the Large Page Frame.  This in turn reduces efficiency 
  464. and may disable a number of an application's features.  Some of the 
  465. Windows features that must reside in conventional/Non-bankable memory 
  466. include the clipboard and DDE conversations, so if you receive a message 
  467. that there is not enough memory for a clipboard transfer, it's because 
  468. the large page frame has reduced the amount of free non-bankable memory 
  469. to a point where the clipboard cannot hold that much data.
  470. Why go to all this trouble to access applications residing in expanded 
  471. memory?  Performance.  Large Page Frame mode offers a way to retain 
  472. more applications in memory (RAM) than would normally be possible; 
  473. that is, you will not have to retrieve an application from disk every 
  474. time you want to use it. The net result is that you will have faster 
  475. access to more applications than you would ordinarily.  Anytime you 
  476. can reduce disk access requirements and thus retrieval time, you will 
  477. see performance benefits.
  478. Large Page Frame mode will typically only cause problems when an EMS-aware 
  479. Windows application such as Excel has been run prior to Ami or Ami 
  480. Professional and memory has run out. If Excel has allocated a specific 
  481. amount of memory, there may not be enough memory to load Ami Professional.
  482. ----------
  483. Small Page Frame Mode
  484. ----------
  485. Small page frame mode only swaps smaller portions of the data and 
  486. code from applications, and hence doesn't experience the same difficulties 
  487. as Large Page Frame mode.
  488. Depending on a number of system factors, Windows may not utilize expanded 
  489. memory as efficiently as it could.  Because Windows is competing with 
  490. other Windows applications for this expanded memory, you may find 
  491. that you will experience an out of memory condition when trying to 
  492. perform a function.  SAMNA recommends starting Windows in small page 
  493. frame mode for optimal performance.  You can use the /N switch to 
  494. start Windows in Small Page Frame mode.  At the C:\>> prompt, type 
  495. WIN /N AMIPRO or WIN386 /N AMIPRO  or AMIPRO /N depending upon what 
  496. version of Windows you have. The recommended way to setup Windows 
  497. is to load the HIMEM.SYS(XMS) driver and start Windows with the /N 
  498. switch.
  499. You can also use the /L switch to put Windows into small page frame 
  500. mode.  The /L switch is used to reserve more memory in the non-bankable 
  501. area.  This also means that you are decreasing the size of the bankable 
  502. (large page frame) area.  When the size of the LPF is reduced to a 
  503. certain size, Windows won't have enough memory to run in large page 
  504. frame mode.  The /L switch is much more dependant on system factors 
  505. than /N.  If you wish to use large page frame mode, but find that 
  506. you need more reserved memory for clipboard transfers or screen fonts, 
  507. you may want to experiment with the /L switch.  /L + 75 is where you 
  508. should start when you begin to optimize your system.  Typically, you'll 
  509. use a value between 20 and 100, but it is completely system dependent.<:A1>
  510. ----------
  511. LIMulators
  512. ----------
  513. Expanded memory is typically added to a system by installing a board 
  514. and its software device driver.  There have been attempts to emulate 
  515. expanded memory in software on 80286's (ATs).  Most of these "LIMulators" 
  516. attempt to emulate expanded memory using extended memory or hard disk 
  517. space.
  518. Because of the hardware components of the EMS standard, LIMulators 
  519. for 286's sometimes have compatibility problems.
  520. The 80386, by contrast, has memory management capabilities that permit 
  521. programmers to write special (protected mode) device drivers that 
  522. essentially change all or a portion of extended memory into expanded 
  523. memory.  These device drivers emulate LIM 3.2 or LIM 4.0 and are typically 
  524. about as efficient as expanded memory requiring special hardware on 
  525. the AT.  There is a LIMulator built into Windows/386 which changes 
  526. all of the extended memory into expanded memory.
  527. Note that some LIMulators are not compatible with HIMEM.SYS (XMS) 
  528. or Windows/386.
  529. ---------------
  530. Extended Memory
  531. ---------------
  532. Extended memory is memory above 1MB. This can only be accessed through 
  533. the protected mode of the 80286 and 80386 microprocessors.  The most 
  534. important distinguishing characteristic between expanded and extended 
  535. memory is that programs that run in real mode cannot directly access 
  536. extended memory.
  537. Protected Mode.  Protected mode is used by the 80286 and 80386 and 
  538. allows access to more memory and functions.  When the processor is 
  539. switched to protected mode, the system can control the operation of 
  540. multiple programs in memory and shift more easily from one task to 
  541. another.  These processors can also run the same programs as the 8088 
  542. and 8086 processors if they run in real mode. 
  543. The primary benefit of having extended memory on a PC running in the 
  544. real mode of DOS is its use as a "RAM DRIVE" or in the case of Windows, 
  545. for SMARTDrive.  A RAM drive is a portion of extended/expanded memory 
  546. that acts just as if it were a disk and SMARTDrive is an "intelligent" 
  547. disk caching utility.  See the RAMDrive and SMARTDrive section.
  548. -----------------------------------
  549. eXtended Memory Specification (XMS)
  550. -----------------------------------
  551. One of the first programs to access extended memory under DOS was 
  552. the RAM disk device driver included with DOS, VDISK.SYS.  Note that 
  553. the XMS scheme described below is incompatible with VDISK.SYS. 
  554. The eXtended Memory Specification(XMS) defines a software interface 
  555. for the 80286 and 80386 that allows real mode application programs 
  556. to use extended memory.  The first implementation of the XMS standard 
  557. is HIMEM.SYS with Windows 2.1. 
  558. Running under DOS, the AT(80286) and the 80386 can actually address 
  559. the first 64K of extended memory past 1 megabyte.  This area is known 
  560. as the High Memory Area, HMA.
  561. When Windows 2.1/2.11 loads part of itself into the HMA region, it 
  562. leaves about 45K more memory for Windows applications and/or the Windows 
  563. "bankable area." When you install Windows/286 and specify that you 
  564. have extended memory, a special version of Windows loads to the hard 
  565. disk.
  566. If you ever see the message, "Your memory configuration has changed..." 
  567.  when you start Windows, this means that at one time you had the XMS 
  568. support version installed and then deleted HIMEM.SYS or removed it 
  569. from the CONFIG.SYS file.  To correct this, you must reinstall Windows 
  570. or put the DEVICE=HIMEM.SYS line back in the CONFIG.SYS file.
  571. You may also get the "memory configuration changed" message if you 
  572. have a RAMDrive or LIMulator that is not compatible with XMS.  One 
  573. such driver is the RAM disk device driver, VDISK.SYS as noted above.<:A2>
  574. -----------------------
  575. RAMDrive and SMARTDrive
  576. -----------------------
  577. Disk cache and RAM disk software are designed to reduce time consuming 
  578. disk access.  Windows includes approved software utilities for enabling 
  579. a disk cache or a ram drive:  SMARTDRV.SYS for disk caching and RAMDRIVE.SYS 
  580. for RAM disks.
  581. ----------
  582. RAM Drives
  583. ----------
  584. RAMDrive is a program that creates a disk in memory.  Since memory 
  585. is much faster than a hard drive, using a ram drive to hold a program 
  586. or a portion of a program will significantly decrease the time it 
  587. takes for that program to load additional pieces of its code.  You 
  588. reference files on a RAM disk just like any other disk.  The most 
  589. practical use for a RAMDrive is to store temporary files.  Temporary 
  590. files are used by some applications such as Ami Professional and Windows 
  591. itself to hold information that can not be stored in memory.  These 
  592. temporary files are typically deleted from your drive as soon as Windows 
  593. is exited.
  594. The RAMDRIVE.SYS driver include with Windows specifically meets the 
  595. unique requirements of the Windows environment.  RAMDRIVE.SYS is compatible 
  596. with the XMS standard and hence is the only RAM disk driver that you 
  597. should use with Windows.
  598. You need to remember three things if you use RAMDrive.  
  599. First, you must store Ami Professional documents to disk, not in the 
  600. RAM drive.  Information written to disk is permanent; information 
  601. written to RAM lasts only as long as the system has power.  If you 
  602. lose power or need to reboot, the information is lost.
  603. Second, if you load an application into the RAM drive with a batch 
  604. file at startup, you must know what application to load for a particular 
  605. user.  If you don't load an application into the RAM drive, you will 
  606. see no particular performance benefits.
  607. Third, the area set aside for a RAM drive is finite.  You can only 
  608. load as many applications as you have room for.
  609. Setting up a RAM drive.  If you want to set up a RAM drive on your 
  610. system, you must include a line for the RAMDRIVE.SYS file in your 
  611. CONFIG.SYS file.  The command would begin by telling DOS that you 
  612. wish to load a device driver.  Begin the command with:  Device=
  613. Then tell DOS exactly where to load RAMDRIVE.SYS followed by the size(Kilobytes) 
  614. followed by the sector size (use 512K) followed by the maximum number 
  615. of directory entries (use 64) and finally the type of memory(expanded 
  616. or extended). A sample command would look like:
  617. device=c:\dos\ramdrive.sys  1152 512 64 /a
  618. This command line tells RAMDrive to create a 1152 KB RAM disk in expanded 
  619. memory, if you want to use extended memory use /e.  If you use expanded 
  620. memory you must load the EMM driver before RAMDRIVE.SYS. 
  621. To setup RAMDRIVE for use with temporary files
  622. Setup RAMDRIVE.SYS as specified above, and then add the following 
  623. line to the AUTOEXEC.BAT file:
  624. TEMP = {Drive letter created by RAMDRIVE}:\
  625. ----------
  626. SMARTDrive
  627. ----------
  628. Windows provides an answer to the disadvantages of RAM drives with 
  629. a utility called SMARTDrive.  SMARTDrive is an intelligent "disk caching" 
  630. utility.  SMARTDrive, like RAMDrive, uses a portion of memory(expanded 
  631. or extended) to improve disk access performance.  Unlike RAMDrive, 
  632. SMARTDrive requires no action (such as specifying which applications 
  633. will use SMARTDrive) on your part to obtain improved performance.
  634. Whenever a Windows application, such as Ami Professional reads or 
  635. writes information to disk, that information also gets stored into 
  636. the memory set aside for SMARTDrive.  Rather than automatically going 
  637. to the disk the next time the application requires information, it 
  638. looks at SMARTDrive to see if the information is there.  If the information 
  639. is there, SMARTDrive provides it.  If not, it looks to disk.  Typically, 
  640. programs access the same information repeatedly, so chances are very 
  641. good that the information is resident in SMARTDrive. When the application 
  642. performs a write operation, it writes information to both the SMARTDrive 
  643. cache and the physical disk.
  644. SMARTDrive offers the same basic performance benefits as a RAM drive, 
  645. but does not require advance knowledge of what applications you want 
  646. to run.  Also, since SMARTDrive will discard contents that haven't 
  647. been used for a while to make room for new information, this resource 
  648. is not finite like a RAM drive.
  649. Installing SMARTDrive.  To install SMARTDrive, you must add a line 
  650. to your CONFIG.SYS.  You would begin the command by telling DOS that 
  651. you wish to install a device driver.  Begin the command line with:
  652. device=
  653. Then tell DOS where to load SMARTDRV.SYS and how many kilobytes to 
  654. allocate in expanded or extended memory.  A sample command would look 
  655. like:
  656. device=c:\SMARTDRV.SYS 512 /a
  657. This command tells SMARTDrive to allocate 512k in expanded memory, 
  658. if you want to use extended memory, don't include the /a.  The directory 
  659. and path, c:\ indicate that SMARTDrive file will be stored in the 
  660. root directory.  If you use expanded memory, you must load the EMM 
  661. driver first, and it is recommended that you set buffers to 10 in 
  662. the CONFIG.SYS file.
  663. If Windows is running low on memory, it can also dynamically re-allocate 
  664. the area of memory reserved by SMARTDrive.
  665. The way Windows applications use memory allows them to be larger than 
  666. the available conventional memory area.  Different program segments 
  667. can be loaded and reloaded on top of each other as they are needed. 
  668. The main EXE file, for example, AMIPRO.EXE, is composed of modules 
  669. which retain their separate identity. Even though these modules are 
  670. linked, they can be loaded in memory independently.  The advantage 
  671. is that any part of the program not needed can reside on disk until 
  672. it is requested.  Since the separate modules of the program are swapped 
  673. so frequently, it is easy to see why the use SMARTDrive can substantially 
  674. improve performance.
  675. ------------------------------
  676. Windows Specific Memory Issues
  677. ------------------------------
  678. ----------
  679. Windows on the 386
  680. ----------
  681. Deciding how to set up Windows with the 80386 has a lot to do with 
  682. the kind of applications you will be running.
  683. ----------
  684. Virtual Mode and DOS Applications
  685. ----------
  686. The 80386 allows multi-tasking for both standard DOS applications 
  687. and Windows applications.  However, these multitasking capabilities 
  688. are achieved differently for DOS applications and Windows applications.
  689. The 386 microprocessor provides a special mode of operation called 
  690. "the virtual 8086" mode.  The virtual mode allows a single 80386 machine 
  691. to contain as many DOS sessions as memory will allow, each of which 
  692. runs in its own "Virtual Machine," or VM.  Windows/386 takes advantage 
  693. of the "virtual 8086" mode of the 80386 microprocessor and provides 
  694. you with an environment which will allow you to switch between DOS 
  695. applications.  You will be able to work with several "virtual machines" 
  696. which can each run a separate DOS program.
  697. Windows/386 runs each old application (i.e. Lotus 1-2-3, dBase III, 
  698. SAMNA Word IV, etc...) in its own VM.  By contrast, Windows and Windows 
  699. applications automatically run in the same virtual machine meaning 
  700. that they all must fit into the same 640K as all other Windows applications.  
  701. Thanks to EMS 4.0 and the way Windows applications are segmented this 
  702. isn't as big a problem as it sounds--the main drawback is still that 
  703. there's only one Windows shareable area.
  704. Windows/386 emulates EMS (expanded memory specification) by turning 
  705. extended memory into expanded memory.  It has a built-in EMS 4.0 LIMulator 
  706. that is compatible with the XMS standard.  The overhead of the virtual 
  707. machine manager extracts about a 5% performance penalty on both Windows 
  708. and non-Windows applications.  It also requires about 200K of extended 
  709. memory when you start Windows.
  710. --------------------------
  711. Strategies for Windows/386
  712. --------------------------
  713. There are a few things you need to consider when you use Windows/386.
  714.      *     You must have at least 2 MB of RAM and preferably 4 or 
  715. more to run Windows/386. 
  716.      *     Windows/386 will co-exist with other expanded memory systems 
  717. and will be available for applications to use outside the 386 environment 
  718. as well.  However, separately controlled EMS will not be used by Windows/386.
  719.      *     If you already have an EMS board, set up the board to use 
  720. extended memory if you want to enhance the performance of Windows/386.
  721.      *     The LIMulator in Windows/386 is incompatible with all other 
  722. LIMulators except for CEMM.SYS from Compaq.  If you use another LIMulator 
  723. you must edit your CONFIG.SYS file and reboot before you use Windows/386, 
  724. and repeat the process after you leave Windows/386.
  725.      *     Use the SMARTDrive software which comes with Windows/386.
  726. ---------------------------
  727. Windows/286 vs. Windows/386
  728. ---------------------------
  729. You may find that you would be better off using Windows/286 with your 
  730. 80386 machine.  The choice between Windows/286 and Windows/386 should 
  731. depend on your application and usage requirements.  Windows/386 is 
  732. best for running multiple DOS applications.  If you need to run multiple 
  733. large Windows applications, especially when your memory configuration 
  734. is tight due to network drivers, TSRs, etc.  Windows/286 in conjunction 
  735. with a LIMulator such as 386Max from Qualitas may provide the best 
  736. environment.
  737. You can prevent Windows/386 from using large page frame mode and thus 
  738. make more memory available under the 640K line by starting Windows/386 
  739. with the command WIN386 /N AMIPRO.
  740. ------------------------------
  741. Memory Optimization Strategies
  742. ------------------------------
  743. ----------
  744. General Rules
  745. ----------
  746. There are a number general rules which will help you optimize your 
  747. Windows setup.  These include setting up SMARTDrive and RAMDRIVE, 
  748. loading HIMEM.SYS, and configuring the WIN.INI file for optimal performance.  
  749. Of course, all of these points do require that you have some type 
  750. of Expanded or Extended memory available.  Below is a list of the 
  751. basic rules:
  752.      *     If Extended memory is available, load HIMEM.SYS.  This 
  753. will enable you to have an extra 45-50K free in the conventional memory 
  754. area.
  755.      *     Memory permitting, use up to 1MB for SMARTDrive.  Use Expanded 
  756. memory if Expanded and Extended are both available.  Expanded memory 
  757. is much faster than Extended memory.
  758.      *     If you have enough RAM, use 2MB(or more) for a Ram Drive, 
  759. and set it up so that it can store temporary files (see the RAMDrive 
  760. section.)  A 2MB Ram Drive is realistically the minimum that should 
  761. be allocated for temporary space.  With less than 2MB to hold temporary 
  762. files, you could get the message "Not enough space on temp drive." 
  763.  This means that there is not enough space available for an operation 
  764. and will require that you exit Windows before attempting the operation 
  765. again. 
  766. Those are the basics of optimizing Windows.  There are a number of 
  767. other factors which will affect the speed at which Windows runs.  
  768. These include:  Video Adapter Type(the lower the resolution and fewer 
  769. colors available, the faster the video adapter will operate), hard 
  770. disk access time(Windows and Ami Professional are both disk intensive), 
  771. CPU speed(the faster the clock rate of the PC, the faster any application 
  772. will run), and finally, memory setup(Expanded memory is much faster 
  773. than Extended memory.)
  774. Below are some tips for the various versions of Windows:
  775. ----------
  776. Single Application (SAE) Windows
  777. ----------
  778. Optimizing your Ami or Ami Professional package is similar no matter 
  779. what version of Windows you are running.  The only note for SAE users 
  780. is to start Windows in small page frame mode.  Since you won't be 
  781. using multiple applications, using small page frame mode will reserve 
  782. all available memory for Ami Professional.  Type AMIPRO /N to start 
  783. SAE Windows in small page frame mode.  
  784. ----------
  785. Windows/286 and Multiple Applications
  786. ----------
  787. Setting up Windows/286 for multiple applications is a little different 
  788. than setting it up for one application.  You may need to use the /L 
  789. switch so that more memory is allocated for Windows functions such 
  790. as the clipboard and DDE conversations.(See Small Page Frame section) 
  791.  The following points are where you should start in optimizing your 
  792. setup.
  793.      *     Use up to 1MB for SMARTDrive, use extended memory if expanded 
  794. and extended are both available.  Although Expanded memory is faster, 
  795. use the extended memory first.  Since LIM EMS 4.0 expanded memory 
  796. is used by Windows to swap applications, the more expanded memory 
  797. that is available (both in EMS and in the bankable area) the more 
  798. applications you can run at one time.
  799.      *     Remove as many device drivers and TSR's(ram resident applications) 
  800. as possible so that Windows will have the largest possible bankable 
  801. area.
  802.      *     Leave all remaining EMS memory for application swapping.
  803. ----------
  804. Windows/386
  805. ----------
  806. Windows/386 is a very special case when attempting to optimize the 
  807. Windows environment.  Since Windows/386 runs only on 80386 based PCs 
  808. with at least 2MB of RAM, just setting up the options as we did above, 
  809. would not take full advantage of the power of Windows/386.
  810. SAMNA does recommend setting up an area of memory for SMARTDrive: 
  811.  between 512K and 1MB depending on your exact memory configuration.  
  812. There isn't a HIMEM.SYS driver for Windows/386 since it uses extended 
  813. memory anyway, however, there are a few options to start Windows/386 
  814. that may have very profound effects on the way Ami and Ami Professional 
  815. operate.
  816. -----------------
  817. Large Page Frames
  818. -----------------
  819. Windows/386 will attempt to use what is called a large page frame 
  820. if there is enough bankable memory available.  Page frame mode looks 
  821. for bankable space to electronically reposition expanded memory into 
  822. the microprocessor address range.  The expanded memory is divided 
  823. into blocks called pages and these are swapped into or out of an area 
  824. of main storage called the page frame.  This page frame effectively 
  825. becomes a window that can look into various blocks of expanded memory.
  826. However, there are some constraints on which determine whether Windows 
  827. uses large page frame mode. They are:
  828.      *     A bank area in the bankable memory region must be at least 
  829. 48 KB in size.
  830.      *     The entire availability of memory in the bank region must 
  831. be at least 280 KB in size.
  832. Large page frame mode lets Windows/386 bank out larger applications 
  833. or larger portions of applications than small page frame mode.  
  834. ------------------
  835. Real Multi-Tasking
  836. ------------------
  837. There are two ways to start Windows/386.  The first is the normal 
  838. way which enables the "Virtual 8086 Mode" of the 80386 chip and provides 
  839. real multi-tasking between applications.  This method is achieved 
  840. by typing WIN386 to start Windows/386.
  841. The second way starts Windows/386 running as a 286.  This method requires 
  842. that you type WIN86 to start it. There are advantages and disadvantages 
  843. to each mode:
  844. WIN386--Starts Windows/386 in "Virtual 8086" mode, supports real multi-tasking.  
  845. This is suggested for use with "old apps."
  846. WIN86--Starts Windows/386 in 286 mode, runs faster than Windows/386 
  847. in native mode, does not support real multi-tasking, suggested for 
  848. use with Windows applications.
  849. The only other setup option that affects Windows/386 is the /N switch.  
  850. This switch starts Windows/386 in small page frame mode.  SAMNA recommends 
  851. that you start Windows/386 in this mode.
  852. ----------
  853. Conclusion
  854. ----------
  855. We hope that this document has helped shed some light on the topic 
  856. of memory and it's usage.  As you can see from reading this text, 
  857. optimizing your memory setup may require some testing with your current 
  858. hardware.  If you should have any further questions regarding how 
  859. memory works and what first steps you should take to optimize your 
  860. configuration, please contact SAMNA Customer Support at (404) 256-2272.
  861.