<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- permission is obtained from the copyright holder. -->
|
<!-- permission is obtained from the copyright holder. -->
|
<HTML
|
<HTML
|
><HEAD
|
><HEAD
|
><TITLE
|
><TITLE
|
>Kernel Real-time Characterization</TITLE
|
>Kernel Real-time Characterization</TITLE
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
<META
|
<META
|
NAME="GENERATOR"
|
NAME="GENERATOR"
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
"><LINK
|
"><LINK
|
REL="HOME"
|
REL="HOME"
|
TITLE="eCos Reference Manual"
|
TITLE="eCos Reference Manual"
|
HREF="ecos-ref.html"><LINK
|
HREF="ecos-ref.html"><LINK
|
REL="UP"
|
REL="UP"
|
TITLE="The eCos Kernel"
|
TITLE="The eCos Kernel"
|
HREF="kernel.html"><LINK
|
HREF="kernel.html"><LINK
|
REL="PREVIOUS"
|
REL="PREVIOUS"
|
TITLE="Interrupt Handling"
|
TITLE="Interrupt Handling"
|
HREF="kernel-interrupts.html"><LINK
|
HREF="kernel-interrupts.html"><LINK
|
REL="NEXT"
|
REL="NEXT"
|
TITLE="RedBoot™ User's Guide"
|
TITLE="RedBoot™ User's Guide"
|
HREF="redboot.html"></HEAD
|
HREF="redboot.html"></HEAD
|
><BODY
|
><BODY
|
CLASS="REFENTRY"
|
CLASS="REFENTRY"
|
BGCOLOR="#FFFFFF"
|
BGCOLOR="#FFFFFF"
|
TEXT="#000000"
|
TEXT="#000000"
|
LINK="#0000FF"
|
LINK="#0000FF"
|
VLINK="#840084"
|
VLINK="#840084"
|
ALINK="#0000FF"
|
ALINK="#0000FF"
|
><DIV
|
><DIV
|
CLASS="NAVHEADER"
|
CLASS="NAVHEADER"
|
><TABLE
|
><TABLE
|
SUMMARY="Header navigation table"
|
SUMMARY="Header navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TH
|
><TH
|
COLSPAN="3"
|
COLSPAN="3"
|
ALIGN="center"
|
ALIGN="center"
|
>eCos Reference Manual</TH
|
>eCos Reference Manual</TH
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="kernel-interrupts.html"
|
HREF="kernel-interrupts.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="80%"
|
WIDTH="80%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="redboot.html"
|
HREF="redboot.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"></DIV
|
WIDTH="100%"></DIV
|
><H1
|
><H1
|
><A
|
><A
|
NAME="KERNEL-CHARACTERIZATION">Kernel Real-time Characterization</H1
|
NAME="KERNEL-CHARACTERIZATION">Kernel Real-time Characterization</H1
|
><DIV
|
><DIV
|
CLASS="REFNAMEDIV"
|
CLASS="REFNAMEDIV"
|
><A
|
><A
|
NAME="AEN2068"
|
NAME="AEN2068"
|
></A
|
></A
|
><H2
|
><H2
|
>Name</H2
|
>Name</H2
|
>tm_basic -- Measure the performance of the eCos kernel</DIV
|
>tm_basic -- Measure the performance of the eCos kernel</DIV
|
><DIV
|
><DIV
|
CLASS="REFSECT1"
|
CLASS="REFSECT1"
|
><A
|
><A
|
NAME="KERNEL-CHARACTERIZATION-DESCRIPTION"
|
NAME="KERNEL-CHARACTERIZATION-DESCRIPTION"
|
></A
|
></A
|
><H2
|
><H2
|
>Description</H2
|
>Description</H2
|
><P
|
><P
|
>When building a real-time system, care must be taken to ensure that
|
>When building a real-time system, care must be taken to ensure that
|
the system will be able to perform properly within the constraints of
|
the system will be able to perform properly within the constraints of
|
that system. One of these constraints may be how fast certain
|
that system. One of these constraints may be how fast certain
|
operations can be performed. Another might be how deterministic the
|
operations can be performed. Another might be how deterministic the
|
overall behavior of the system is. Lastly the memory footprint (size)
|
overall behavior of the system is. Lastly the memory footprint (size)
|
and unit cost may be important.
|
and unit cost may be important.
|
</P
|
</P
|
><P
|
><P
|
>One of the major problems encountered while evaluating a system will
|
>One of the major problems encountered while evaluating a system will
|
be how to compare it with possible alternatives. Most manufacturers of
|
be how to compare it with possible alternatives. Most manufacturers of
|
real-time systems publish performance numbers, ostensibly so that
|
real-time systems publish performance numbers, ostensibly so that
|
users can compare the different offerings. However, what these numbers
|
users can compare the different offerings. However, what these numbers
|
mean and how they were gathered is often not clear. The values are
|
mean and how they were gathered is often not clear. The values are
|
typically measured on a particular piece of hardware, so in order to
|
typically measured on a particular piece of hardware, so in order to
|
truly compare, one must obtain measurements for exactly the same set
|
truly compare, one must obtain measurements for exactly the same set
|
of hardware that were gathered in a similar fashion.
|
of hardware that were gathered in a similar fashion.
|
</P
|
</P
|
><P
|
><P
|
>Two major items need to be present in any given set of measurements.
|
>Two major items need to be present in any given set of measurements.
|
First, the raw values for the various operations; these are typically
|
First, the raw values for the various operations; these are typically
|
quite easy to measure and will be available for most systems. Second,
|
quite easy to measure and will be available for most systems. Second,
|
the determinacy of the numbers; in other words how much the value
|
the determinacy of the numbers; in other words how much the value
|
might change depending on other factors within the system. This value
|
might change depending on other factors within the system. This value
|
is affected by a number of factors: how long interrupts might be
|
is affected by a number of factors: how long interrupts might be
|
masked, whether or not the function can be interrupted, even very
|
masked, whether or not the function can be interrupted, even very
|
hardware-specific effects such as cache locality and pipeline usage.
|
hardware-specific effects such as cache locality and pipeline usage.
|
It is very difficult to measure the determinacy of any given
|
It is very difficult to measure the determinacy of any given
|
operation, but that determinacy is fundamentally important to proper
|
operation, but that determinacy is fundamentally important to proper
|
overall characterization of a system.
|
overall characterization of a system.
|
</P
|
</P
|
><P
|
><P
|
>In the discussion and numbers that follow, three key measurements are
|
>In the discussion and numbers that follow, three key measurements are
|
provided. The first measurement is an estimate of the interrupt
|
provided. The first measurement is an estimate of the interrupt
|
latency: this is the length of time from when a hardware interrupt
|
latency: this is the length of time from when a hardware interrupt
|
occurs until its Interrupt Service Routine (ISR) is called. The second
|
occurs until its Interrupt Service Routine (ISR) is called. The second
|
measurement is an estimate of overall interrupt overhead: this is the
|
measurement is an estimate of overall interrupt overhead: this is the
|
length of time average interrupt processing takes, as measured by the
|
length of time average interrupt processing takes, as measured by the
|
real-time clock interrupt (other interrupt sources will certainly take
|
real-time clock interrupt (other interrupt sources will certainly take
|
a different amount of time, but this data cannot be easily gathered).
|
a different amount of time, but this data cannot be easily gathered).
|
The third measurement consists of the timings for the various kernel
|
The third measurement consists of the timings for the various kernel
|
primitives.
|
primitives.
|
</P
|
</P
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="REFSECT1"
|
CLASS="REFSECT1"
|
><A
|
><A
|
NAME="KERNEL-CHARACTERIZATION-METHODOLOGY"
|
NAME="KERNEL-CHARACTERIZATION-METHODOLOGY"
|
></A
|
></A
|
><H2
|
><H2
|
>Methodology</H2
|
>Methodology</H2
|
><P
|
><P
|
>Key operations in the kernel were measured by using a simple test
|
>Key operations in the kernel were measured by using a simple test
|
program which exercises the various kernel primitive operations. A
|
program which exercises the various kernel primitive operations. A
|
hardware timer, normally the one used to drive the real-time clock,
|
hardware timer, normally the one used to drive the real-time clock,
|
was used for these measurements. In most cases this timer can be read
|
was used for these measurements. In most cases this timer can be read
|
with quite high resolution, typically in the range of a few
|
with quite high resolution, typically in the range of a few
|
microseconds. For each measurement, the operation was repeated a
|
microseconds. For each measurement, the operation was repeated a
|
number of times. Time stamps were obtained directly before and after
|
number of times. Time stamps were obtained directly before and after
|
the operation was performed. The data gathered for the entire set of
|
the operation was performed. The data gathered for the entire set of
|
operations was then analyzed, generating average (mean), maximum and
|
operations was then analyzed, generating average (mean), maximum and
|
minimum values. The sample variance (a measure of how close most
|
minimum values. The sample variance (a measure of how close most
|
samples are to the mean) was also calculated. The cost of obtaining
|
samples are to the mean) was also calculated. The cost of obtaining
|
the real-time clock timer values was also measured, and was subtracted
|
the real-time clock timer values was also measured, and was subtracted
|
from all other times.
|
from all other times.
|
</P
|
</P
|
><P
|
><P
|
>Most kernel functions can be measured separately. In each case, a
|
>Most kernel functions can be measured separately. In each case, a
|
reasonable number of iterations are performed. Where the test case
|
reasonable number of iterations are performed. Where the test case
|
involves a kernel object, for example creating a task, each iteration
|
involves a kernel object, for example creating a task, each iteration
|
is performed on a different object. There is also a set of tests which
|
is performed on a different object. There is also a set of tests which
|
measures the interactions between multiple tasks and certain kernel
|
measures the interactions between multiple tasks and certain kernel
|
primitives. Most functions are tested in such a way as to determine
|
primitives. Most functions are tested in such a way as to determine
|
the variations introduced by varying numbers of objects in the system.
|
the variations introduced by varying numbers of objects in the system.
|
For example, the mailbox tests measure the cost of a 'peek' operation
|
For example, the mailbox tests measure the cost of a 'peek' operation
|
when the mailbox is empty, has a single item, and has multiple items
|
when the mailbox is empty, has a single item, and has multiple items
|
present. In this way, any effects of the state of the object or how
|
present. In this way, any effects of the state of the object or how
|
many items it contains can be determined.
|
many items it contains can be determined.
|
</P
|
</P
|
><P
|
><P
|
>There are a few things to consider about these measurements. Firstly,
|
>There are a few things to consider about these measurements. Firstly,
|
they are quite micro in scale and only measure the operation in
|
they are quite micro in scale and only measure the operation in
|
question. These measurements do not adequately describe how the
|
question. These measurements do not adequately describe how the
|
timings would be perturbed in a real system with multiple interrupting
|
timings would be perturbed in a real system with multiple interrupting
|
sources. Secondly, the possible aberration incurred by the real-time
|
sources. Secondly, the possible aberration incurred by the real-time
|
clock (system heartbeat tick) is explicitly avoided. Virtually all
|
clock (system heartbeat tick) is explicitly avoided. Virtually all
|
kernel functions have been designed to be interruptible. Thus the
|
kernel functions have been designed to be interruptible. Thus the
|
times presented are typical, but best case, since any particular
|
times presented are typical, but best case, since any particular
|
function may be interrupted by the clock tick processing. This number
|
function may be interrupted by the clock tick processing. This number
|
is explicitly calculated so that the value may be included in any
|
is explicitly calculated so that the value may be included in any
|
deadline calculations required by the end user. Lastly, the reported
|
deadline calculations required by the end user. Lastly, the reported
|
measurements were obtained from a system built with all options at
|
measurements were obtained from a system built with all options at
|
their default values. Kernel instrumentation and asserts are also
|
their default values. Kernel instrumentation and asserts are also
|
disabled for these measurements. Any number of configuration options
|
disabled for these measurements. Any number of configuration options
|
can change the measured results, sometimes quite dramatically. For
|
can change the measured results, sometimes quite dramatically. For
|
example, mutexes are using priority inheritance in these measurements.
|
example, mutexes are using priority inheritance in these measurements.
|
The numbers will change if the system is built with priority
|
The numbers will change if the system is built with priority
|
inheritance on mutex variables turned off.
|
inheritance on mutex variables turned off.
|
</P
|
</P
|
><P
|
><P
|
>The final value that is measured is an estimate of interrupt latency.
|
>The final value that is measured is an estimate of interrupt latency.
|
This particular value is not explicitly calculated in the test program
|
This particular value is not explicitly calculated in the test program
|
used, but rather by instrumenting the kernel itself. The raw number of
|
used, but rather by instrumenting the kernel itself. The raw number of
|
timer ticks that elapse between the time the timer generates an
|
timer ticks that elapse between the time the timer generates an
|
interrupt and the start of the timer ISR is kept in the kernel. These
|
interrupt and the start of the timer ISR is kept in the kernel. These
|
values are printed by the test program after all other operations have
|
values are printed by the test program after all other operations have
|
been tested. Thus this should be a reasonable estimate of the
|
been tested. Thus this should be a reasonable estimate of the
|
interrupt latency over time.
|
interrupt latency over time.
|
</P
|
</P
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="REFSECT1"
|
CLASS="REFSECT1"
|
><A
|
><A
|
NAME="KERNEL-CHARACTERIZATION-USING-MEASUREMENTS"
|
NAME="KERNEL-CHARACTERIZATION-USING-MEASUREMENTS"
|
></A
|
></A
|
><H2
|
><H2
|
>Using these Measurements</H2
|
>Using these Measurements</H2
|
><P
|
><P
|
>These measurements can be used in a number of ways. The most typical
|
>These measurements can be used in a number of ways. The most typical
|
use will be to compare different real-time kernel offerings on similar
|
use will be to compare different real-time kernel offerings on similar
|
hardware, another will be to estimate the cost of implementing a task
|
hardware, another will be to estimate the cost of implementing a task
|
using eCos (applications can be examined to see what effect the kernel
|
using eCos (applications can be examined to see what effect the kernel
|
operations will have on the total execution time). Another use would
|
operations will have on the total execution time). Another use would
|
be to observe how the tuning of the kernel affects overall operation.
|
be to observe how the tuning of the kernel affects overall operation.
|
</P
|
</P
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="REFSECT1"
|
CLASS="REFSECT1"
|
><A
|
><A
|
NAME="KERNEL-CHARACTERIZATION-INFLUENCES"
|
NAME="KERNEL-CHARACTERIZATION-INFLUENCES"
|
></A
|
></A
|
><H2
|
><H2
|
>Influences on Performance</H2
|
>Influences on Performance</H2
|
><P
|
><P
|
>A number of factors can affect real-time performance in a system. One
|
>A number of factors can affect real-time performance in a system. One
|
of the most common factors, yet most difficult to characterize, is the
|
of the most common factors, yet most difficult to characterize, is the
|
effect of device drivers and interrupts on system timings. Different
|
effect of device drivers and interrupts on system timings. Different
|
device drivers will have differing requirements as to how long
|
device drivers will have differing requirements as to how long
|
interrupts are suppressed, for example. The eCos system has been
|
interrupts are suppressed, for example. The eCos system has been
|
designed with this in mind, by separating the management of interrupts
|
designed with this in mind, by separating the management of interrupts
|
(ISR handlers) and the processing required by the interrupt
|
(ISR handlers) and the processing required by the interrupt
|
(DSR—Deferred Service Routine— handlers). However, since
|
(DSR—Deferred Service Routine— handlers). However, since
|
there is so much variability here, and indeed most device drivers will
|
there is so much variability here, and indeed most device drivers will
|
come from the end users themselves, these effects cannot be reliably
|
come from the end users themselves, these effects cannot be reliably
|
measured. Attempts have been made to measure the overhead of the
|
measured. Attempts have been made to measure the overhead of the
|
single interrupt that eCos relies on, the real-time clock timer. This
|
single interrupt that eCos relies on, the real-time clock timer. This
|
should give you a reasonable idea of the cost of executing interrupt
|
should give you a reasonable idea of the cost of executing interrupt
|
handling for devices.
|
handling for devices.
|
</P
|
</P
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="REFSECT1"
|
CLASS="REFSECT1"
|
><A
|
><A
|
NAME="KERNEL-CHARACTERIZATION-MEASURED-ITEMS"
|
NAME="KERNEL-CHARACTERIZATION-MEASURED-ITEMS"
|
></A
|
></A
|
><H2
|
><H2
|
>Measured Items</H2
|
>Measured Items</H2
|
><P
|
><P
|
>This section describes the various tests and the numbers presented.
|
>This section describes the various tests and the numbers presented.
|
All tests use the C kernel API (available by way of
|
All tests use the C kernel API (available by way of
|
<TT
|
<TT
|
CLASS="FILENAME"
|
CLASS="FILENAME"
|
>cyg/kernel/kapi.h</TT
|
>cyg/kernel/kapi.h</TT
|
>). There is a single main thread
|
>). There is a single main thread
|
in the system that performs the various tests. Additional threads may
|
in the system that performs the various tests. Additional threads may
|
be created as part of the testing, but these are short lived and are
|
be created as part of the testing, but these are short lived and are
|
destroyed between tests unless otherwise noted. The terminology
|
destroyed between tests unless otherwise noted. The terminology
|
“lower priority” means a priority that is less important,
|
“lower priority” means a priority that is less important,
|
not necessarily lower in numerical value. A higher priority thread
|
not necessarily lower in numerical value. A higher priority thread
|
will run in preference to a lower priority thread even though the
|
will run in preference to a lower priority thread even though the
|
priority value of the higher priority thread may be numerically less
|
priority value of the higher priority thread may be numerically less
|
than that of the lower priority thread.
|
than that of the lower priority thread.
|
</P
|
</P
|
><DIV
|
><DIV
|
CLASS="REFSECT2"
|
CLASS="REFSECT2"
|
><A
|
><A
|
NAME="KERNEL-CHARACTERIZATION-MEASURE-THREADS"
|
NAME="KERNEL-CHARACTERIZATION-MEASURE-THREADS"
|
></A
|
></A
|
><H3
|
><H3
|
>Thread Primitives</H3
|
>Thread Primitives</H3
|
><P
|
><P
|
></P
|
></P
|
><DIV
|
><DIV
|
CLASS="VARIABLELIST"
|
CLASS="VARIABLELIST"
|
><DL
|
><DL
|
><DT
|
><DT
|
>Create thread</DT
|
>Create thread</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_thread_create()</TT
|
>cyg_thread_create()</TT
|
> call.
|
> call.
|
Each call creates a totally new thread. The set of threads created by
|
Each call creates a totally new thread. The set of threads created by
|
this test will be reused in the subsequent thread primitive tests.
|
this test will be reused in the subsequent thread primitive tests.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Yield thread</DT
|
>Yield thread</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_thread_yield()</TT
|
>cyg_thread_yield()</TT
|
> call.
|
> call.
|
For this test, there are no other runnable threads, thus the test
|
For this test, there are no other runnable threads, thus the test
|
should just measure the overhead of trying to give up the CPU.
|
should just measure the overhead of trying to give up the CPU.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Suspend [suspended] thread</DT
|
>Suspend [suspended] thread</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_thread_suspend()</TT
|
>cyg_thread_suspend()</TT
|
> call.
|
> call.
|
A thread may be suspended multiple times; each thread is already
|
A thread may be suspended multiple times; each thread is already
|
suspended from its initial creation, and is suspended again.
|
suspended from its initial creation, and is suspended again.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Resume thread</DT
|
>Resume thread</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_thread_resume()</TT
|
>cyg_thread_resume()</TT
|
> call.
|
> call.
|
All of the threads have a suspend count of 2, thus this call does not
|
All of the threads have a suspend count of 2, thus this call does not
|
make them runnable. This test just measures the overhead of resuming a
|
make them runnable. This test just measures the overhead of resuming a
|
thread.
|
thread.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Set priority</DT
|
>Set priority</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_thread_set_priority()</TT
|
>cyg_thread_set_priority()</TT
|
>
|
>
|
call. Each thread, currently suspended, has its priority set to a new
|
call. Each thread, currently suspended, has its priority set to a new
|
value.
|
value.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Get priority</DT
|
>Get priority</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_thread_get_priority()</TT
|
>cyg_thread_get_priority()</TT
|
>
|
>
|
call.
|
call.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Kill [suspended] thread</DT
|
>Kill [suspended] thread</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_thread_kill()</TT
|
>cyg_thread_kill()</TT
|
> call.
|
> call.
|
Each thread in the set is killed. All threads are known to be
|
Each thread in the set is killed. All threads are known to be
|
suspended before being killed.
|
suspended before being killed.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Yield [no other] thread</DT
|
>Yield [no other] thread</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_thread_yield()</TT
|
>cyg_thread_yield()</TT
|
> call
|
> call
|
again. This is to demonstrate that the
|
again. This is to demonstrate that the
|
<TT
|
<TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_thread_yield()</TT
|
>cyg_thread_yield()</TT
|
> call has a fixed overhead,
|
> call has a fixed overhead,
|
regardless of whether there are other threads in the system.
|
regardless of whether there are other threads in the system.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Resume [suspended low priority] thread</DT
|
>Resume [suspended low priority] thread</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_thread_resume()</TT
|
>cyg_thread_resume()</TT
|
> call
|
> call
|
again. In this case, the thread being resumed is lower priority than
|
again. In this case, the thread being resumed is lower priority than
|
the main thread, thus it will simply become ready to run but not be
|
the main thread, thus it will simply become ready to run but not be
|
granted the CPU. This test measures the cost of making a thread ready
|
granted the CPU. This test measures the cost of making a thread ready
|
to run.
|
to run.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Resume [runnable low priority] thread</DT
|
>Resume [runnable low priority] thread</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_thread_resume()</TT
|
>cyg_thread_resume()</TT
|
> call
|
> call
|
again. In this case, the thread being resumed is lower priority than
|
again. In this case, the thread being resumed is lower priority than
|
the main thread and has already been made runnable, so in fact the
|
the main thread and has already been made runnable, so in fact the
|
resume call has no effect.
|
resume call has no effect.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Suspend [runnable] thread</DT
|
>Suspend [runnable] thread</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_thread_suspend()</TT
|
>cyg_thread_suspend()</TT
|
> call
|
> call
|
again. In this case, each thread has already been made runnable (by
|
again. In this case, each thread has already been made runnable (by
|
previous tests).
|
previous tests).
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Yield [only low priority] thread</DT
|
>Yield [only low priority] thread</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_thread_yield()</TT
|
>cyg_thread_yield()</TT
|
> call.
|
> call.
|
In this case, there are many other runnable threads, but they are all
|
In this case, there are many other runnable threads, but they are all
|
lower priority than the main thread, thus no thread switches will take
|
lower priority than the main thread, thus no thread switches will take
|
place.
|
place.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Suspend [runnable->not runnable] thread</DT
|
>Suspend [runnable->not runnable] thread</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_thread_suspend()</TT
|
>cyg_thread_suspend()</TT
|
> call
|
> call
|
again. The thread being suspended will become non-runnable by this
|
again. The thread being suspended will become non-runnable by this
|
action.
|
action.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Kill [runnable] thread</DT
|
>Kill [runnable] thread</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_thread_kill()</TT
|
>cyg_thread_kill()</TT
|
> call
|
> call
|
again. In this case, the thread being killed is currently runnable,
|
again. In this case, the thread being killed is currently runnable,
|
but lower priority than the main thread.
|
but lower priority than the main thread.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Resume [high priority] thread</DT
|
>Resume [high priority] thread</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_thread_resume()</TT
|
>cyg_thread_resume()</TT
|
> call.
|
> call.
|
The thread being resumed is higher priority than the main thread, thus
|
The thread being resumed is higher priority than the main thread, thus
|
a thread switch will take place on each call. In fact there will be
|
a thread switch will take place on each call. In fact there will be
|
two thread switches; one to the new higher priority thread and a
|
two thread switches; one to the new higher priority thread and a
|
second back to the test thread. The test thread exits immediately.
|
second back to the test thread. The test thread exits immediately.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Thread switch</DT
|
>Thread switch</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test attempts to measure the cost of switching from one thread to
|
>This test attempts to measure the cost of switching from one thread to
|
another. Two equal priority threads are started and they will each
|
another. Two equal priority threads are started and they will each
|
yield to the other for a number of iterations. A time stamp is
|
yield to the other for a number of iterations. A time stamp is
|
gathered in one thread before the
|
gathered in one thread before the
|
<TT
|
<TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_thread_yield()</TT
|
>cyg_thread_yield()</TT
|
> call and after the call in the
|
> call and after the call in the
|
other thread.
|
other thread.
|
</P
|
</P
|
></DD
|
></DD
|
></DL
|
></DL
|
></DIV
|
></DIV
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="REFSECT2"
|
CLASS="REFSECT2"
|
><A
|
><A
|
NAME="KERNEL-CHARACTERIZATION-MEASURE-SCHEDULER"
|
NAME="KERNEL-CHARACTERIZATION-MEASURE-SCHEDULER"
|
></A
|
></A
|
><H3
|
><H3
|
>Scheduler Primitives</H3
|
>Scheduler Primitives</H3
|
><P
|
><P
|
></P
|
></P
|
><DIV
|
><DIV
|
CLASS="VARIABLELIST"
|
CLASS="VARIABLELIST"
|
><DL
|
><DL
|
><DT
|
><DT
|
>Scheduler lock</DT
|
>Scheduler lock</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_scheduler_lock()</TT
|
>cyg_scheduler_lock()</TT
|
> call.
|
> call.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Scheduler unlock [0 threads]</DT
|
>Scheduler unlock [0 threads]</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_scheduler_unlock()</TT
|
>cyg_scheduler_unlock()</TT
|
>
|
>
|
call. There are no other threads in the system and the unlock happens
|
call. There are no other threads in the system and the unlock happens
|
immediately after a lock so there will be no pending DSR’s to
|
immediately after a lock so there will be no pending DSR’s to
|
run.
|
run.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Scheduler unlock [1 suspended thread]</DT
|
>Scheduler unlock [1 suspended thread]</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_scheduler_unlock()</TT
|
>cyg_scheduler_unlock()</TT
|
>
|
>
|
call. There is one other thread in the system which is currently
|
call. There is one other thread in the system which is currently
|
suspended.
|
suspended.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Scheduler unlock [many suspended threads]</DT
|
>Scheduler unlock [many suspended threads]</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_scheduler_unlock()</TT
|
>cyg_scheduler_unlock()</TT
|
>
|
>
|
call. There are many other threads in the system which are currently
|
call. There are many other threads in the system which are currently
|
suspended. The purpose of this test is to determine the cost of having
|
suspended. The purpose of this test is to determine the cost of having
|
additional threads in the system when the scheduler is activated by
|
additional threads in the system when the scheduler is activated by
|
way of <TT
|
way of <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_scheduler_unlock()</TT
|
>cyg_scheduler_unlock()</TT
|
>.
|
>.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Scheduler unlock [many low priority threads]</DT
|
>Scheduler unlock [many low priority threads]</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_scheduler_unlock()</TT
|
>cyg_scheduler_unlock()</TT
|
>
|
>
|
call. There are many other threads in the system which are runnable
|
call. There are many other threads in the system which are runnable
|
but are lower priority than the main thread. The purpose of this test
|
but are lower priority than the main thread. The purpose of this test
|
is to determine the cost of having additional threads in the system
|
is to determine the cost of having additional threads in the system
|
when the scheduler is activated by way of
|
when the scheduler is activated by way of
|
<TT
|
<TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_scheduler_unlock()</TT
|
>cyg_scheduler_unlock()</TT
|
>.
|
>.
|
</P
|
</P
|
></DD
|
></DD
|
></DL
|
></DL
|
></DIV
|
></DIV
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="REFSECT2"
|
CLASS="REFSECT2"
|
><A
|
><A
|
NAME="KERNEL-CHARACTERIZATION-MEASURE-MUTEX"
|
NAME="KERNEL-CHARACTERIZATION-MEASURE-MUTEX"
|
></A
|
></A
|
><H3
|
><H3
|
>Mutex Primitives</H3
|
>Mutex Primitives</H3
|
><P
|
><P
|
></P
|
></P
|
><DIV
|
><DIV
|
CLASS="VARIABLELIST"
|
CLASS="VARIABLELIST"
|
><DL
|
><DL
|
><DT
|
><DT
|
>Init mutex</DT
|
>Init mutex</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mutex_init()</TT
|
>cyg_mutex_init()</TT
|
> call. A
|
> call. A
|
number of separate mutex variables are created. The purpose of this
|
number of separate mutex variables are created. The purpose of this
|
test is to measure the cost of creating a new mutex and introducing it
|
test is to measure the cost of creating a new mutex and introducing it
|
to the system.
|
to the system.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Lock [unlocked] mutex</DT
|
>Lock [unlocked] mutex</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mutex_lock()</TT
|
>cyg_mutex_lock()</TT
|
> call. The
|
> call. The
|
purpose of this test is to measure the cost of locking a mutex which
|
purpose of this test is to measure the cost of locking a mutex which
|
is currently unlocked. There are no other threads executing in the
|
is currently unlocked. There are no other threads executing in the
|
system while this test runs.
|
system while this test runs.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Unlock [locked] mutex</DT
|
>Unlock [locked] mutex</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mutex_unlock()</TT
|
>cyg_mutex_unlock()</TT
|
> call.
|
> call.
|
The purpose of this test is to measure the cost of unlocking a mutex
|
The purpose of this test is to measure the cost of unlocking a mutex
|
which is currently locked. There are no other threads executing in the
|
which is currently locked. There are no other threads executing in the
|
system while this test runs.
|
system while this test runs.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Trylock [unlocked] mutex</DT
|
>Trylock [unlocked] mutex</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mutex_trylock()</TT
|
>cyg_mutex_trylock()</TT
|
> call.
|
> call.
|
The purpose of this test is to measure the cost of locking a mutex
|
The purpose of this test is to measure the cost of locking a mutex
|
which is currently unlocked. There are no other threads executing in
|
which is currently unlocked. There are no other threads executing in
|
the system while this test runs.
|
the system while this test runs.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Trylock [locked] mutex</DT
|
>Trylock [locked] mutex</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mutex_trylock()</TT
|
>cyg_mutex_trylock()</TT
|
> call.
|
> call.
|
The purpose of this test is to measure the cost of locking a mutex
|
The purpose of this test is to measure the cost of locking a mutex
|
which is currently locked. There are no other threads executing in the
|
which is currently locked. There are no other threads executing in the
|
system while this test runs.
|
system while this test runs.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Destroy mutex</DT
|
>Destroy mutex</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mutex_destroy()</TT
|
>cyg_mutex_destroy()</TT
|
> call.
|
> call.
|
The purpose of this test is to measure the cost of deleting a mutex
|
The purpose of this test is to measure the cost of deleting a mutex
|
from the system. There are no other threads executing in the system
|
from the system. There are no other threads executing in the system
|
while this test runs.
|
while this test runs.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Unlock/Lock mutex</DT
|
>Unlock/Lock mutex</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test attempts to measure the cost of unlocking a mutex for which
|
>This test attempts to measure the cost of unlocking a mutex for which
|
there is another higher priority thread waiting. When the mutex is
|
there is another higher priority thread waiting. When the mutex is
|
unlocked, the higher priority waiting thread will immediately take the
|
unlocked, the higher priority waiting thread will immediately take the
|
lock. The time from when the unlock is issued until after the lock
|
lock. The time from when the unlock is issued until after the lock
|
succeeds in the second thread is measured, thus giving the round-trip
|
succeeds in the second thread is measured, thus giving the round-trip
|
or circuit time for this type of synchronizer.
|
or circuit time for this type of synchronizer.
|
</P
|
</P
|
></DD
|
></DD
|
></DL
|
></DL
|
></DIV
|
></DIV
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="REFSECT2"
|
CLASS="REFSECT2"
|
><A
|
><A
|
NAME="KERNEL-CHARACTERIZATION-MEASURE-MAILBOX"
|
NAME="KERNEL-CHARACTERIZATION-MEASURE-MAILBOX"
|
></A
|
></A
|
><H3
|
><H3
|
>Mailbox Primitives</H3
|
>Mailbox Primitives</H3
|
><P
|
><P
|
></P
|
></P
|
><DIV
|
><DIV
|
CLASS="VARIABLELIST"
|
CLASS="VARIABLELIST"
|
><DL
|
><DL
|
><DT
|
><DT
|
>Create mbox</DT
|
>Create mbox</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mbox_create()</TT
|
>cyg_mbox_create()</TT
|
> call. A
|
> call. A
|
number of separate mailboxes is created. The purpose of this test is
|
number of separate mailboxes is created. The purpose of this test is
|
to measure the cost of creating a new mailbox and introducing it to
|
to measure the cost of creating a new mailbox and introducing it to
|
the system.
|
the system.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Peek [empty] mbox</DT
|
>Peek [empty] mbox</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mbox_peek()</TT
|
>cyg_mbox_peek()</TT
|
> call. An
|
> call. An
|
attempt is made to peek the value in each mailbox, which is currently
|
attempt is made to peek the value in each mailbox, which is currently
|
empty. The purpose of this test is to measure the cost of checking a
|
empty. The purpose of this test is to measure the cost of checking a
|
mailbox for a value without blocking.
|
mailbox for a value without blocking.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Put [first] mbox</DT
|
>Put [first] mbox</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mbox_put()</TT
|
>cyg_mbox_put()</TT
|
> call. One
|
> call. One
|
item is added to a currently empty mailbox. The purpose of this test
|
item is added to a currently empty mailbox. The purpose of this test
|
is to measure the cost of adding an item to a mailbox. There are no
|
is to measure the cost of adding an item to a mailbox. There are no
|
other threads currently waiting for mailbox items to arrive.
|
other threads currently waiting for mailbox items to arrive.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Peek [1 msg] mbox</DT
|
>Peek [1 msg] mbox</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mbox_peek()</TT
|
>cyg_mbox_peek()</TT
|
> call. An
|
> call. An
|
attempt is made to peek the value in each mailbox, which contains a
|
attempt is made to peek the value in each mailbox, which contains a
|
single item. The purpose of this test is to measure the cost of
|
single item. The purpose of this test is to measure the cost of
|
checking a mailbox which has data to deliver.
|
checking a mailbox which has data to deliver.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Put [second] mbox</DT
|
>Put [second] mbox</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mbox_put()</TT
|
>cyg_mbox_put()</TT
|
> call. A
|
> call. A
|
second item is added to a mailbox. The purpose of this test is to
|
second item is added to a mailbox. The purpose of this test is to
|
measure the cost of adding an additional item to a mailbox. There are
|
measure the cost of adding an additional item to a mailbox. There are
|
no other threads currently waiting for mailbox items to arrive.
|
no other threads currently waiting for mailbox items to arrive.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Peek [2 msgs] mbox</DT
|
>Peek [2 msgs] mbox</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mbox_peek()</TT
|
>cyg_mbox_peek()</TT
|
> call. An
|
> call. An
|
attempt is made to peek the value in each mailbox, which contains two
|
attempt is made to peek the value in each mailbox, which contains two
|
items. The purpose of this test is to measure the cost of checking a
|
items. The purpose of this test is to measure the cost of checking a
|
mailbox which has data to deliver.
|
mailbox which has data to deliver.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Get [first] mbox</DT
|
>Get [first] mbox</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mbox_get()</TT
|
>cyg_mbox_get()</TT
|
> call. The
|
> call. The
|
first item is removed from a mailbox that currently contains two
|
first item is removed from a mailbox that currently contains two
|
items. The purpose of this test is to measure the cost of obtaining an
|
items. The purpose of this test is to measure the cost of obtaining an
|
item from a mailbox without blocking.
|
item from a mailbox without blocking.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Get [second] mbox</DT
|
>Get [second] mbox</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mbox_get()</TT
|
>cyg_mbox_get()</TT
|
> call. The
|
> call. The
|
last item is removed from a mailbox that currently contains one item.
|
last item is removed from a mailbox that currently contains one item.
|
The purpose of this test is to measure the cost of obtaining an item
|
The purpose of this test is to measure the cost of obtaining an item
|
from a mailbox without blocking.
|
from a mailbox without blocking.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Tryput [first] mbox</DT
|
>Tryput [first] mbox</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mbox_tryput()</TT
|
>cyg_mbox_tryput()</TT
|
> call. A
|
> call. A
|
single item is added to a currently empty mailbox. The purpose of this
|
single item is added to a currently empty mailbox. The purpose of this
|
test is to measure the cost of adding an item to a mailbox.
|
test is to measure the cost of adding an item to a mailbox.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Peek item [non-empty] mbox</DT
|
>Peek item [non-empty] mbox</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mbox_peek_item()</TT
|
>cyg_mbox_peek_item()</TT
|
> call.
|
> call.
|
A single item is fetched from a mailbox that contains a single item.
|
A single item is fetched from a mailbox that contains a single item.
|
The purpose of this test is to measure the cost of obtaining an item
|
The purpose of this test is to measure the cost of obtaining an item
|
without disturbing the mailbox.
|
without disturbing the mailbox.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Tryget [non-empty] mbox</DT
|
>Tryget [non-empty] mbox</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mbox_tryget()</TT
|
>cyg_mbox_tryget()</TT
|
> call. A
|
> call. A
|
single item is removed from a mailbox that contains exactly one item.
|
single item is removed from a mailbox that contains exactly one item.
|
The purpose of this test is to measure the cost of obtaining one item
|
The purpose of this test is to measure the cost of obtaining one item
|
from a non-empty mailbox.
|
from a non-empty mailbox.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Peek item [empty] mbox</DT
|
>Peek item [empty] mbox</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mbox_peek_item()</TT
|
>cyg_mbox_peek_item()</TT
|
> call.
|
> call.
|
An attempt is made to fetch an item from a mailbox that is empty. The
|
An attempt is made to fetch an item from a mailbox that is empty. The
|
purpose of this test is to measure the cost of trying to obtain an
|
purpose of this test is to measure the cost of trying to obtain an
|
item when the mailbox is empty.
|
item when the mailbox is empty.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Tryget [empty] mbox</DT
|
>Tryget [empty] mbox</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mbox_tryget()</TT
|
>cyg_mbox_tryget()</TT
|
> call. An
|
> call. An
|
attempt is made to fetch an item from a mailbox that is empty. The
|
attempt is made to fetch an item from a mailbox that is empty. The
|
purpose of this test is to measure the cost of trying to obtain an
|
purpose of this test is to measure the cost of trying to obtain an
|
item when the mailbox is empty.
|
item when the mailbox is empty.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Waiting to get mbox</DT
|
>Waiting to get mbox</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mbox_waiting_to_get()</TT
|
>cyg_mbox_waiting_to_get()</TT
|
>
|
>
|
call. The purpose of this test is to measure the cost of determining
|
call. The purpose of this test is to measure the cost of determining
|
how many threads are waiting to obtain a message from this mailbox.
|
how many threads are waiting to obtain a message from this mailbox.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Waiting to put mbox</DT
|
>Waiting to put mbox</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mbox_waiting_to_put()</TT
|
>cyg_mbox_waiting_to_put()</TT
|
>
|
>
|
call. The purpose of this test is to measure the cost of determining
|
call. The purpose of this test is to measure the cost of determining
|
how many threads are waiting to put a message into this mailbox.
|
how many threads are waiting to put a message into this mailbox.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Delete mbox</DT
|
>Delete mbox</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_mbox_delete()</TT
|
>cyg_mbox_delete()</TT
|
> call.
|
> call.
|
The purpose of this test is to measure the cost of destroying a
|
The purpose of this test is to measure the cost of destroying a
|
mailbox and removing it from the system.
|
mailbox and removing it from the system.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Put/Get mbox</DT
|
>Put/Get mbox</DT
|
><DD
|
><DD
|
><P
|
><P
|
>In this round-trip test, one thread is sending data to a mailbox that
|
>In this round-trip test, one thread is sending data to a mailbox that
|
is being consumed by another thread. The time from when the data is
|
is being consumed by another thread. The time from when the data is
|
put into the mailbox until it has been delivered to the waiting thread
|
put into the mailbox until it has been delivered to the waiting thread
|
is measured. Note that this time will contain a thread switch.
|
is measured. Note that this time will contain a thread switch.
|
</P
|
</P
|
></DD
|
></DD
|
></DL
|
></DL
|
></DIV
|
></DIV
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="REFSECT2"
|
CLASS="REFSECT2"
|
><A
|
><A
|
NAME="KERNEL-CHARACTERIZATION-MEASURE-SEMAPHORE"
|
NAME="KERNEL-CHARACTERIZATION-MEASURE-SEMAPHORE"
|
></A
|
></A
|
><H3
|
><H3
|
>Semaphore Primitives</H3
|
>Semaphore Primitives</H3
|
><P
|
><P
|
></P
|
></P
|
><DIV
|
><DIV
|
CLASS="VARIABLELIST"
|
CLASS="VARIABLELIST"
|
><DL
|
><DL
|
><DT
|
><DT
|
>Init semaphore</DT
|
>Init semaphore</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_semaphore_init()</TT
|
>cyg_semaphore_init()</TT
|
> call.
|
> call.
|
A number of separate semaphore objects are created and introduced to
|
A number of separate semaphore objects are created and introduced to
|
the system. The purpose of this test is to measure the cost of
|
the system. The purpose of this test is to measure the cost of
|
creating a new semaphore.
|
creating a new semaphore.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Post [0] semaphore</DT
|
>Post [0] semaphore</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_semaphore_post()</TT
|
>cyg_semaphore_post()</TT
|
> call.
|
> call.
|
Each semaphore currently has a value of 0 and there are no other
|
Each semaphore currently has a value of 0 and there are no other
|
threads in the system. The purpose of this test is to measure the
|
threads in the system. The purpose of this test is to measure the
|
overhead cost of posting to a semaphore. This cost will differ if
|
overhead cost of posting to a semaphore. This cost will differ if
|
there is a thread waiting for the semaphore.
|
there is a thread waiting for the semaphore.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Wait [1] semaphore</DT
|
>Wait [1] semaphore</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_semaphore_wait()</TT
|
>cyg_semaphore_wait()</TT
|
> call.
|
> call.
|
The semaphore has a current value of 1 so the call is non-blocking.
|
The semaphore has a current value of 1 so the call is non-blocking.
|
The purpose of the test is to measure the overhead of
|
The purpose of the test is to measure the overhead of
|
“taking” a semaphore.
|
“taking” a semaphore.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Trywait [0] semaphore</DT
|
>Trywait [0] semaphore</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_semaphore_trywait()</TT
|
>cyg_semaphore_trywait()</TT
|
>
|
>
|
call. The semaphore has a value of 0 when the call is made. The
|
call. The semaphore has a value of 0 when the call is made. The
|
purpose of this test is to measure the cost of seeing if a semaphore
|
purpose of this test is to measure the cost of seeing if a semaphore
|
can be “taken” without blocking. In this case, the answer
|
can be “taken” without blocking. In this case, the answer
|
would be no.
|
would be no.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Trywait [1] semaphore</DT
|
>Trywait [1] semaphore</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_semaphore_trywait()</TT
|
>cyg_semaphore_trywait()</TT
|
>
|
>
|
call. The semaphore has a value of 1 when the call is made. The
|
call. The semaphore has a value of 1 when the call is made. The
|
purpose of this test is to measure the cost of seeing if a semaphore
|
purpose of this test is to measure the cost of seeing if a semaphore
|
can be “taken” without blocking. In this case, the answer
|
can be “taken” without blocking. In this case, the answer
|
would be yes.
|
would be yes.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Peek semaphore</DT
|
>Peek semaphore</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_semaphore_peek()</TT
|
>cyg_semaphore_peek()</TT
|
> call.
|
> call.
|
The purpose of this test is to measure the cost of obtaining the
|
The purpose of this test is to measure the cost of obtaining the
|
current semaphore count value.
|
current semaphore count value.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Destroy semaphore</DT
|
>Destroy semaphore</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_semaphore_destroy()</TT
|
>cyg_semaphore_destroy()</TT
|
>
|
>
|
call. The purpose of this test is to measure the cost of deleting a
|
call. The purpose of this test is to measure the cost of deleting a
|
semaphore from the system.
|
semaphore from the system.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Post/Wait semaphore</DT
|
>Post/Wait semaphore</DT
|
><DD
|
><DD
|
><P
|
><P
|
>In this round-trip test, two threads are passing control back and
|
>In this round-trip test, two threads are passing control back and
|
forth by using a semaphore. The time from when one thread calls
|
forth by using a semaphore. The time from when one thread calls
|
<TT
|
<TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_semaphore_post()</TT
|
>cyg_semaphore_post()</TT
|
> until the other thread
|
> until the other thread
|
completes its <TT
|
completes its <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_semaphore_wait()</TT
|
>cyg_semaphore_wait()</TT
|
> is measured.
|
> is measured.
|
Note that each iteration of this test will involve a thread switch.
|
Note that each iteration of this test will involve a thread switch.
|
</P
|
</P
|
></DD
|
></DD
|
></DL
|
></DL
|
></DIV
|
></DIV
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="REFSECT2"
|
CLASS="REFSECT2"
|
><A
|
><A
|
NAME="KERNEL-CHARACTERIZATION-MEASURE-COUNTERS"
|
NAME="KERNEL-CHARACTERIZATION-MEASURE-COUNTERS"
|
></A
|
></A
|
><H3
|
><H3
|
>Counters</H3
|
>Counters</H3
|
><P
|
><P
|
></P
|
></P
|
><DIV
|
><DIV
|
CLASS="VARIABLELIST"
|
CLASS="VARIABLELIST"
|
><DL
|
><DL
|
><DT
|
><DT
|
>Create counter</DT
|
>Create counter</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_counter_create()</TT
|
>cyg_counter_create()</TT
|
> call.
|
> call.
|
A number of separate counters are created. The purpose of this test is
|
A number of separate counters are created. The purpose of this test is
|
to measure the cost of creating a new counter and introducing it to
|
to measure the cost of creating a new counter and introducing it to
|
the system.
|
the system.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Get counter value</DT
|
>Get counter value</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the
|
>This test measures the
|
<TT
|
<TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_counter_current_value()</TT
|
>cyg_counter_current_value()</TT
|
> call. The current
|
> call. The current
|
value of each counter is obtained.
|
value of each counter is obtained.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Set counter value</DT
|
>Set counter value</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_counter_set_value()</TT
|
>cyg_counter_set_value()</TT
|
>
|
>
|
call. Each counter is set to a new value.
|
call. Each counter is set to a new value.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Tick counter</DT
|
>Tick counter</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_counter_tick()</TT
|
>cyg_counter_tick()</TT
|
> call.
|
> call.
|
Each counter is “ticked” once.
|
Each counter is “ticked” once.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Delete counter</DT
|
>Delete counter</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_counter_delete()</TT
|
>cyg_counter_delete()</TT
|
> call.
|
> call.
|
Each counter is deleted from the system. The purpose of this test is
|
Each counter is deleted from the system. The purpose of this test is
|
to measure the cost of deleting a counter object.
|
to measure the cost of deleting a counter object.
|
</P
|
</P
|
></DD
|
></DD
|
></DL
|
></DL
|
></DIV
|
></DIV
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="REFSECT2"
|
CLASS="REFSECT2"
|
><A
|
><A
|
NAME="KERNEL-CHARACTERIZATION-MEASURE-ALARMS"
|
NAME="KERNEL-CHARACTERIZATION-MEASURE-ALARMS"
|
></A
|
></A
|
><H3
|
><H3
|
>Alarms</H3
|
>Alarms</H3
|
><P
|
><P
|
></P
|
></P
|
><DIV
|
><DIV
|
CLASS="VARIABLELIST"
|
CLASS="VARIABLELIST"
|
><DL
|
><DL
|
><DT
|
><DT
|
>Create alarm</DT
|
>Create alarm</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_alarm_create()</TT
|
>cyg_alarm_create()</TT
|
> call. A
|
> call. A
|
number of separate alarms are created, all attached to the same
|
number of separate alarms are created, all attached to the same
|
counter object. The purpose of this test is to measure the cost of
|
counter object. The purpose of this test is to measure the cost of
|
creating a new counter and introducing it to the system.
|
creating a new counter and introducing it to the system.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Initialize alarm</DT
|
>Initialize alarm</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_alarm_initialize()</TT
|
>cyg_alarm_initialize()</TT
|
>
|
>
|
call. Each alarm is initialized to a small value.
|
call. Each alarm is initialized to a small value.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Disable alarm</DT
|
>Disable alarm</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_alarm_disable()</TT
|
>cyg_alarm_disable()</TT
|
> call.
|
> call.
|
Each alarm is explicitly disabled.
|
Each alarm is explicitly disabled.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Enable alarm</DT
|
>Enable alarm</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_alarm_enable()</TT
|
>cyg_alarm_enable()</TT
|
> call.
|
> call.
|
Each alarm is explicitly enabled.
|
Each alarm is explicitly enabled.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Delete alarm</DT
|
>Delete alarm</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_alarm_delete()</TT
|
>cyg_alarm_delete()</TT
|
> call.
|
> call.
|
Each alarm is destroyed. The purpose of this test is to measure the
|
Each alarm is destroyed. The purpose of this test is to measure the
|
cost of deleting an alarm and removing it from the system.
|
cost of deleting an alarm and removing it from the system.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Tick counter [1 alarm]</DT
|
>Tick counter [1 alarm]</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_counter_tick()</TT
|
>cyg_counter_tick()</TT
|
> call. A
|
> call. A
|
counter is created that has a single alarm attached to it. The purpose
|
counter is created that has a single alarm attached to it. The purpose
|
of this test is to measure the cost of “ticking” a counter
|
of this test is to measure the cost of “ticking” a counter
|
when it has a single attached alarm. In this test, the alarm is not
|
when it has a single attached alarm. In this test, the alarm is not
|
activated (fired).
|
activated (fired).
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Tick counter [many alarms]</DT
|
>Tick counter [many alarms]</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_counter_tick()</TT
|
>cyg_counter_tick()</TT
|
> call. A
|
> call. A
|
counter is created that has multiple alarms attached to it. The
|
counter is created that has multiple alarms attached to it. The
|
purpose of this test is to measure the cost of “ticking” a
|
purpose of this test is to measure the cost of “ticking” a
|
counter when it has many attached alarms. In this test, the alarms are
|
counter when it has many attached alarms. In this test, the alarms are
|
not activated (fired).
|
not activated (fired).
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Tick & fire counter [1 alarm]</DT
|
>Tick & fire counter [1 alarm]</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_counter_tick()</TT
|
>cyg_counter_tick()</TT
|
> call. A
|
> call. A
|
counter is created that has a single alarm attached to it. The purpose
|
counter is created that has a single alarm attached to it. The purpose
|
of this test is to measure the cost of “ticking” a counter
|
of this test is to measure the cost of “ticking” a counter
|
when it has a single attached alarm. In this test, the alarm is
|
when it has a single attached alarm. In this test, the alarm is
|
activated (fired). Thus the measured time will include the overhead of
|
activated (fired). Thus the measured time will include the overhead of
|
calling the alarm callback function.
|
calling the alarm callback function.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Tick & fire counter [many alarms]</DT
|
>Tick & fire counter [many alarms]</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test measures the <TT
|
>This test measures the <TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_counter_tick()</TT
|
>cyg_counter_tick()</TT
|
> call. A
|
> call. A
|
counter is created that has multiple alarms attached to it. The
|
counter is created that has multiple alarms attached to it. The
|
purpose of this test is to measure the cost of “ticking” a
|
purpose of this test is to measure the cost of “ticking” a
|
counter when it has many attached alarms. In this test, the alarms are
|
counter when it has many attached alarms. In this test, the alarms are
|
activated (fired). Thus the measured time will include the overhead of
|
activated (fired). Thus the measured time will include the overhead of
|
calling the alarm callback function.
|
calling the alarm callback function.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Alarm latency [0 threads]</DT
|
>Alarm latency [0 threads]</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test attempts to measure the latency in calling an alarm callback
|
>This test attempts to measure the latency in calling an alarm callback
|
function. The time from the clock interrupt until the alarm function
|
function. The time from the clock interrupt until the alarm function
|
is called is measured. In this test, there are no threads that can be
|
is called is measured. In this test, there are no threads that can be
|
run, other than the system idle thread, when the clock interrupt
|
run, other than the system idle thread, when the clock interrupt
|
occurs (all threads are suspended).
|
occurs (all threads are suspended).
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Alarm latency [2 threads]</DT
|
>Alarm latency [2 threads]</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test attempts to measure the latency in calling an alarm callback
|
>This test attempts to measure the latency in calling an alarm callback
|
function. The time from the clock interrupt until the alarm function
|
function. The time from the clock interrupt until the alarm function
|
is called is measured. In this test, there are exactly two threads
|
is called is measured. In this test, there are exactly two threads
|
which are running when the clock interrupt occurs. They are simply
|
which are running when the clock interrupt occurs. They are simply
|
passing back and forth by way of the
|
passing back and forth by way of the
|
<TT
|
<TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_thread_yield()</TT
|
>cyg_thread_yield()</TT
|
> call. The purpose of this test
|
> call. The purpose of this test
|
is to measure the variations in the latency when there are executing
|
is to measure the variations in the latency when there are executing
|
threads.
|
threads.
|
</P
|
</P
|
></DD
|
></DD
|
><DT
|
><DT
|
>Alarm latency [many threads]</DT
|
>Alarm latency [many threads]</DT
|
><DD
|
><DD
|
><P
|
><P
|
>This test attempts to measure the latency in calling an alarm callback
|
>This test attempts to measure the latency in calling an alarm callback
|
function. The time from the clock interrupt until the alarm function
|
function. The time from the clock interrupt until the alarm function
|
is called is measured. In this test, there are a number of threads
|
is called is measured. In this test, there are a number of threads
|
which are running when the clock interrupt occurs. They are simply
|
which are running when the clock interrupt occurs. They are simply
|
passing back and forth by way of the
|
passing back and forth by way of the
|
<TT
|
<TT
|
CLASS="FUNCTION"
|
CLASS="FUNCTION"
|
>cyg_thread_yield()</TT
|
>cyg_thread_yield()</TT
|
> call. The purpose of this test
|
> call. The purpose of this test
|
is to measure the variations in the latency when there are many
|
is to measure the variations in the latency when there are many
|
executing threads.
|
executing threads.
|
</P
|
</P
|
></DD
|
></DD
|
></DL
|
></DL
|
></DIV
|
></DIV
|
></DIV
|
></DIV
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="NAVFOOTER"
|
CLASS="NAVFOOTER"
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"><TABLE
|
WIDTH="100%"><TABLE
|
SUMMARY="Footer navigation table"
|
SUMMARY="Footer navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="kernel-interrupts.html"
|
HREF="kernel-interrupts.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="ecos-ref.html"
|
HREF="ecos-ref.html"
|
ACCESSKEY="H"
|
ACCESSKEY="H"
|
>Home</A
|
>Home</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="redboot.html"
|
HREF="redboot.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
>Interrupt Handling</TD
|
>Interrupt Handling</TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="kernel.html"
|
HREF="kernel.html"
|
ACCESSKEY="U"
|
ACCESSKEY="U"
|
>Up</A
|
>Up</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
>RedBoot™ User's Guide</TD
|
>RedBoot™ User's Guide</TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
></BODY
|
></BODY
|
></HTML
|
></HTML
|
|
|