Remote-processing CAMBASIC Uživatelský manuál Strana 190

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 208
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 189
Event Multitasking - 1
Event Multitasking
Event Multitasking was developed to give faster response to real time events. It is different than the multitasking that was
originally designed for business applications and later used in some industrial control languages.
Time Slice Multitasking – The Old W ay
This older form of multitasking usually takes two forms. The most popular is called “time slice.” Each task is written as
if it were a separate progr am. The first task starts and, on a clock tick (usually 60 times p er second), th at task is
suspended and the next task sta rts. After another clock tick, the second task is suspended and the third task begins. This
continues until all tasks have had their slice of time and the process starts over.
To get some idea of the performance level of this type of multitasking, assume that there are 10 equal tasks. Tasks are
switched 60 times per second. With 10 tasks, each task is serviced only 60/10 or 6 times per second.
The second form is really a version of the first. Tasks are switched after each command in each task. This increases the
task switching to several hundred times per second, but the switching overhead seriously slows the throughput.
The problem with time slice is that all the tasks are written in BASIC. Since there is only one microprocessor chip, and
task switching takes processor time away from progr am execution, the system will actually run slower than with a
non multitasking program.
Event Multitasking – For Real Time Con trol
Event Multitasking in CAMBASIC solves the speed problem by compiling all tasks into machine code, which executes
much faster than BASIC. CAM BASIC executes about 3600 commands per second, which is very fast by BASIC
standards. It also can execute 5000 tasks per second in the background while maintaining the foreground rate!
NOTE: These numbers are half for 9 MHz systems.
There are some limitations to this method. You can only use the tasks defined by the language. These are:
Output Timing (PULSE)
Input Counting (COUNT)
Keypad (KEYPA D$)
Communications (COM$)
Hardware Interrupts (ITR)
Change of state on inputs (INP)
Periodic Interrupts (TICK)
A series of special commands are used for the tasks. You do not use CAMBASIC commands like POKE, GOTO, etc. for
the tasks.
Hardware vs Softw are Interrupts
It is important to understand the difference between hardware and software interrupts when dealing with a high level
language. CA MBASIC can respond to hardware interr upts, but only indirectly.
When a hardware interrupt occurs, an internal flag is set within a few microseconds. In the same manner, any task that
can cause an interrupt set an internal flag.
Zobrazit stránku 189
1 2 ... 185 186 187 188 189 190 191 192 193 194 195 ... 207 208

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

Žádné komentáře

Samsung HLR5087WX-XAA Handbücher

Bedienungsanleitungen und Benutzerhandbücher für Fernseher Samsung HLR5087WX-XAA.
Wir stellen 1 PDF-Handbücher Samsung HLR5087WX-XAA zum kostenlosen herunterladen nach Dokumenttypen zur Verfügung Bedienungsanleitung






Weitere Produkte und Handbücher für Fernseher Samsung

Modelle Dokumententyp
HPT4234X-XAA Bedienungsanleitung    Samsung HPT4234X-XAA Manuel d'utilisation [de] , 124 Seiten
TXS3079WHX-XAA Bedienungsanleitung   Samsung TXS3079WHX-XAA User Manual, 52 Seiten
LN19C350D1DXZA Bedienungsanleitung   Samsung LN19C350D1DXZA User Manual [de] , 2 Seiten
PN63C7000YFXZA Bedienungsanleitung     Samsung PN63C7000YFXZA User Manual, 198 Seiten
TXR3081WHX-XAA Bedienungsanleitung   Samsung TXR3081WHX-XAA User Manual, 80 Seiten
HL50A650C1FXZA Bedienungsanleitung    Samsung HL50A650C1FXZA User Manual [en] [de] , 196 Seiten
UN32C4000PDXZA Bedienungsanleitung    Samsung UN32C4000PDXZA Manuel d'utilisation, 92 Seiten
PN42A410C1DXZA Bedienungsanleitung   Samsung PN42A410C1DXZA User Manual, 12 Seiten
LN19D450G1DXZA Bedienungsanleitung   Samsung LN19D450G1DXZA User Manual [de] , 2 Seiten
LTP2035X-XAA Bedienungsanleitung   Samsung LTP2035X-XAA User Manual [en] [de] , 7 Seiten
LNT4066FX-XAA Bedienungsanleitung    Samsung LNT4066FX-XAA User Manual, 178 Seiten
UN75F6400CFXZA Bedienungsanleitung   Samsung UN75F6400CFXZA User Manual, 2 Seiten
UN32D4000NDXZA Bedienungsanleitung   Samsung UN32D4000NDXZA User Manual, 17 Seiten
UN60C6300SFXZA Bedienungsanleitung   Samsung UN60C6300SFXZA User Manual [de] , 54 Seiten
LN32A540P2DXZA Bedienungsanleitung    Samsung LN32A540P2DXZA User Manual [de] , 133 Seiten
LN65B650X1FXZA Bedienungsanleitung    Samsung LN65B650X1FXZA Manuel d'utilisation, 2 Seiten
LN19B361C5DXZA Bedienungsanleitung    Samsung LN19B361C5DXZA User Manual, 93 Seiten
LN32A300J1DXZA Bedienungsanleitung     Samsung LN32A300J1DXZA User Manual, 187 Seiten
LNT375HAX-XAA Bedienungsanleitung    Samsung LNT375HAX-XAA Manuel d'utilisation, 141 Seiten
UN55F6100AFXZA Bedienungsanleitung   Samsung UN55F6100AFXZA User Manual, 130 Seiten