home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mega CD-ROM 1
/
megacd_rom_1.zip
/
megacd_rom_1
/
DESQVIEW
/
TAME261.ZIP
/
TAME.DOC
< prev
next >
Wrap
Text File
|
1991-02-18
|
72KB
|
1,850 lines
Tame
Release 2.6
Multi-tasking Enhancement Software
(C) 1988-1991 by PowerSoft, Inc. and David G. Thomas
Table of Contents
Tame Users Guide .............................................. 1
Abstract ................................................... 1
Shareware Notice: .......................................... 1
Disclaimer ................................................. 1
Why do you need Tame? ...................................... 2
How does Tame work? ........................................ 2
Applications that definitely NEED Tame ..................... 3
Seeing if your applications need Tame ...................... 3
Running Tame ............................................... 4
If your program runs slower with Tame ...................... 5
If your program is not being Tamed ......................... 6
Placing Tame in a batch file ............................... 6
Using Tame with other multi-taskers ........................ 6
Advanced Tame concepts ..................................... 7
Setting the frequency value ................................ 9
Setting default options .................................... 10
Applications that are DESQview-aware ....................... 10
The Tame status ............................................ 12
Tame Command Reference ........................................ 14
Task switching options ..................................... 14
Fine tuning for an application ............................. 16
Other options .............................................. 20
Multi-tasking Specifics ....................................... 22
DESQview ................................................... 22
Double Dos ................................................. 22
Omniview ................................................... 22
Topview .................................................... 22
VM/386 ..................................................... 22
Windows 3.0 and Windows/386 ................................ 22
Application Specifics ......................................... 23
Installing Tame Upgrades ...................................... 25
Appendix ...................................................... 26
Appendix A Common Questions ............................... 26
Tame Users Guide
Release 2.6
Copyright 1988-1991 by PowerSoft, Inc.
and David G. Thomas
Abstract
If you run programs under a multi-tasking environment, such as
DESQview, you may have noticed that some programs slow down the whole
system, even when they seem to be doing nothing but waiting for you to
type something. When I first encountered this, I accepted it as a
part of the price of multi-tasking. TAME proves that you need not pay
that price. TAME reduces significantly the overhead of many programs
without hindering their performance.
Tame works in any MS-DOS based multi-tasking environment. It contains
special hooks for use under DESQview, Double Dos, Omniview, VM/386 and
Windows 3.0. It may work with other multi-taskers as well. If you
use it with another multi-tasker, please let me know whether it helps.
Shareware Notice:
This copyrighted material may be distributed freely for evaluation.
It is not free, however. The decision to keep the program after an
evaluation period of 30 days is a decision to buy the program for
$20.00 from the author. For that registration fee you will receive a
registered copy of the latest version of the program with some more
features enabled, a printed manual, and a right to use all future
versions of TAME. Please send payment to:
David G. Thomas
c/o PowerSoft, Inc.
P.O. Box 956338
Duluth, GA 30136
You may address questions and comments to the author at the PowerSoft
BBS, (404) 928-9294. The latest release of Tame is posted there.
Registered users may register each new version of Tame using a utility
program provided with the registration kit.
Disclaimer
As with all shareware, you use TAME at your own risk. Neither
PowerSoft, Inc. nor David G. Thomas makes any warranties, express or
implied with respect to TAME's merchantability or fitness for any
particular purpose, nor is either liable for any harm which may come
from the use of TAME.
----------------------------------------------------------------------
Release 2.6 February, 1991 Page 1
Why do you need Tame? Tame Users Guide
----------------------------------------------------------------------
Why do you need Tame?
A PC-based application is designed to run under DOS. The application
acts as if it is the only program that is running in the computer. It
spends most of its time waiting on you to tell it what to do next
(i.e. it is waiting for you to press a key or move the mouse), and
relatively little time carrying out your instructions. While it is
waiting on your input, it spends its time checking the various devices
that you may use to provide that input. It checks if you have pressed
a key. If you are using a mouse, it checks to see if the mouse has
been moved. Then it checks again for a key, and the cycle continues.
This is called polling, and it continues until you actually do
something it is waiting for. In just a few seconds between pressing
keys, the application may poll the keyboard hundreds of times.
All this activity uses a lot of processing time, but it is really not
wasteful under plain old DOS. After all, there is only one program in
memory, and the central processing unit (CPU) has nothing better to do
anyway.
But when you are multi-tasking, keyboard polling wastes processing
cycles. The CPU could be more usefully applied to other tasks that
are actively working (printing, spell-checking, etc...). This is
especially true if a program is polling the keyboard in the background
while you are trying to work in the foreground. The system feels (and
is) much slower than if the background program were not there.
This is where Tame can help. If your background program were Tamed,
it would not be allowed to affect your performance while polling the
keyboard. Tame detects that it is polling, and instructs the
multi-tasker to move on to other tasks that may be more actively
working. You may configure Tame to go so far as to instruct the
multi-tasker not to waste any more time on a background task until it
is brought into the foreground. Other Tame options may be used to
help it correctly identify and deal with programs that are wasting
your CPU by polling the keyboard.
How does Tame work?
Tame works by monitoring what a program does. When the program is not
doing anything except polling the keyboard, Tame notices. After
enough polls, Tame can see that the program is wasting time and tells
the multi-tasker to move on to the next task. Eventually, the
multi-tasker will come back to this task. At this point, Tame will be
less patient than before, and switch tasks as soon as the program
starts polling again.
When the program does something active, like processing keyboard
input, performing disk I/O or changing the video screen, Tame takes
----------------------------------------------------------------------
Page 2 February, 1991 Release 2.6
Tame Users Guide Applications that definitely NEED Tame
----------------------------------------------------------------------
note that it is active, and boosts its priority for about a tenth of a
second. This will prevent Tame from causing a task switch during that
period of time.
Applications that definitely NEED Tame
The following applications will continually poll the keyboard, waiting
for you to press a key. Tame has been proven to significantly reduce
the overhead on all these applications. For each application listed
here, there are probably 100 more that need Tame!
See the end of this document for special options that may be desirable
with these programs.
Brief, by solution Systems
EM4105
Epsilon
Harvard Graphics
Kedit, by Mansfield Computing
Lucid 3D, by PCSG
Lotus 123, by Lotus Development Corp.
Lotus Agenda, by Lotus Development Corp.
Lotus Manuscript, by Lotus Development Corp.
Microsoft editor, by Microsoft
Norton Commander, by Peter Norton Computing
PCBOARD, by Clark Development Company, Inc.
Plan Perfect by Word Perfect Corp.
Sidetalk, by Lattice
Telix by Exis Inc.
Tornado Notes by Micro Logic Corp
Wildcat BBS Systems
Word Perfect, by Word Perfect Corp.
Word Perfect File Manager
ZCOMM, by Omen Technology
Seeing if your applications need Tame
Any program that uses CPU cycles looking for keyboard input needs
Tame. The best way to see if a program does this is to run a simple
test. You should test all your favorite programs that you spend time
entering data with. This includes programs such as word processors,
spreadsheets, editors, and DOS shells.
One way to see if a program needs tame is to use Tame to run the
program, and see what happens. You may evaluate whether or not Tame
is effective by looking at statistics generated with the Tame command,
or you may use one of the many standard CPU benchmarks to test its
effectiveness.
To test a program with Tame, be sure you are in DESQview or another
supported multi-tasking system, and type the following command line.
----------------------------------------------------------------------
Release 2.6 February, 1991 Page 3
Running Tame Tame Users Guide
----------------------------------------------------------------------
TAME-RES
Now, run your program, and work in the program for a little while,
then exit normally. Type the following command line to obtain a
summary of Tame activity.
TAME /STATUS
The displayed totals include the number of keyboard polls that the
program performed. If this number small or zero, then Tame may not be
needed with the application. With some extremely keyboard-hungry
programs, the number of keyboard polls can number into the thousands.
A second, and more direct way to test the effectiveness of Tame is to
run the application without Tame, and simultaneously run tame with the
/Geiger option in another task. This is done with the following
command.
TAME-RES
TAME /GEIGER
You will hear ticks that indicate how loaded the CPU is. If the ticks
slow considerably when you are in the application, it probably needs
Tame. If this is the case, run TAME-RES, and re-run the application.
The ticks probably do not slow nearly as much as before. This is
because Tame keeps your background tasks running at nearly full speed,
at least while you are not actively needing the CPU.
If you don't trust the Geiger counter that is built into Tame (you may
think that I have "loaded the dice"), try a more standard CPU
benchmark, such as Norton's System Information (SI) program. To do
this, load Tame in one task, then execute your program in that same
task. Wait until the application is idle, and waiting for keyboard
input. Your program is now being Tamed. Now, switch to another task
and run the benchmark program. Try this again without Taming the
first program (Either type TAME /OFF or TAME /Uninstall). If the
benchmark indicates that the CPU is faster with Tame, then you know it
is helping. Also, experiment with which program is in the
foreground and which is in the background. This experiment is
necessary if you have set the DESQview background task priority to a
very low number. In any event, it is informative, since it indicates
the amount of processing time that the background can get while you
are using that application.
Running Tame
Tame is run inside a task while running a multi-tasker. Do not run
Tame before running the multi-tasker. While no harm will come if you
do, it also will not be effective. Tame must be run for each task
that is to be tamed.
----------------------------------------------------------------------
Page 4 February, 1991 Release 2.6
Tame Users Guide If your program runs slower with Tame
----------------------------------------------------------------------
Tame is composed of a resident (TSR) program, and also a controlling
program. The resident portion of Tame must be loaded before running
the main Tame program. This is done with the TAME-RES command. For
example, the following command lines will run Lotus 123 with Tame
active.
TAME-RES
LOTUS
If you always want Tame to be used, you may create a batch file
(possibly named RUNLOTUS.BAT), with the following command lines.
TAME-RES
LOTUS
A general purpose variation of this batch file comes with Tame, and is
named TAME-RUN.BAT. Using the batch file, the following command line
will do the same thing as the previous examples.
TAME-RUN LOTUS
If you normally execute the program with the DESQview "Open Window"
menu, you will need to modify the definition of the window. To do
this, use the "CP" (for Change Program) option of the "Open Window"
menu, and change the Program to TAME-RUN (or your custom batch file)
and add what was previously the Program to the beginning of the
command line parameters.
The TAME-RES command has some of the functionality of the TAME-RUN
command built into it, with a few restrictions. It must run a .COM or
.EXE file, and the full path name of the program must be specified.
For example, the following will Tame Lotus without using a batch file.
TAME-RES C:\123\LOTUS.COM
A variation of this syntax is available when a "cloned" TAME-RES is
being used. In this case, you may preset the Tame options that work
best with LOTUS, and automatically invoke LOTUS whenever the cloned
copy of TAME-RES is run.
If your program runs slower with Tame
In some cases, the program may initially run slower (or "feel" choppy)
with Tame installed. This is frequently corrected by a few steps that
will tune Tame for the application. First, try specifying the
/Frequency parameter (described below) to increase the number of polls
allowed before Tame tries to switch tasks. Try /Frequency without a
value to let Tame estimate its a good value based on the speed of your
system. In some cases, changing /Frequency will have little effect if
/KeyIdle is also specified. This is the case with most well-behaved
programs that issue the keyboard idle interrupt.
----------------------------------------------------------------------
Release 2.6 February, 1991 Page 5
If your program is not being Tamed Tame Users Guide
----------------------------------------------------------------------
If the program prints very slowly, try the /PARallel option. This
allows Tame to watch the parallel port, and will not invoke a task
switch while the port is being used. For example, the following
command lines should be used to run Word Perfect.
TAME-RES
TAME /PARALLEL
WP
If your program is not being Tamed
Sometimes, adding Tame has little or no affect. In most cases, a
little tuning can help. Try /Boost:0 to tell tame to not disable
itself when it sees activity. If this works, you may also want to try
/Boost:2,0.
In a few cases, Tame is not capable of helping. But these situations
are rare, and if you run into one, please let me know. I will most
likely be able to tweak Tame to make it work.
Placing Tame in a batch file
If you run your application with a batch file, you may like to add
Tame to that batch file. The only problem here is the fact that
different programs like different Tame options, and also some programs
will run other programs using a DOS Shell. Tame has special options
for dealing with this situation. The following batch file will run
Lotus 123, and will restore the original Tame parameters before
exiting.
:* It is assumed that TAME-RES
:* has already been loaded
:*
TAME /GETALL:TAME_123 /ON /MAX:3,0
123
TAME %TAME_123%
SET TAME_123=
Using Tame with other multi-taskers
Tame has special hooks to work very effectively with DESQview,
Windows, Omniview, VM/386, Double Dos and Topview compatibles. Tame
may be used with other multi-tasking environments, but may not be
quite as effective. Also, you may need to include a command line
option to specify the method that Tame should use to give idle time to
the other tasks. The /KeySwitch method will be effective with
programs that are polling the keyboard, and are not polling any other
devices. It may not be compatible with some applications such as
communications programs. The /HaltSwitch option is compatible with
most programs, but may not be effective, depending upon the
multi-tasking software being used. In either case, run Tame as
----------------------------------------------------------------------
Page 6 February, 1991 Release 2.6
Tame Users Guide Advanced Tame concepts
----------------------------------------------------------------------
normal, and Tame will default to the /HaltSwitch task switching
option. The following command will run Lotus 123 in an environment
that is not directly supported.
TAME-RES
LOTUS
If you use a multi-tasker that Tame is not effective with, I would
like you to contact me. I need to know some technical data regarding
how to detect and control the multi-tasker. If it is feasible, I will
add direct support for that multi-tasker to the Tame product.
Advanced Tame concepts
Tame works by detecting when a program is continually polling the
keyboard, and does its best to allow the multi-tasking software to
switch to another task. It detects that a program is polling the
keyboard after 3 successive keyboard polls that occur within 1/18 of a
second, and during that time, the program does not write to the screen
or issue any DOS requests. When the application polls the keyboard a
fourth consecutive time, Tame checks one last time for a key-press,
and if a key was not pressed, it tries to switch the task.
This threshold may be increased or decreased using the /FREQUENCY:n,m
option, where n is the main threshold. The n parameter specifies how
many consecutive polls that may occur in a single PC clock tick before
Tame switches tasks. There are 18.2 clock ticks per second, so the
"true" frequency is actually 18.2 times the value of n. If n is too
low, then Tame will switch tasks while the application really is
working. If it is too high then Tame may never switch tasks.
Unfortunately, a "one size fits all" value of n is not possible, since
it depends largely on the speed of the machine, as well as the
software that is being used.
A reasonable value for n will be computed by Tame if you specify
/Frequency with no parameters. This is done using a very crude
formula based on the speed of the CPU. Since the CPU speed
measurement can take a few seconds, it is recommended that this
feature be used only one time, and an actual value is specified on
subsequent runs.
The /FREQUENCY option restricts the time period that Tame is allowed
to count keyboard polls. This allows Tame to measure the amount of
real work that the application is doing, where more polls per clock
tick are associated with less actual work being done by the
application.
In some instances, it may not be appropriate to watch the clock while
accumulating keyboard polls. This is the method that Tame used prior
to release 2.2, and is very effective in many instances. It also
happens to be much more easily tuned, since the values do not normally
----------------------------------------------------------------------
Release 2.6 February, 1991 Page 7
Advanced Tame concepts Tame Users Guide
----------------------------------------------------------------------
depend on the speed of the machine. This may be done by specifying
/MAX:n,m option, where n is the main threshold. If n or m is much too
low, then Tame will switch tasks while the application really is
working. If it is too high then Tame will not switch tasks until long
after the program has settled into a polling pattern, reducing the
effectiveness of Tame for a brief period after each key is pressed.
Since most programs are capable of polling 100 to 300 times per
second, these parameters indirectly correspond to an "idle time limit"
that is enforced by Tame.
After Tame detects excessive keyboard polling, a second threshold is
used. This threshold is normally much smaller than the initial
threshold, and defaults to 2. In effect, Tame will allow 3 keyboard
polls, switch tasks, and then switch tasks on every third successive
keyboard poll until a key is pressed, or the program does something
besides poll the keyboard. This allows the first threshold to be
raised to a high number to accommodate some programs, without
significantly sacrificing the effectiveness of Tame. In most cases,
the default of 2 for the second threshold is adequate, but it can be
lowered all the way to zero if desired. It may be changed by
specifying a second parameter of the /Max or /Frequency option.
Some applications will grab the timer interrupt that always occurs
18.2 times per second. In many cases, this interrupt takes a lot of
processing time, but really provides very little utility. To avoid
wasting processing time servicing the timer interrupt, you may prevent
the application from controlling the timer interrupt by specifying the
/NOTIMER option. In many cases, the timer interrupt may be used to
keep a clock running on the screen. This clock may not be worth much
to you when you consider the amount of processing time it uses. For
example, the following commands will run the Brief editor, (as long as
the auto-save feature of Brief is disabled), and will gain a
significant amount of processor time for background processes.
TAME-RES
TAME /NOTIMER
B
Some applications spend a lot of time polling the system clock,
normally for the purpose of an maintaining an on-screen clock while it
is waiting for other devices to have a character ready. The /TIMEPOLL
option instructs Tame to treat the date and time query in a manner
similar to the keyboard poll, and yield the time slice after
successive date or time queries. The following commands run PCBOARD,
which keeps an on-screen clock while waiting for the communications
port.
TAME-RES
TAME /TIMEPOLL
PCBOARD
----------------------------------------------------------------------
Page 8 February, 1991 Release 2.6
Tame Users Guide Setting the frequency value
----------------------------------------------------------------------
Most applications will also benefit by specifying /NoBackGround. This
option is only available with DESQview, and should not be used with
communications programs. When this option is set, Tame will set the
task to not run in the background when it is polling. This will
completely shut down the task until it is brought into the foreground.
When the task becomes active again, Tame will restore the task status,
to again allow it to run in the background. This automatic mode
switching is extremely effective with most application programs.
Setting the frequency value
Tame will compute a nominal value for the frequency threshold when you
specify /Frequency with no parameters. This is done using a very
crude formula based primarily on the speed of the CPU. In many cases,
this number is adequate. However, when computing this number, Tame
does not factor in any special characteristics of a specific
application program. To tune the frequency for a specific
application, some real measurements are needed.
To do this, you may use a program called TAME-ANL that watches the
program run, and generates a more detailed summary. In its report
file, you will see a tick-by-tick count of key polls. Since you can
see the actual poll rate, it should be easy to set the frequency. See
the TAME-ANL.DOC file for more details in running this program.
A more traditional approach is also possible. Start by closing all
tasks except a single task that is at the DOS prompt. There is a
batch file named TAMETUNE.BAT that comes with the Tame distribution
archive. Run this batch file and supply the name of the application
as an argument. This batch file will simply clear Tame totals, and
then run the application. Run the batch file, and bring the
application to its normal input state as soon as is possible. Let it
remain idle for at least ten seconds. During this time, Tame is
counting actual keyboard polls. After waiting ten seconds, exit the
program as quickly as possible. Tame will display a total number of
polls per clock tick that occurred while you were in the application.
Since you know that you were idle during most of that time, this
number represents that rate which the application is capable of
polling the keyboard. A good value to specify for the frequency
parameter is between ¼ to ½ of the measured poll rate.
----------------------------------------------------------------------
Release 2.6 February, 1991 Page 9
Setting default options Tame Users Guide
----------------------------------------------------------------------
Setting default options
A special version of TAME-RES with custom options may easily be
created. This is done by specifying the default options, and then
using the /CLONE option. This creates a new program that may be used
in place of the TAME-RES and TAME command combination. The following
example creates TAME-123.COM which defaults to the /NoBG and
/FREQ:20,2 options.
TAME-RES
TAME /NoBG /FREQ:20,2
TAME /CLONE:TAME-123
Later, to load Tame resident and run Lotus 123, the following commands
could be used.
TAME-123
123
Alternatively, the following command could be used.
TAME-123 C:\123\123.EXE
Since this cloned version of Tame is set up with options specifically
tuned for 123, then we may wish to place the 123 command into the new
COM file. This is very convenient since it allows the Tamed version
of 123 to be run with a simple command. This may be done using the
following commands.
TAME-RES
TAME /NoBG /FREQ:20,2
TAME /CLONE:123T 'C:\123\123.EXE'
Note that this creates a modified version of TAME-RES.COM that will
automatically run the 123 command - it does not modify the 123.EXE
file in any way.
Later, to run Tame and Lotus 123, the following command may be used.
123T
The /Clone command does not save the multi-tasker into the cloned
command file. This allows the same command to be used with many
different multi-taskers, but when Tame has difficulty detecting your
multi-tasker, you may wish to clone it into the program. To do this,
simply specify the multi-tasker on the command line before /Clone.
The following example will create a file named TAME-OV.COM which may
only be run with Omniview.
TAME /OMNIVIEW /CLONE:TAME-OV
Applications that are DESQview-aware
Most sophisticated programs poll the keyboard. A few of these
programs have made themselves DESQview-aware, meaning that they
----------------------------------------------------------------------
Page 10 February, 1991 Release 2.6
Tame Users Guide Applications that are DESQview-aware
----------------------------------------------------------------------
recognize and work with DESQview. Most are sufficiently DESQview
aware to run in a window, but still hog the CPU (e.g. Brief by
Solution Systems). These programs need Tame as much as ones that are
not DESQview-aware. To be fully DESQview-aware, the application must
release its time slice while it is polling the keyboard. Tame is not
needed when one of these fully-aware programs are used in DESQview.
Unfortunately, very few programs are fully DESQview-aware. In fact, I
only know of two programs that seem to be. Hopefully more programs
will follow. When they do, Tame can transfer their DESQview-awareness
into Windows-awareness, or awareness of any other supported
multi-tasker. This is done by specifying the /DVAWARE option. When
all programs that are run in a specific window will be DESQview-aware,
you may turn off the options that cause automatic recognition of
polling programs. The following command line tells Tame that all the
programs will be DESQview-aware.
TAME /DVAWARE /NKP /NKI /NTP
It is possible that a program uses DESQview/Topview functions that are
not supported with Tame. Tame can fool these programs into thinking
they are in DESQview, but if they try unsupported functions, they may
crash the system. If this happens, please let me know.
----------------------------------------------------------------------
Release 2.6 February, 1991 Page 11
The Tame status Tame Users Guide
----------------------------------------------------------------------
The Tame status
The /Status option prints many statistics that Tame accumulates while
running. These statistics are interesting to see, and they may also
be useful for tuning Tame and the multi-tasker. This is a sample
status report.
TAME release 6.50 (Non-Registered version)
Copyright 1988-1990 by PowerSoft, Inc and David G. Thomas
Tame Totals - Running in DESQview Task #2
Key Polls = 21,575
Time polls = 21,262
Task switches = 10,658
NoBG requests = 1,043
Elapsed Time = 4,172 seconds
(Active=7 Polling=29 Input=0 Yielded=4,137 Boost=3)
Poll rate = 10 polls per second
1 polls per tick
66 polls per running tick
Options: /ON /NoBackGround:10 /NoTimer /TimePoll /KeyPoll /NoSerial
/NoParallel /NoKeyIdle /NoDVAware /Freq:20,2 /Boost:2,2
The following measurements are included in the report.
Key Polls The total number of times the program polled to see if
a key has been pressed.
Time Polls The total number of times the program called DOS
requesting the current date or time.
Task Switches The number of times that Tame has forced a task switch.
NoBG Requests The number of times that Tame instructed DESQview run
this program only when it is in the foreground, not in
the background. This number can sometimes get very
high because Tame has no way to know if the program is
currently in the foreground, and, if it is, DESQview
will ignore the request.
Elapsed Time The total time that Tame has been running. This time
is measured in seconds. Tame does its best to break
the time down into useful categories which are shown on
the next line.
----------------------------------------------------------------------
Page 12 February, 1991 Release 2.6
Tame Users Guide The Tame status
----------------------------------------------------------------------
Active The amount of time the task was active doing real work.
Due to limitations in the measurement capabilities of
Tame, this may also include some time that was actually
spent in other tasks. This can happen when the
multi-tasker switches tasks before Tame sees a need to,
which is the normal case when the task is working very
hard. The measurement will be fairly accurate except
times when this task is working hard and other tasks
are also working very hard at the same time.
Polling The amount of CPU time this task spent polling the
keyboard.
Input The amount of time this task spent waiting for input.
This is different than polling because the task
specifically requested to not receive control until a
key has been pressed. This is the normal case when
waiting at the DOS prompt, unless Tame or another
program is monitoring the idle interrupt (INT 28h).
Yielded The amount of time that Tame has yielded to other
tasks. It is a measure of the time difference between
when Tame switches tasks, and when control is returned
to tame. Presumably, each other task has had a time
slice during this time.
Poll Rate This is the ratio of total polls (Key-polls plus
Time-polls) that has occurred per second, per tick and
per running tick. A tick is a measure that is internal
to the PC, and there are 18.21 ticks per second. The
total number of running ticks is a sum of active time
plus polling time, multiplied by 18.21 ticks per
second. The polls per running-tick is an indicator as
to how fast the program normally polls.
----------------------------------------------------------------------
Release 2.6 February, 1991 Page 13
Task switching options Tame Command Reference
----------------------------------------------------------------------
Tame Command Reference
Task switching options
The main purpose of Tame is to switch to another task when it detects
that the application is wasting time polling the keyboard. With
DESQview, Windows, Omniview, Topview, VM/386 and Double Dos, the
native pause function is used to switch tasks. Since Tame does not
have specific support for other multi-taskers, you need to set the
task switching method for these other multi-taskers. The following
options specify the method that Tame should use in order to switch
tasks.
........
/DESQVIEW Use the native DESQview task switching method.
........
/DOUBLEDOS Use the native Double DOS task switching method.
........
/HaltSwitch The /HaltSwitch option specifies that Tame should
execute a HLT instruction when polling is detected.
This instruction has been found to cause some
multi-taskers to immediately switch to another task.
This is the default task switching method when Tame
does not recognize the multi-tasker.
........
/KeySwitch The /KeySwitch option specifies that when the program
polls the keyboard, Tame should tell a white lie and
say that a key has been pressed. Most applications
will immediately read the key that Tame claimed was
already pressed. Since it really was not pressed, DOS
will wait for a key to be pressed. Most multi-taskers
use this wait for a key press as a queue to switch
tasks.
The /KeySwitch option could be the most effective task
switching method in Tame, but it will not work with
some applications. Specifically, it will not work with
any applications that poll devices other than the
keyboard, or with programs that occasionally flush the
keyboard buffer. It is also not effective in
Windows/386.
........
/DVAware This switch helps Tame work with programs that are
DESQview-aware (or Topview-aware) but are not
necessarily aware of other environments such as
Windows. Using this option instructs Tame to recognize
and emulate a few of the critical DESQview/Topview
system functions in another environment. If you know
----------------------------------------------------------------------
Page 14 February, 1991 Release 2.6
Tame Command Reference Task switching options
----------------------------------------------------------------------
that the program is DESQview-aware, you may also turn
off automatic taming by specifying /NoKeyPoll and
/NoTimePoll.
........
/OMNIVIEW Use the native Omniview task switching method. This
requires that Omniview is set up to be Topview
compatible.
........
/TOPVIEW Use the native Topview task switching method.
........
/VM386 Use the native VM/386 task switching method which
happens to be the same as /HaltSwitch.
........
/WINdows Use the native Windows task switching method. This is
effective with Windows 3.0 and Windows/386.
----------------------------------------------------------------------
Release 2.6 February, 1991 Page 15
Fine tuning for an application Tame Command Reference
----------------------------------------------------------------------
Fine tuning for an application
The default Tame options will work well with most programs. However,
portions of some programs will run slower with Tame. With other
programs, Tame may not reduce the CPU overhead, even though the
program polls the keyboard. The following options may be specified in
order to adjust the effects of Tame on a specific application program.
........
/Boost:n,m This option is intended to prevent Tame from slowing
the application. It will boost the priority of the
task for n clock ticks after each key press, and m
clock ticks after each DOS or video action. Both
values default to 2. You may need to decrease the
second value to zero if Tame does not seem to be
effective.
........
/INT15 This option improves the effectiveness of Tame with
some programs, but it does not work on all computer
systems. In fact, with some machines, it will lock up
the system.
This option may be turned off by specifying /NoINT15.
........
/NoBG:n This option can be very effective with DESQview, and
/FGonly:n will be ignored if another multi-tasking system is
being used. When this option is specified, Tame will
patiently do a normal task switch n times. If no
activity is detected, then it will instruct DESQview to
temporarily run this program only while it is in the
foreground. As soon as this program is brought to the
foreground, Tame will instruct DESQview to again allow
it to execute in the background.
This option is extremely effective in preventing idle
background processes from slowing performance of
working processes. However, since its net effect is to
completely stop the task (if it is in the background),
it is very sensitive to how well the /Frequency or /Max
parameters are tuned. It also will not be effective
with background tasks which may remain idle for a
period of time, and become active based on external
events (e.g. communications program).
This option may be turned off by specifying /NoFGonly
or /BackGround.
----------------------------------------------------------------------
Page 16 February, 1991 Release 2.6
Tame Command Reference Fine tuning for an application
----------------------------------------------------------------------
........
/Freq:n,m This option may need to be used in order to fine-tune
Tame. It sets n as the number of consecutive keyboard
polls per clock tick that are acceptable before Tame
decides that the program is doing no other work except
polling the keyboard. This number defaults to 3. If
this number is too low, then Tame may switch tasks
while the program is really working. Specifying
/Frequency with no parameters will allow Tame to
compute a reasonable value based on the speed of the
CPU. Since some application programs poll the keyboard
at a high rate (even while they are working), so this
option does not always provide advantages over /Max.
........
/KeyIdle:n This option works well with many programs that are
gracious enough to inform DOS that it is somewhat idle
while it polls the keyboard. When Tame detects this
idle situation, it will temporarily lower the /Max or
/Frequency threshold to n. This seems to work
especially well with programs that always inform DOS
when it is idle, and the standard threshold can be set
to -1, telling Tame to never switch tasks unless the
application confirms that it is really idle.
Beginning with DESQview release 2.26, this option is
not recommended for tasks that spend a lot of time at
the DOS prompt. This is because DESQview detects the
fact that Tame is watching the idle interrupt, and when
at the DOS prompt, DESQview goes out of its way to make
sure the idle interrupt is called, wasting some
processing time unnecessarily. This option is still
very effective inside some programs, and the problem
only occurs at the DOS prompt.
This option may be turned off by specifying /NoKeyIdle.
........
/NoKeyPoll This option instructs Tame to not look at keyboard
polls. This may be useful with some programs that poll
the keyboard whether they are working or not, but they
poll the date or time only during keyboard input. In
this case, it may be best to switch tasks based on the
/TimePoll switch, and ignore all key polls.
This option may be reversed with /KeyPoll.
----------------------------------------------------------------------
Release 2.6 February, 1991 Page 17
Fine tuning for an application Tame Command Reference
----------------------------------------------------------------------
........
/Max:n,m This option may need to be used if the application
seems to run slower with Tame. It sets n as the number
of consecutive polls that are acceptable before Tame
decides that the program is simply polling while
waiting for input. If this number is too low, then
Tame may switch tasks while the program is really
working. If you suspect that the program (or a
particular aspect of the program) is slower with Tame,
raise this number. Parameters as high as a few
thousand may be needed in some cases. Note that the
/Frequency parameter may be used in place of /Max, and
/Frequency is generally more effective.
The second number may optionally be specified in order
to change the number of consecutive polls that Tame
uses to switch tasks after it has already determined
that the program is in a polling mode.
Either n or m may be -1, which indicates that Tame
should not cause a task switch based upon polling
alone. This is effective with programs that issue the
keyboard idle interrupt while they are polling the
keyboard, and will prevent Tame from switching tasks
from intermittent keyboard polls.
In some cases, changing /Max will have no apparent
effect when /KeyIdle is also specified. This is the
case with most well-behaved programs that issue the
keyboard idle interrupt.
........
/NoTimer This option prevents the application from processing
the timer interrupt that is normally issued by the PC
18.2 times per second. This option may disable some
features of the program, and should be used with
caution. It is very useful with programs that use a
lot of CPU processing the timer interrupt, and
accomplish little.
This option works by intercepting the programs request
to be called by the timer interrupt. The program
assumes it will be called on a regular basis by the
timer interrupt, but, since Tame did not pass this
request on to DOS, the program will never be called by
the interrupt.
This option may be turned off by specifying /Timer.
----------------------------------------------------------------------
Page 18 February, 1991 Release 2.6
Tame Command Reference Fine tuning for an application
----------------------------------------------------------------------
........
/PARallel This option instructs Tame to watch BIOS level parallel
port accesses, and if the port is frequently being
used, do not allow a task switch. This option is not
normally needed except with programs that bypass DOS in
accessing the printer. It should be used only when it
is really needed.
........
/SERial This option instructs Tame to watch BIOS level serial
port accesses, and if the port is frequently being
used, do not allow a task switch. This option is not
normally needed except with programs that use the
serial port (e.g. comm programs, bulletin boards,
etc...). It should be used only when it is really
needed.
........
/TimePoll This option instructs Tame to consider a request for
the current time to be similar to a keyboard poll.
This works well with programs that constantly update an
on-screen clock. This option may have no effect when
/KeySwitch is specified. It is recommended that the
second /Max or /Frequency parameter have a minimum
value of 2 when /TimePoll is specified.
This option may be turned off by specifying
/NoTimePoll.
----------------------------------------------------------------------
Release 2.6 February, 1991 Page 19
Other options Tame Command Reference
----------------------------------------------------------------------
Other options
........
/CLeaR Zero the totals that Tame displays on the status
report.
........
/CLONE:file This command will make a special version of
TAME-RES.COM that has customized default parameters.
The currently active defaults will be placed into the
cloned program. In all cases, the /CLONE option should
be the only command line option that is specified. The
cloned program is specified with the file value, and
should be named TAME-xxx where xxx is an abbreviation
for the application name. The new TAME-xxx.COM may be
run in place of the TAME-RES.COM and TAME.EXE duo that
is frequently needed when starting up a new task.
........
/CLONE:f,c This command will make a special version of
TAME-RES.COM that has customized default parameters,
and also will automatically run a specific command.
The currently active defaults will be placed into the
cloned program. In all cases, the /CLONE option should
be the only command line option that is specified. The
new COM may be run in place of the TAME-RES.COM,
TAME.EXE and program combination that is frequently
needed when starting up a new task. Note that f is the
name of the new COM file (without the .COM suffix), and
c is the full path name of the EXE or COM style command
that is to be run.
........
/Geiger:p,t,f, This option starts up a sound that is similar to a
h Geiger counter. This sound speeds up when the system
is idle, and slows as other tasks demand CPU resources.
It is a very useful tool for monitoring the
effectiveness of Tame, since it allows you to monitor
the amount of CPU that an application will use with and
without Tame.
There are three optional parameters that may be
specified. The p parameter sets amount of time between
each Geiger tick. The default value is based on the
speed of the CPU.
You can set the geiger to use very little CPU as long
as Tame is loaded and tuned. This allows the geiger to
monitor total system CPU usage, but is not very useful
for tuning Tame. This is done by specifying a negative
value for p to set the real time between each tick in
----------------------------------------------------------------------
Page 20 February, 1991 Release 2.6
Tame Command Reference Other options
----------------------------------------------------------------------
1/18 second increments. Setting it to -1 will make a
tick each 1/18 of a second. Its only value in tuning
Tame is in the fact that it will simulate a heavy
keyboard poller, and may help you adjust the settings.
Setting p to zero will give a tick each time this task
gets a time slice, but the zero setting requires
TAME-RES to be loaded.
The t parameter sets the amount of time each tick
takes. The default is based on the speed of the CPU.
When t is zero, a faint tick may still be heard. The f
parameter sets the frequency of the ticks, in Hertz.
The h parameter can turn on an on-screen hickey that
visually supplements the sounds. The h parameter
specifies how often to move the hickey relative to the
tick sounds, where 1 means move it on each tick, two
for every other tick, etc.
........
/GETALL:var Get the current Tame parameters, and place them into an
environment variable named var. This option is
designed for use in a batch file, in order to restore
the Tame parameters after running a program.
This option has been tested with DOS versions 3.1 and
3.3, but it will not work with DOS 3.2. I hope to
correct this problem with a future release. If you are
running a multi-tasker with DOS 2.0, I strongly
recommend you upgrade to DOS 3.x so you can take
advantage of the protections provided with the SHARE
command.
........
/OFF Temporarily disable Tame, but leave it in memory for
later use.
........
/ON Enable Tame task switching. Tame is on by default.
........
/Status Display a summary report. The summary includes the
number of task switches that were initiated by Tame,
the total number of keyboard calls that the application
made, and also a summary of the current options.
........
/Uninstall Remove the resident portion of Tame from memory.
----------------------------------------------------------------------
Release 2.6 February, 1991 Page 21
DESQview Multi-tasking Specifics
----------------------------------------------------------------------
Multi-tasking Specifics
DESQview
Tame will automatically detect the presence of DESQview, and will use
its native task switching method. Tame has been tested with DESQview
versions 2.01 through 2.31, and appears to work well with all
versions.
If you set the /Frequency parameter correctly, the /NoBackGround
option is strongly recommended with most application programs. It
will prevent idle background programs from affecting performance.
Tame is most effective with DESQview when QEMM and DESQview are
combined on an 80386 based PC. Tame will also be effective on a
machine with an 8088 or 80286 and should be used with many programs
that do not have special DESQview loaders.
Double Dos
Tame will automatically detect the presence of Double Dos, and will
use its native task switching method.
Omniview
Omniview should be set up to be 'Topview compatible'. Tame cannot
tell the difference between Omniview and other Topview compatibles.
After loading TAME-RES, run TAME with the /OMNIVIEW option. I
recently obtained the Omniview developers toolkit, and may be adding
native Omniview support in the near future.
Topview
After loading TAME-RES, run TAME with the /TOPVIEW option.
VM/386
Tame does not specifically detect VM/386. After loading TAME-RES, you
should run TAME with the /VM386 option.
Windows 3.0 and Windows/386
Tame will automatically detect the presence of Windows, and will use
its native task switching method. When the /FREQ option is used, the
optimal value may vary drastically from the value used with other
multi-taskers.
Tame can be much more effective than the idle detection that is built
into Windows. When using Tame, it is best to disable Windows idle
detection for each window that uses Tame. Also, if you had previously
set a window to run with a low background priority, you may wish to
raise it and let Tame decide when it really needs the CPU.
----------------------------------------------------------------------
Page 22 February, 1991 Release 2.6
Application Specifics Application Specifics
----------------------------------------------------------------------
Application Specifics
Most applications may be run with Tame without any special parameters.
However, for best results, certain command line parameters may be
desirable for some applications. The following table represents the
benefits and effects of recommended command line parameters for each
program when run under DESQview. In most cases, tuning Tame so that
/FREQuency and /NoBackGround may be used is strongly recommended.
Results may vary with other multi-taskers.
----------------------------------------------------------------------
Release 2.6 February, 1991 Page 23
Application Program Application Specifics
----------------------------------------------------------------------
Application Recommended Results &
Program options Side effects
Brief (use defaults) About 75% of the CPU overhead is
eliminated.
Brief /NoTimer /KeyIdle Nearly all the CPU overhead is
eliminated.
On screen clock and auto-save
feature are disabled.
Info Select /NoKeyPoll Nearly all the CPU overhead is
/TimePoll eliminated
Kedit (use defaults) Nearly all of the CPU overhead is
eliminated.
Lotus 123 (use defaults) Nearly all the CPU overhead is
eliminated.
Lotus Agenda (use defaults) Nearly all the CPU overhead is
eliminated.
Lotus /NoTimer /Max:-1 Nearly all the CPU overhead is
Manuscript /KeyIdle eliminated.
Lucid 3D (use defaults) Nearly all the CPU overhead is
eliminated.
Microsoft (use defaults) Nearly all the CPU overhead is
Editor eliminated.
Norton (use defaults) Nearly all the CPU overhead is
Commander eliminated.
Tame will also cover programs that
are run by the shell.
PCBOARD /TimePoll About 75% of the CPU overhead is
eliminated.
Quick C /NoTimer Nearly all of the CPU overhead is
eliminated.
Side effects (if any) of /NoTimer
have not been determined.
Sidetalk (use defaults) About 75% of the CPU overhead is
eliminated.
Tornado Notes /NoKeyPoll Nearly all the CPU overhead is
/TimePoll eliminated
Word Perfect /Parallel About 75% of the CPU overhead is
eliminated.
ZCOMM /Serial About 75% of the CPU overhead is
eliminated.
----------------------------------------------------------------------
Page 24 February, 1991 Release 2.6
Installing Tame Installing Tame Upgrades
Upgrades
----------------------------------------------------------------------
Installing Tame Upgrades
The latest release of Tame will be continuously posted on the
PowerSoft bulletin board system at (404) 928-9294. Also, since Tame
is distributed as a shareware program, the latest release will
normally be available on a local bulletin board.
If you are a registered user, you have paid for a perpetual license,
and may register each new version of Tame using a utility program that
is provided with your registration kit. This utility may be run
completely from the command line. For example, the following command
line will register Fred Smith if the password of ABCD is correct.
TAME-REG "Fred Smith" ABCD
If you prefer, the registration program may be run without specifying
any arguments, and you will be prompted for the information.
----------------------------------------------------------------------
Release 2.6 February, 1991 Page 25
Common Questions Appendix
----------------------------------------------------------------------
Appendix
Appendix A Common Questions
1. What can I do to speed up the system while transferring files over
a modem in the background?
While one task is uploading or downloading, it requires attention from
the CPU at very regular intervals. In fact, it needs the CPU 240
times per second at 2400 baud. DESQview cannot task switch much
faster than that, so as soon as the multi-tasker is switched away from
the task, another character needs to be serviced and it needs to
switch back again. The system doesn't have much free time to get
other things done during the file transfer. This explains the
problem, and there are some solutions.
Using a NS16550AFN chip in place of the NS16450 that is on your com
board can help some, as long as your software supports it. You may
wish to set its threshold to 8. This means that the CPU will need to
service the file transfer only about 30 (240 / 8) times per second at
2400 baud. This can reasonably be done on most systems.
It will also help to use a modem that has an internal buffer (e.g.
Multitech 224e) and connect to the modem to the computer at 19,200
baud, even though the connection is at a lower (e.g. 2400) baud rate.
In this scheme, the CPU may send and get bursts to/from the modem,
freeing the CPU for other tasks between bursts. While the CPU is
actively sending/receiving with the modem, the CPU will be almost
entirely dedicated to that transfer. Limiting the transfer to bursts
at a high transfer rate will slow the rest of the system much less
than a continuous slow-speed burst.
2. A program is DESQview-aware. Does that mean I don't need Tame?
Many programs are DV aware - but that only means that they recognize
that DV is there and they do what is necessary to run in a window on
non-386 machines. It does not mean that they are DV "polite" and do
what they can to efficiently share the limited resources. The bottom
line is that most (nearly all??) DV-aware programs need Tame as much
as ones that are not DV-aware.
----------------------------------------------------------------------
Page 26 February, 1991 Release 2.6