📄 timeforce386.t
字号:
@c@c COPYRIGHT (c) 1988-2002.@c On-Line Applications Research Corporation (OAR).@c All rights reserved.@c@c $Id: timeFORCE386.t,v 1.10 2002/01/17 21:47:46 joel Exp $@c@include common/timemac.texi@tex\global\advance \smallskipamount by -4pt@end tex @chapter CPU386 Timing Data@section IntroductionThe timing data for the i386 version of RTEMS isprovided along with the target dependent aspects concerning thegathering of the timing data. The hardware platform used togather the times is described to give the reader a betterunderstanding of each directive time provided. Also, providedis a description of the interrupt latency and the contextswitch times as they pertain to the i386 version of RTEMS.@section Hardware PlatformAll times reported except for the maximum periodinterrupts are disabled by RTEMS were measured using a ForceComputers CPU386 board. The CPU386 is a 16 Mhz board with zerowait state dynamic memory and an i80387 numeric coprocessor.One of the count-down timers provided by a Motorola MC68901 wasused to measure elapsed time with one microsecond resolution.All sources of hardware interrupts are disabled, although theinterrupt level of the i386 allows all interrupts.The maximum period interrupts are disabled wasmeasured by summing the number of CPU cycles required by eachassembly language instruction executed while interrupts weredisabled. Zero wait state memory was assumed. The total CPUcycles executed with interrupts disabled, including theinstructions to disable and enable interrupts, was divided by 16to simulate a i386 executing at 16 Mhz.@section Interrupt LatencyThe maximum period with interrupts disabled withinRTEMS is less than RTEMS_MAXIMUM_DISABLE_PERIOD microseconds including the instructionswhich disable and re-enable interrupts. The time required forthe i386 to generate an interrupt using the int instruction,vectoring to an interrupt handler, and for the RTEMS entryoverhead before invoking the user's interrupt handler are atotal of 12 microseconds. These combine to yield a worst caseinterrupt latency of less RTEMS_MAXIMUM_DISABLE_PERIOD + RTEMS_INTR_ENTRY_RETURNS_TO_PREEMPTING_TASK microseconds. [NOTE: Themaximum period with interrupts disabled within RTEMS was lastcalculated for Release RTEMS_RELEASE_FOR_MAXIMUM_DISABLE_PERIOD.]It should be noted again that the maximum period withinterrupts disabled within RTEMS is hand-timed. The interruptvector and entry overhead time was generated on the ForceComputers CPU386 benchmark platform using the int instruction asthe interrupt source.@section Context SwitchThe RTEMS processor context switch time is RTEMS_NO_FP_CONTEXTSmicroseconds on the Force Computers CPU386 benchmark platform.This time represents the raw context switch time with no userextensions configured. Additional execution time is requiredwhen a TASK_SWITCH user extension is configured. The use of theTASK_SWITCH extension is application dependent. Thus, itsexecution time is not considered part of the base context switchtime.Since RTEMS was designed specifically for embeddedmissile applications which are floating point intensive, theexecutive is optimized to avoid unnecessarily saving andrestoring the state of the numeric coprocessor. The state ofthe numeric coprocessor is only saved when a FLOATING_POINT taskis dispatched and that task was not the last task to utilize thecoprocessor. In a system with only one FLOATING_POINT task, thestate of the numeric coprocessor will never be saved orrestored. When the first FLOATING_POINT task is dispatched,RTEMS does not need to save the current state of the numericcoprocessor.The exact amount of time required to save and restorefloating point context is dependent on the state of the numericcoprocessor. RTEMS places the coprocessor in the initializedstate when a task is started or restarted. Once the task hasutilized the coprocessor, it is in the idle state when floatingpoint instructions are not executing and the busy state whenfloating point instructions are executing. The state of thecoprocessor is task specific.The following table summarizes the context switchtimes for the Force Computers CPU386 benchmark platform:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -