Article View: comp.sys.amiga.tech
Article #5368Re: stopping multitasking
From: Valentin Pepelea
Date: Fri, 21 Sep 1990 02:31
Date: Fri, 21 Sep 1990 02:31
35 lines
2299 bytes
2299 bytes
In article <4440@crash.cts.com> lkoop@pnet01.cts.com (Lamonte Koop) writes:
>
> I have a question relating to the use of the system call Forbid() and
> Disable()... I am currently writing a benchmarking program which implements
> several common benchmarks used to time system performance
> If the program uses just forbid(), the timing results for certain tests are
> slower than if just disable() is called...
This is normal. Forbid() allows interrupts to be processed, therefore some of
the time lost is because it is taken away by the interrupts.
> however, if BOTH forbid() and disable() [I just wanted to see the effect]
> are called, some tests (particularly a version of the WritePixel test first
> introduced by CSA) are FASTER, whilst others (my Sieve test) are SLOWER than
> with just one of the calls made....and not by jsut tiny amounts...by a
> second or so. [other tests differ in performance by smaller amounts].
A second *is* a tiny amount. One thing that I must point out is that while
Disable() allows your program to run uninterrupted, the Enable() call might
take a long time to execute, relatively speaking. Thus for quick benchmarks
(smaller than 10 seconds), they useage of Forbid()/Disable() might affect
the performance apparently randomly.
Another thing to point out is that the timer device might not accurately
measure the time, particularly when long Disable()s are in effect. Better
run your benchmarks in a loop, an time them with a wrist watch rather than
the Amiga's internal clock.
Valentin
--
The Goddess of democracy? "The tyrants Name: Valentin Pepelea
may distroy a statue, but they cannot Phone: (215) 431-9327
kill a god." UseNet: cbmvax!valentin@uunet.uu.net
- Ancient Chinese Proverb Claimer: I not Commodore spokesman be
Technical Details
Message-ID:
<14575@cbmvax.commodore.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cbmvax!valentinReferences:
<4440@crash.cts.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cbmvax!valentin From: valentin@cbmvax.commodore.com (Valentin Pepelea) Newsgroups: comp.sys.amiga.tech Subject: Re: stopping multitasking Message-ID: <14575@cbmvax.commodore.com> Date: 21 Sep 90 02:31:04 GMT References: <4440@crash.cts.com> Reply-To: valentin@cbmvax.commodore.com (Valentin Pepelea) Organization: Commodore, West Chester, PA Lines: 35