Mutex primitives, Mailbox primitives – Comtrol eCos User Manual

Page 97

Advertising
background image

Kernel Real-time Characterization

Scheduler unlock [many low priority threads]

This test measures the

cyg_scheduler_unlock()

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 is to determine the cost of having
additional threads in the system when the scheduler is activated by way of

cyg_scheduler_unlock()

.

Mutex Primitives

Init mutex

This test measures the

cyg_mutex_init()

call. A 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 to the system.

Lock [unlocked] mutex

This test measures the

cyg_mutex_lock()

call. 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 the system while this test runs.

Unlock [locked] mutex

This test measures the

cyg_mutex_unlock()

call. 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 system while this test runs.

Trylock [unlocked] mutex

This test measures the

cyg_mutex_trylock()

call. 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 the system while this test runs.

Trylock [locked] mutex

This test measures the

cyg_mutex_trylock()

call. 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 system while this test runs.

Destroy mutex

This test measures the

cyg_mutex_destroy()

call. 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 while this test runs.

Unlock/Lock mutex

This test attempts to measure the cost of unlocking a mutex for which there is another higher priority thread
waiting. When the mutex is unlocked, the higher priority waiting thread will immediately take the 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 or circuit time for this type of synchronizer.

Mailbox Primitives

Create mbox

This test measures the

cyg_mbox_create()

call. A 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 the system.

97

Advertising