MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Uživatelská příručka Strana 203

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 386
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 202
Single- Versus Multitasking Environments
7-3
Single- Versus Multitasking Environments
There are two basic ways in which you can execute a fixed-step Simulink model
— singletasking and multitasking. You use the
Solver options pull-down
menu on the Solver page of the
Simulation Parameters dialog box to specify
how to execute your model. The default is auto, which specifies that your model
will use multitasking if your model contains two or more different rates.
Otherwise, it will use singletasking.
Executionofmodelsinareal-timesystemcanbedonewiththeaidofa
real-time operating system, or it can be done on a bare-board target, where the
model runs in the context of an interrupt service routine (ISR).
Note that simply being a multitasking system, such as UNIX or MS-Windows,
does not guarantee that the program can execute in real-time because you
cannot guarantee that the program can preempt other processes when you
want it to.
In DOS, where only one process can exist at any given time, the interrupt
service routine (ISR) must perform the steps of saving the processor context,
executing the model code, collecting data, and restoring the processor context.
Tornado, on the other hand, provides automatic context switching and task
scheduling. This simplifies the operations performed by the ISR. In this case,
the ISR simply enables the model execution task, which is normally blocked.
The following diagram illustrates this difference.
Zobrazit stránku 202
1 2 ... 198 199 200 201 202 203 204 205 206 207 208 ... 385 386

Komentáře k této Příručce

Žádné komentáře