Optimizing DOS and Windows to run Hiden Applications
The way your PC is configured can have a great effect on the way applications run, and can even cause them to fail or crash. This section deals with general system considerations which can greatly improve performance. - 1. - Optimising DOS and Windows to run Hiden Applications
Current configuration 1. If you are running Windows, exit back to DOS. 3. Check the memory usage by typing mem followed by the Enter key. You will see a report similar to the one below.
Memory Type Total = Used + Free
---------------- ------- ------- -------
Conventional 640K 132K 508K
Upper 139K 139K 0K
Reserved 384K 384K 0K
Extended (XMS) 19,317K 18,293K 1,024K
---------------- ------- ------- -------
Total memory 20,480K 18,948K 1,532K
Total under 1 MB 779K 271K 508K
Largest executable program size 508K (519,808 bytes)
Largest free upper memory block 0K (0 bytes)
MS-DOS is resident in the high memory area.4. This report shows the amount of memory available to Windows (Total memory) and the amount of Conventional memory left after DOS and all its drivers (TSRs) have been loaded. You are advised to have a least 16MByte of RAM to run MASsoft efficiently. Although Windows applications run (mainly) in Extended (XMS) memory, Windows and its application programs require a minimum amount of Conventional (i.e. below the 640K limit) memory in order to run correctly. Consequently, the more Conventional memory shown free the better, and anything less than 500K could cause problems. This also applies to the "Largest executable program size" value. See the section "Releasing Conventional memory" below. 5. Check the DOS Environment variables by typing set followed by the Enter key. In the list of variables you should see a line defining the TEMP folder path such as: TEMP=C:\TEMP
The folder path may point to the DOS or WINDOWS folder, in which case you are advised to change it, otherwise you may find the folder becomes cluttered with temporary files, which can dramatically slow down file access. 6. To change the TEMP folder path create a suitable folder by typing md c:\temp
followed by the Enter key. This creates a folder for storing temporary files. Now edit the AUTOEXEC.BAT file in the root (\) folder to contain the line TEMP=C:\TEMP
(see below) [top]
Altering your configuration Two text files, CONFIG.SYS and AUTOEXEC.BAT, both of which are found in the root (\) folder, can be edited to alter DOS and Windows configurations, and the SYSTEM.INI file in the Windows home folder (normally c:\WINDOWS) alters the Windows configuration. NOTE: Under Windows Me ( Millenium Edition ) you can not edit CONFIG.SYS and AUTOEXEC.BAT as no real mode components are loaded prior to starting Windows.
If you have a favourite DOS editor, you can use that, or you can use the Windows System Configuration Editor application. This program enables you to edit several system configuration files, including AUTOEXEC.BAT, CONFIG.SYS, WIN.INI, SYSTEM.INI, and PROTOCOL.INI, and when changes are made to any of the system files, backups are automatically made of the original files using a .SYD extension (e.g. AUTOEXEC.SYD). You can only run the System Configuration Editor from Windows. In the Start Menu Run command, dialogue type sysedit
into the text box and select OK. The system files will appear in several windows. [top]
Configuring CONFIG.SYS The three configuration variables, FILES, BUFFERS and STACKS should be set to give Windows enough resources. The following are suitable values if you have at least 8MByte of RAM in your PC
FILES=80
BUFFERS=40
STACKS=12,256
If you have less than 8MByte of RAM (not recommended as it will slow MASsoft down), you should set
FILES=60
BUFFERS=30
STACKS=12,256
These are minimum values, and may be increased if required. The maximum value for FILES is 255. EMM386.EXE can be used to allow DOS drivers and TSRs ( Terminate and Stay Resident programs ) to be loaded above conventional memory, thus creating more room for other programs. You do not need to load EMM386 unless you are loading a TSR or need to exclude address ranges. EMM386 should be used with the NOEMS switch to prevent it allocating any expanded memory (EMS). The NOEMS switch enhances Window's performance by making more memory available to it. There are some Windows applications that require EMS memory. If you don't know whether any of your applications need it, try running with NOEMS and if you have problems with any applications remove it. EMM386 must be loaded after HIMEM.SYS. A line loading HIMEM.SYS should already exist in your CONFIG.SYS file; move this line to the start of the file. Find the line with EMM386.EXE in it, or create it if it does not exist, and ensure it has NOEMS as a parameter, as follows: device=c:\dos\emm386.exe noems
Examine your SYSTEM.INI. Look for lines like EMMExclude=C000-CFFF
in the [386Enh] section. If these exist you need to exclude the same ranges from EMM386 device=c:\windows\emm386.exe noems x=c000-cFFF
If more than one address range is excluded there will be an EMMExclude= line for each range; add x= range arguments to EMM386 for each range e.g.
EMMExclude=C000-C7FF
EMMExclude=D000-D7FF
device=c:\windows\emm386.exe noems x=c000-c7FF x=d000-d7ff
Following this, add the line dos=high,umb
unless it already exists. If you specify dos=umb and load EMM386 then instead of the device= command in CONFIG.SYS you can use the devicehigh= command to load device drivers into high memory You can also use the following alternatives to reserve space in high memory
FILESHIGH=80
BUFFERSHIGH=40
STACKSHIGH=12,256
LASTDRIVEHIGH=Z
Likewise in AUTOEXEC.BAT you can precede lines that load TSRs with loadhigh e.g. loadhigh mouse.com
Loading buffers and drivers into high memory releases memory in the first 640K of memory ( Conventional memory ). This is useful if you are using the MS DLC network protocol to communicate with your instrument because MS DLC requires buffer space in conventional memory. However loading into high memory may cause problems with some software ( possibly device drivers or DOS programmes - standard Windows applications should not have any problems ). If you experience problems revert to loading into low memory. Don't forget to save the changes to config.sys before you exit the editor. [top]
Configuring AUTOEXEC.BAT You should ensure that there is a designated folder specifically for temporary files. Check that there is a line set temp=c:\temp
somewhere in the file. If there is no line defining the TEMP variable, add one to the file. If another folder is being used (c:\dos is typical), alter the line to be as shown above. If you have more than one disk drive create the \temp folder on the drive with the most free space. In the absence of a TEMP variable definition, Windows will use c:\ or an application's working folder for temporary file storage. The temporary folder should not be DOS, since all the system files are stored there. The folder c:\temp must exist, of course, and if it doesn't, you must create it (see below). Don't forget to save the changes to autoexec.bat before you exit the editor. You must ensure that the folder c:\temp exists. If it does not, create it using the Explorer File New Folder command, or from DOS, type md c:\temp
followed by the Enter key. TSRs ( Terminate and Stay Resident programs ) are now seldom used, but if you do load any in your AUTOEXEC.BAT file then they can be made to load into high memory by preceding the command with loadhigh or lh e.g. loadhigh mouse.com
To use loadhigh you must have loaded EMM386.EXE in your CONFIG.SYS file, and must have the dos=umb command in there too. loadhigh can be used to load MSDLC into high memory: loadhigh c:\windows\net initialize loadhigh c:\windows\msdlc.exe loadhigh c:\windows\net start
[top]
Configuring SYSTEM.INI The only variable which should be adjusted in SYSTEM.INI is the maximum number of break points which are used for switching betwee DOS and Windows. This helps with continuous GPF (General Protection Fault) errors, and avoids system resources being consumed. Find the [386Enh] section. Somewhere in the section add the line MaxBPs=768
unless it's already present. The value should be reduced to MaxBPs=500
if you are running QEMM Memory Manager. Don't forget to save the changes to config.sys before you exit the editor. If the COM1fifo= entry in the [386Enh] section of System.ini is zero, this indicates that FIFO buffering in the 16550 UART is disabled. This should be re-enabled: Go to the control panel. Select System. The System Properties dialogue is displayed. Choose the Device Manager tab. Find Ports (COM & LPT). Click on + to expand the tree. Select Communications Port 1 (COM1). The Communications Port (COM1) Properties dialogue is displayed. Select the Port Setting tab. Click on the Advanced... button. Make sure that the Use FIFO buffers (requires 16550 compatible UART) check box is selected. Adjust sliders for faster performance. The Receive Buffer setting should be at three quarters . Ok all the dialogue boxes and reboot. Check that the COM1fifo= entry in SYSTEM.INI has changed to 1 after rebooting. If not then delete the line and reboot again.
This should speed up the PCs COM port [top]
Changing the Virtual Memory settings Windows uses a section of the hard disk to temporarily store areas of RAM until they are needed back in memory. This disk space is referred to as the swap file. This file can be large. If you have more than one hard disk drive, or multiple partitions, it is advantageous to have it on the drive with the most free space. Before you change the drive you should run the hard drive optimization program Disk Defragmenter in the System Tools on the drive to which the swap file is to be moved. To change the drive double click on the System Icon. In the System Properties dialogue select the Performance tab. Click on the Virtual Memory button 
Select Let me specify my own virtual memory setting and select the drive or partition required. [top]
Disk Maintenance Disk maintenance should be done at regular intervals. You may wish to set up Windows Scheduled Tasks to perform these operations. The programs to perform Disk Maintenance are found in Programs / Accessories / System Tools from the Start Menu, or by right clicking on a drive in Explorer and selecting Properties. Weekly Run ScanDisk. This program will find and repair hard drive problems. Delete temporary files from the hard drive to enhance system performance. Disk Cleanup in System Tools will remove most temporary files. Note that there may be temporary files in other directories. Try using Find Files to look for all files with the extension .TMP by searching for files called *.tmp. These should also be deleted. If you have set up a folder for temporary files and set the correct path in the AUTOEXEC.BAT file as described above, you will only have to delete the temporary files from these other directories occasionally. Monthly Every month or two, run the disk optimization program such as Disk Defragmenter in System Tools (DEFRAG.EXE).
[top]

|