METHOD FOR COORDINATING TASKS IN A GSM NETWORK

Abstract: In a mobile unit of a GSM network (Global System For Mobile Communications), various tasks are performed under real-time constraints. After starting an execution of a first task, the execution of the first task is suspended a plurality of times for a respective plurality of time intervals. A second task is executed during at least one of the plurality of time intervals.

Description: to to 3 rr O CQ rr tr Ω rt Hj Hi 3 O 3 Ό rt ø CQ 3 rt CQ rt Ω OJ 1-3 ω 4 Φ rr en 0 OJ μ- φ if 0 0 μ- 0 0 φ ø Φ 0 Φ ' Φ OJ to μ-> ø 4 OJ H- H- H H- 3 O rt Φ OJ 0 CQ Φ ϋ 4 Hi Φ tr M Φ P. 3 CQ 3 Φ Ω ω Ω Ml 3 Φ Φ 3 Ω CQ μ- Hi Ω CQ * ! 0 W rt t t-r- $-> φ • σ μ- CQ CQ rr μ- •O 0 Hi OJ >< Q O tr CQ .— ^ μ- μ- CQ r Ω i ø rt CQ Φ μ- μ- 0 OJ Φ Hi OJ Hi CQ OJ to Hi μ- Ω 3 ø •x. Hi ø 4 μ- Φ P. 0 CQ ø 4 rt 0 0 0 ø Hi 3 P- Hi rt 3 OJ Φ < μ- 0 Φ CQ H- rr Φ OJ OJ IQ ø rr OJ CQ μ- μ- Φ 3 αi φ 0 0 φ φ 0 tr <! 0 *ϋ r Hi OJ CQ 0 0 0 Φ 3 0 ø φ P- tr o_ ø H 0 P. Tj Φ μ- Ω Hi μ- 0" OJ Hi 0 P. rt P- tr Φ < Ω OJ ^ rr P. P- OJ PJ rr CQ 0 0 OJ O PJ •ϋ CQ 0 Hi ø J μ- r φ 0 OJ t- 1 ω μ- 3 rt t £ μ- rr Hi ø 0 ø 1 Φ Hi <! Hi Φ μ- tr ■ s Hi 3 O rt 0 0 0 fc 0> rr Φ 0 0 μ- Q- μ- 0 0 rt μ- ø > ( -3 φ 0 OJ 3 •α to φ 0 Hi Hi 1-3 Φ ø Ω 0 Hi 0 Ω CQ r μ- ø J X CQ t ø 4 Hi ø 3 W 0 0 f 0 ø Hj <! OJ Hi ø 4 Ω Φ φ S OJ Φ CQ ?? ø μ- CQ Hi rt r O H- l- 3 CQ 0 Φ OJ Φ φ P- μ- $ rt Hi μ- Ω r Φ ø J ø 4 α 3 (ϊ ø Φ 3 H T3 Hi rt μ- CQ 3 OJ OJ 0 Ω OJ Φ OJ Φ Φ tV rt ø 4 Hi ■ τ| ■ t 0 OJ tf Ω 0 0 0 Ω rt 0 0 rt Hi 0 OJ rr 3 0 OJ ø 4 Φ rt ø 4 Φ 0 3 Hi μ- to Hi 0 φ ø 4 ø 4 tr tr μ- Φ Ω rt μ- P. rt H M 0 Φ μ- μ> μ- rr ø Φ φ Ω S Ω rt μ- CQ μ- 0 rt μ- 0 * 3 d Φ 0 0 to OJ 3 •ϋ Ω s; φ Ω OJ P- rt ^ ø rt Ω 0 rt μ- O ø 0 μ- CQ <! < ^ tr 0 μ- ø 4 0 ø 4 0 OJ μ- 0 CQ ø" Hj Φ a 0 ø Hi ø Φ Φ Ω Φ OJ tT Φ CQ Hi Ω OJ Ω Φ rt 0 Hi Φ μ- 0 CQ rt rt ø 0 O H en H- Ω V Φ 0 0 OJ rt OJ ø ? 0 tr CQ OJ μ- OJ OJ 3 • O rt rt O φ H 0 ) rr OJ μ- <! Hi ^ CQ Hi 3 Φ rr Ω 0 CQ O OJ μ- μ- d Φ Ω tf 0 Hi CQ Φ Φ 0 0 0 0 Hi OJ tr OJ Φ ■ 4 tr Hi OJ 0 0 α CQ Ω Φ 0 3 Hi OJ Hi <! 0 CQ Ω σ • rt OJ H Φ rt CQ μ- rt 0 0 Q rt CQ Φ tr 0 rt Φ .V Φ Hi Φ OJ μ- μ- CQ 0 t μ- 3 CD OJ rr CQ O φ Ω 0 μ- Q- Ω ii Hi O Φ •<; rt 0 μ- φ Ω φ 3! rr OJ CQ t-f * rt CQ 0 Φ r CQ φ "-3 ø μ- ϋ ø ø r 1-3 . H- rr — > ! o_ μ- OJ tr <! 0 rt ø 4 • CQ ø" CQ & rt ?V Ω ø 4 H O 0 H- CQ μ- 0 0 μ- * ; Φ D_ ø 4 Φ CQ Φ μ- rr μ- μ- OJ 0 OJ 0 ≥! 4 ø 0 Ω μ- <J ø 0 3 ϋ 0 Φ tr rt Q OJ <! Φ CQ 3 Hi P. Ω 0 0 E3 * Ω μ- CQ rt T3 rt Φ Hi Q Φ OJ tr rt μ- CQ 0 Ω 3 rt- CQ OJ su P- " * ø 4 I- 1 ∑-r Q- Φ Hi to rr rr OJ Hi μ- α • Ω en ø rt Hi 0 ø 0 ) 0 Φ Φ φ Φ CQ OJ S • C μ- CQ 0 0 Φ ør 3 ø 0 0 @ Ω tr 3 0 P- rt Hi 3 cr P- Φ 0 Φ Hi 0 Pi μ- Hi to O CQ Q- Φ ø 4 φ 0 ■ : rt μ- ø Φ ø H3 OJ ø Ω OJ • ! h- 1 J μ- Φ Ω ø cn 4 0 φ 0 CQ Φ CQ μ- ø 4 CQ φ OJ Ω to CQ OJ • ! ø Φ rt S rt PJ rt rt X 0 ø Φ rt rt 3 0 I- 1 rr CQ Φ rr Ω Φ 4 rt ^ 3 OJ OJ tr rt rr S μ- Φ O OJ Φ tr rt t 0 cn 0- ø Φ μ- 0 0 ι-3 rt 3 ω 0 Hi ø 4 0 0 rt Hi • ; 3 OJ ii 3 . φ OJ ø Hi tr ø 4 μ- » *< 0 Φ Hi 0 ø ^ P. Φ CQ ø S rr Hi r Q ? ? μ- Φ 0 H 1 CQ rt 0 t CQ 0 μ- > Hj φ Ω ø 4 " 0 0 $ n 3 - 1 0 Φ rt ø 4 Ω Ω — P. ø rr μ- Hi φ ii 0 S 0 Φ φ ø Φ H{ rt to OJ Ω r ø Ω Φ rt 0 Hi σ OJ 0 Φ CQ OJ 3 Φ μ- 3 13 Hi rt to en ii H ø 4 Φ $ rr W ø μ- 0 CQ ø rt 0 Φ O ii 0 μ- 3 H- 3 OJ Φ 0 0 H. Φ h- 1 0 0 CQ ■ t tr Ω OJ 0 0 0 H. ø αι 0 ø CQ Hi Hi OJ μ- rt φ rt Hi Φ 0 CQ Φ 0 3 OJ Φ rt IQ ≥. •d CQ l-h tn Φ tV P- 0 CQ $ ø 4 Φ H{ Hi *< M & OJ - 1 rt 0 Ω H- H Ω 0 φ 0 Φ CQ 0 CQ Φ CQ CQ CQ μ- •t Ω 0 rt rt 0 Φ H CQ Φ ø Hi Hi P- Hi rt Hi rt ø OJ ø Φ 0 0 0 OJ s: CQ rr H- ii CQ Φ μ- W OJ r OJ CQ φ ø HJ ii CQ o Φ 0 r OJ OJ Φ r H <! rt Tf ø J 0 0 3 OJ 0 ■ n rt ? P. t to h- 1 Ω Φ 4 CQ 0 Hi μ- μ- OJ φ P- tr Hi Φ OJ μ- M μ- CQ w Hi 0 Hi Φ ι-3 μ- P- 0 Hi CQ Ω rt Hi rt μ- OJ ø M O OJ Hi ø φ cn 0 rt rt tr *< 0 rt ■ t rt μ- ω ■ ! OJ μ- P- to OJ OJ IQ Q- μ- H{ Φ CQ 0 Φ 0 CQ φ Φ rt ø H- t- 1 rt μ- ^ CQ Ω ø Ω 0 OJ rt rt rt l- 1 ii m Ω Hi μ- <! OJ OJ t-i Φ μ- μ- OJ μ- Ω OJ Hi 0 ■ t Φ Hi Φ f 0 ø OJ μ- ^ rr ϋ ø Φ 0 CQ Φ 3 0 *ϋ ø 0 Φ H- μ- CQ μ- 3 rt rt Φ ø 4 OJ Hi M CQ p. • Hi Φ H 0 ø • 0 0 & 0 CQ 0 0 Φ P< ø Φ into three sublayers, which include the functions of radio resources management, mobility management, and connection management . Conventional cellular telephones or any other GSM modules used in the GSM network include at least one microcontroller (mC) and a digital signal processor (DSP) for performing various processing tasks. Conventional cellular telephones have a clear separation of responsibilities between the microcontroller (μC) and the di- gital signal processor (DSP) . The digital signal processor (DSP) executes the tasks of signal filtering, modulation, equalization and other tasks that are part of the GSM protocol layer 1. Routines or tasks of the GSM protocol layer 1 are generally time- critical. The digital signal processor tasks of the GSM protocol layer 1 are distinguished by routines having a short duration and a short latency. Layer 1 tasks having a short duration are for example equalizing functions. The term latency is loosely defined as a delay time or response time between an initiation of a request or routine and the completion of that request or routine. The digital signal processor routines for the GSM protocol layer 1 however also include routines that take a long time to execute, such as voice encoding and voice decoding. The execution of a voice encoding' or voice decoding may for example take up to four milliseconds. The microcontroller in a conventional cellular telephone executes routines for the GSM protocol layers 1, 2, and 3 and routines for the man-machine interface (MMI) . The functions of the GSM protocol layer 1 are time-critical and must be prioritized. The GSM protocol layers 2 and 3 as well as the man-machine interface are distinguished by routines or tasks that are generally not time- critical. Conventional cellular telephones are configured such that there is a distinctive separation of hardware as well as a functional separation between, on the one hand, the microcontroller and, on to to o © P. ra tr r 0 ø Φ Hi rt Φ 0 Φ $ 0 CQ φ 0 rt φ r rt 0 ø rt ^ φ OJ OJ rt Hi tr rt ø 4 Φ Φ ør O ø μ- 3 TJ CQ μ- ø 4 Ω *• OJ Hi ■ : 0 r Ω ø • 0 Φ 0 Hi 0 Hi μ- rt o Hi rt Hi 0 C ø 4 μ- Φ rt r μ- Φ O 3 N Hi H Φ 0 P. OJ Ω " 0 Φ P. CO rt CQ μ- rt O μ- 3 ø 4 0 Φ Φ CQ • Ω P. H H{ ii μ- φ μ- CQ CQ rt μ- 0 μ- rt C 0 Ω OJ Hi J ι—> Ω H Φ ω • CQ μ- • ø CQ ø ø H- Ω OJ H3 rt ø 4 μ- Φ 0 TJ ø Hi C CQ CQ o Φ Ω • T) 0 φ O OJ Hi 03 H Hi ω O OJ rt 0 r rr OJ Hi μ- CQ 0 p φ ø CQ 0 μC-DSP will therefore execute the GSM layer 1 routines first and will execute any upper layer routines or man-machine interface routines only after all layer 1 routines or tasks are executed. A proper operation of the cellular telephone within the GSM network requires that the μC-DSP performs some of the upper layer routines (GSM protocol layers 2 and 3) at regular time intervals. However, since the single-core μC-DSP executes the upper layer routines or man-machine interface routines only after all layer 1 routines or tasks are executed, the upper layer routines are delayed by an unacceptably long time period. As a result, some upper layer tasks are not performed in time for a proper operation of a cellular telephone in a GSM network. Due to the conflicting requirements that must be met for the layer 1 routines and for the upper layer routines, it has so far not been possible to use a single-core μC-DSP for GSM applications. Summary of the Invention: It is accordingly an object of the invention to provide a method for coordinating tasks in a real-time system, such as the GSM network, which overcomes the above-mentioned disadvantages of the prior art and which can reliably coordinate GSM layer 1 tasks, GSM upper layer tasks, and other application tasks under realtime constraints. With the foregoing and other objects in view there is provided, in accordance with the invention, a method for coordinating tasks in a real-time system, which includes the steps of: providing a first task and a second task; starting an execution of the first task; suspending the execution of the first task a plurality of times for a respective plurality of time intervals; and executing the second task during at least one of the plurality of time intervals. In accordance with another mode of the invention, a first priori- ty is assigned to the first task and a second priority is assigned to the second task, such that the first priority is higher than the second priority. In accordance with yet another mode of the invention, the first task includes GSM layer 1 tasks and the second task includes GSM upper layer tasks . In accordance with a further mode of the invention, a termination time of the first task is estimated for providing an estimated termination time. The execution of the first task is suspended based on the estimated termination time. In accordance with another mode of the invention, the first task is executed uninterrupted until real-time requirements of the first task are met. In accordance with yet another mode of the invention, the suspending step is scheduled with a real-time operating system. In accordance with a further mode of the invention, the first task and the second task are executed with a single-core mC-DSP of a mobile station in a GSM network. In accordance with yet a further mode of the invention, the sus- pending step is scheduled with a real-time operating system which has interruptible system calls. In accordance with another mode of the invention, the suspending step is scheduled with a real-time operating system, which has non-interruptible system calls. The non-interruptible system calls are in this case deterministic systems calls having a duration shorter than a latency period of the first task. In accordance with a further mode of the invention, the first and second tasks include GSM Interrupt Service Routines, application Interrupt Service Routines, GSM Interrupt Service Threads, application Interrupt Service Threads, and application tasks. Respective priorities are assigned in a falling order to the GSM Interrupt Service Routines, the application Interrupt Service Routines, the GSM Interrupt Service Threads, the application Interrupt Service Threads, and the application tasks. Other features which are considered as characteristic for the invention are set forth in the appended claims. Although the invention is illustrated and described herein as embodied in a method for coordinating tasks in a real-time system, it is nevertheless not intended to be limited to the details shown, since various modifications and structural changes may be made therein without departing from the spirit of the invention and within the scope and range of equivalents of the claims. The construction and method of operation of the invention, however, together with additional objects and advantages thereof will be best understood from the following description of specific embodiments when read in connection with the accompanying drawings. Brief Description of the Drawings : Fig. 1 is a simplified block diagram of a GSM network; Fig. 2 is a block diagram illustrating a signalling protocol structure for a mobile station in a GSM network; Fig. 3 is a simplified TDMA timing diagram; Fig. 4 is a timing diagram illustrating an operation of a single- core μC-DSP without using the method according to the invention; and Fig. 5 is a timing diagram illustrating an operation of a single- core μC-DSP using the method according to the invention. Description of the Preferred Embodiments: Referring now to the figures of the drawings in detail and first, particularly, to Fig. 1 thereof, there is shown a simplified block diagram of a GSM network. The GSM network is composed of several functional entities whose functions and interfaces are described in the GSM specifications. The GSM network can be divided into three main parts, namely the mobile station MS, the base station subsystem and the network subsystem. The mobile station MS, for example a cellular telephone, is a portable device which is carried by a subscriber. In accordance with the invention, the mobile station MS is equipped with a single-core μC-DSP which has a scratchpad memory. The base station subsystem controls the radio link with the mobile station MS. The network subsystem, the main part of which is the mobile switching center MSC, performs the switching of calls between the mobile users, and between mobile and fixed network users. Elements of the GSM network which are not necessary for understanding the invention are not shown in Fig. 1, such as the operations and maintenance center, which oversees the proper operation and setup of the network. The mobile station MS and the base station subsystem communicate across an air interface. The base station subsystem communicates with the mobile switching center MSC. The mobile switching center MSC is connected to a public switched telephone network PSTN. The base station subsystem is composed of two parts, the base transceiver station BTS and the base station controller BSC. The base transceiver station BTS houses the radio tranceivers that define a radio cell and handles the radio-link protocols with the w w t to o o O Φ> 03 ^ύ CQ rt • rt μ- ø μ- cn Hi CQ tr 3 H 0 Φ u. Ω OJ rt > > CO 3 ø φ " μ- Hi μ- ii 0 Φ rt Ω μ- 0 0 3 o D 03 01 φ Φ rt rt Ω P- H{ 0 0 OJ rt rt ø Hi P. 0 Φ μ- 01 Hi CD 3 Φ rt OJ 0 ø 4 co 0 Φ CD CQ μ- 0 Ω rt 3 OJ to 3 0 3 ι P. μ- — 13 Hi . μ- Hi μ- 03 0 φ rr p. K ' P. O OJ μ- Ω rr Ω <! 0 μ- ø 4 μ- l- 1 3 μ- r φ ø μ- P. OJ CQ 3 ><: Φ μ- Φ P. 0 ii μ- Q rt J 0 H CQ 0 . Hj rt Φ OJ μ- 3 μ- CQ H m ø 4 OJ 0 rt Ω Hi o • ø 4 rr rt σi μ- H ø 4 1 3 σ Φ o φ > H 3 CQ σ μ- \—- Hi [ -j 0 HJ *> rt OJ μ- CD 3 co φ φ μ- CQ conds long and holds tail bits TB, encrypted bits EB, training bits TRB, and guard bits GB. One time slot of each TDMA frame is used for transmission by the mobile station MS and one time slot of each TDMA frame is used for reception by the mobile station MS. The transmit time slot Tx and the receive time slot Rx are separated in time so that the mobile station MS does not receive and transmit at the same time. The bottom part of Fig. 3 illustrates a TDMA frame sequence in which time slot 0 is used as a receive time slot Rx and time slot 3 is used a transmit time slot Tx. A total of 156.25 bits is transmitted in 0.577 milliseconds, resulting in a total bit rate of 270 kbps for the illustrated example. TDMA frames are further grouped into multiframes to carry control signals. There are two types of multiframe, containing 26 and 51 TDMA frames, respectively. The 26-frame multiframe contains 24 traffic channels TCH and two slow associated control channels SACCH which supervise each call in progress. A fast associated control channel FACCH operates by stealing slots from a traffic channel TCH in order to transmit power control and handover- signalling messages. Several other control channels are implemented in the TDMA frames . The GSM protocol layer 1, in its simplest form, allows only for voice transmission. A single-core μC-DSP is used to perform the operations necessary to send a user's voice over a duplex speech channel TCH/FS (traffic channel/full rate speed) . The operations which must be performed by the single-core μC-DSP include for ex- ample a speech encoding (RPE-LTP, regular pulse excited - linear predictive coding) , an error correction, a reordering of bits, a convolutional encoding, and an interleaving operation. A number of operations must be performed at a frequency of 50 Hz, because each 20 milliseconds a voice sample is provided for the encoding process, resulting in a data rate of 13 kbits/s. The results of these operations are encrypted and stored in a buffer. The en- to t o o o „ Hi O Ω tr tr CQ P. OJ rt Hj O OJ OJ tr m ≤ rt OJ Hi OJ 0 3 rr rt 0 Ω μ- rt OJ OJ OJ rt μ- Φ φ 0 3 0 OJ tr μ- Φ Hi OJ ii 03 ø μ- O to rt OJ 0 ø <! OJ Ω CQ Hj 03 > i ø Φ P. Φ rt φ Φ 03 PJ ø 3 3 ør Hi P- Φ rt OJ 0 Hi rt • ! H P. rt 0 rt ϋ 0 φ tr p. tr l 1ϋ3? Φ P. rt 0 φ 3 rt 03 13 id 03 O -3 CQ rt φ rt CO Φ μ- 13 O tr OJ φ μ- φ Hj CQ cn Hi 3 tr Ω CQ rt OJ Hi 0 CQ rt rt Hi Φ 0 < Hi Hl Φ 0 13 0 0 μ- s; μ- ø 4 Ω tr Hi 03 % tr Φ CQ Hi Ω <l Φ Hi Hi 0 03 tr Ω Φ tr φ rt tr 0 rt 3 r rt μ- Φ μ] tr μ- Φ 0 03 μ- ø 4 P. Φ 0 Φ Hi ø 4 OJ tr ø OJ rt OJ Hi tr P. Ω ø <! μ- μ- Ω 0 P. Ω rt H P- Φ μ- 0 Φ rt ø r 0 Φ φ φ tr rt 0 ø 0 tr Φ 0 tr tr Φ 03 P. φ Φ Pi 0 OJ p. μ- μ- P. 0 X φ OJ φ tr X <i 13 H 1 Hj Hi μ- rt Ω Hi CQ ø Ω φ 13 OJ Hj φ ø • ; Φ OJ Hj 0 φ 0 Hi ø tr μ- cn Φ Hi rt Φ Φ 13 03 Hi 3 ω ø Q Ω Hi μ- CQ Hi 0 ø rr μ- ø rt 3 0 OJ 03 φ Φ 0 μ- Φ 13 0 0 μ- 0 Φ CD rt 13 CQ rt S 13 Hi 0 Φ ø rt <! ø rt H Φ rt rt OJ Hi P. • μ- rt o 4 Hj Hi P. ,~ ^ ø P. rt μ- φ tr Φ tr Φ tr μ- 0 φ Φ μ> Φ 0 0 0 OJ Ω Φ μ- P. 03 μ] Φ OJ Ω Φ P. rt φ P. μ- 03 CQ 0 <J CQ Hi 0 0 ø ø φ tr ø tr Hj Φ • ; H 03 ø rt μ- rt μ- Φ P. -> Pi rt CQ rt Φ Ω p. • M 0 tr rt ø 0 μ- P. • μ- CQ Hi tr cn OJ rt 0 OJ OJ •<! Φ 13 rt Hi ø Φ •> ø ■ : 0 Φ Ω 3 CQ ø OJ H S Hi Ω 0 ii Hj Hi Φ Φ P- μ- to CQ OJ 0 n 13 p. ω tr tr tr Hi Φ μ- Hj μ- Hi H CQ rt td OJ \ Hi 0 Ω Q 3 Hi φ tr φ Φ rt P. ø ø o Hi O Hi r ■ τ| rt P. Hj P. rt 0 φ Ω 03 Hj ø rt φ 0 rt 13 Hi 0 0 Hi o t Φ Φ 0 μ- 0 CQ ø Ω r . μ- Φ Φ OJ Hi 0 rt μ- 13 rt 0 Hi 3 Ω 3 P. 0 tr Ω rt tr OJ ø CQ 0 o rt rt μ- Hj 0 Hi Ii? 0 OJ 0 OJ tr μ- ø P. μ- rt ;r rt 4 ø rt OJ P. o 13 P. rt rt OJ " Φ ø p. ø id μ- ø OJ o φ OJ OJ tr φ tr 0 Φ 0 Φ μ- tr OJ . P. φ Φ Φ 0 <! i 03 μ- 0 0 ø OJ 03 φ Hj rt Φ ø φ μ- 03 0 03 Ω M Hi μ- μ- tr 03 CQ rt p. P. ø Hj 0 0 μ- Ω CQ rr rt rt 0 P. <! Ω Hi t-3 P. μ- 13 ø tr • rt H{ •^ OJ Φ OJ P. Φ Φ ø μ- μ- tr OJ μ- Φ tr H 1 ø μ- Φ Ω Φ Hi Ω OJ H ø μ] φ P. rt rt * » ii Ω OJ P. $ ^ a OJ rt Hj ø φ ø X OJ P- P. φ 0 ø Hj Φ φ Ω ø Hi 0 CQ 0 ø 0 P. Φ 03 Φ 03 μ- 03 0 3 OJ tr ø 0 <! CQ 0 r Φ tr ø 3 φ αi μ- • Pi 13 tr Φ rt rt H μ- 0 P. 0 μ- Ω I tfl μ- Hi 0 μ- P. -≤ -. 03 φ μ- μ- Φ OJ ø μ- s; φ P. o 03 ø Ω rt Hi 03 Φ 0 Hi Φ rt tr OJ Hi CQ μ- rt Ω tr φ 0 tr tr tr CQ P. H μ- rt ι-3 CD «• CQ μ- μ- rt tr ø Φ μ- CQ OJ OJ φ Ω μ- P- ø tr tr rt CQ Φ tr CQ rr t tr Ω 0 t-- £, 0 ø μ- Hj O 0 tr φ Φ 0 rt Ω 03 0 Pi φ Φ OJ tr g μ- P. Ω 3 α ø •^ <J μ- ϋ Hi tr OJ Hi OJ Hi μ- ø Ω to rt Φ 13 rt K OJ rt φ OJ Φ 0 μ- μ- tr rt ø Hj ø P. OJ OJ tr K P. o φ s Ω 03 OJ Hj ω Hi tr ø rr • ; OJ P. ø rt ϋ H Hj t Φ μ- 0 0 rt < tr P. tr CQ 13 Φ μ- Φ H 0 OJ I ^ 3 φ ^-. rt M ø Q Hi <! tr 0 φ μ- 3 OJ tr P. rt Hi ø Φ ø ii ø φ CQ Ω rt tr μ- φ φ Φ μ- Ω CQ 0 Hi rr ø P. rt ii 0 ø 0 μ- rt μ- 1 3 Ω CQ OJ 0 ø tr 0 φ o μ- Φ ø l- 1 rt 0 P. ø Φ 13 OJ Ω- Φ φ φ rt CQ ø 0 0 OJ 13 Hj ø μ- ø P. rt Hi φ CQ H" φ a • g tr rt φ φ Hi o ø rt Hi ø φ ø μ- Hj rt Hj 03 Φ OJ Φ 03 03 OJ CQ 4 rt P. 0 μ- rt CQ Ω ø OJ ø 4 Ω 03 ø 03 O Ω OJ ø tr s; φ Hi ø 4 13 ø φ φ rr Φ to P. OJ Pi rt Hj p. tr OJ Hj 0 Hi φ OJ rt rt O ^. P. 03 Φ 3 φ 0 0 Ω μ- μ- μ- 0 ø ϋ 0 φ l__l Ω Ω P. Hi Ω Hi OJ tr N μ- μ- Ω CQ S_ rt 0 CQ P. μ- H μ- ^ tr ^-. I to to Hi 0 OJ 0 φ Φ ø ø tr tr μ- . 03 Hj ø to OJ itα 0 3 0 P. g. 03 H H{ H P. Hj r rt 0 μ- ø μ- Φ 0 rt ø OJ ø 0 φ tr 13 t- 1 3 Φ Φ Φ rt tr Ω Φ ø Hi OJ 13 Φ 11 Pi M rt Hi rt Hi μ- φ CD P. OJ Ω Hi Hj OJ OJ tr CQ H3 CQ ø rt Hi Hi μ- 0 μ- — Ω φ μ- 1 OJ Hj Hj CO H" μ- tr μ- H ø ø tr Ω rr OJ OJ CQ 0 0 ø tr μ- ø Φ Ω φ tr ø — ' to φ φ tr r 0 13 13 03 ø OJ OJ X M 13 OJ CQ 03 Φ rt rt 0 0 Φ rt -' routine with the highest priority that is ready to be performed. The called routine will get the CPU (Central Processing Unit) until it returns. The called routine will be interrupted by other interrupt handlers but will not be interrupted by other tasks. A real-time operating system or short RTOS, preferably a commercially available RTOS, is used to schedule and control the single-core μC-DSP. The RTOS must be able to comply with the realtime requirement of the GSM protocol layer 1. In order to explain the method according to the invention, first the operation of a single-core μC-DSP without using the method according to the according to the invention (GSM scheduler) is explained with reference to Fig. 4. Fig. 4 shows a series of TDMA frames, each frame having eight time slots. The first time slot of each TDMA frame is the transmit time slot Tx, the sixth time slot in each TDMA frame is the receive time slot Rx. The run times of various GSM routines, which are performed by the μC~ DSP, are indicated. AEC indicates an asynchronous echo cancella- tion routine. VEnc indicates a voice encoding routine, CEnc indicates a channel encoding routine, CDec indicates a channel decoding routine, VDec indicates a voice decoding routine, DMA indicates a direct memory access routine, Equalizer indicates an equalizing routine. Some of the GSM routines or application tasks, such as the voice encoding and the voice decoding have long run times . Since the single-core μC-DSP executes the upper layer routines or man-machine interface routines only after all layer 1 routines or tasks are executed, the upper layer routines are delayed by an unacceptably long time period. As a result, some upper layer tasks are not performed in time for a proper operation of a cellular telephone which is equipped with a single-core μC-DSP. Fig. 4 illustrates that no upper layer tasks can be performed for a period of more than two TDMA frames. The periods during which no layer 1 routines are performed and during which upper layer tasks may be performed are indicated by three dots. The method according to the invention solves the problem of coor- dinating layer 1 routines and upper layer tasks by monitoring and scheduling operations which cause the layer 1 routines to release the μC-DSP at regular intervals. Thus the μC-DSP is available for performing upper layer tasks during these time intervals. The upper layer tasks and other routines can be performed during these free intervals. As a consequence, the upper layer tasks, MMI (man machine interface) routines and any other tasks performed during these time intervals exhibit a certain degree of realtime behavior. In effect, the method according to the invention performs the upper layer tasks as if they were performed by a se- parate microcontroller. The method according to the invention provides a so-called "logical microcontroller" for the upper layer tasks . Fig. 5 illustrates the method according to the invention. Fig. 5 shows a series of TDMA frames, each frame having eight time slots. The first time slot (time slot 0) of each TDMA frame is the transmit time slot Tx, the sixth time slot (time slot 5) in each TDMA frame is the receive time slot Rx. The run times of various GSM routines, which are performed by the μC-DSP, are in- dicated along the time axis. AEC indicates an asynchronous echo cancellation routine. VEnc indicates a voice encoding routine, CEnc indicates a channel encoding routine, CDec indicates a channel decoding routine, VDec indicates a voice decoding routine, DMA indicates a direct memory access routine, Equalizer indicates an equalizing routine. The method according to the invention uses the above-mentioned "GSM scheduler" which is a superordinated task. This GSM scheduler resumes and suspends the layer 1 tasks to produce the beha- vior of the "logical microcontroller." The periods during which no layer 1 routines are performed and during which upper layer tasks, MMI tasks or other tasks may be performed are indicated by dots. Fig. 5 illustrates that layer 1 routines are suspended and resumed at regular time intervals. Suspending and resuming the layer 1 routines provides time periods during which upper layer tasks can be performed. From Fig. 5 it can be seen that the method according to the invention provides several time periods per TDMA frame during which upper layer tasks can be performed. The GSM tasks are scheduled (interrupted and restored) such that application tasks get enough processor time at regular time in- tervals. The scheduling operations according to the invention are performed by the GSM scheduler, which is preferably loaded as a super- ordinated task in a Scratchpad RAM (random access memory) of the single-core μC-DSP. This ensures the correct timing of critical routines without having to rely on a cache memory. The GSM scheduler performs a real-time monitoring of the execution of GSM tasks. Due to the real-time requirements that must be met, the GSM scheduler runs at the highest priority. The GSM scheduler may be provided such that it runs in a time-slice mode or in a non-interruptible mode. In the time-slice operating mode, the GSM scheduler performs the following tasks : • sending messages to start a GSM task; • setting a timer and estimating a termination time of a GSM task; • suspending itself when a GSM task is running; • supending a running task or resuming a suspended task based on timer information; • switching into a non-interruptible mode if a termination time is exceeded, in other words partially disabling itself; and • receiving a message from a GSM task when the GSM task is ready to be performed. In the non-interruptible mode, the GSM scheduler performs the following tasks: • disabling application interrupts; • run pending GSM tasks without interruption until the GSM tasks are in time and meet the real-time requirements; and • switching into the time-sliced mode. In order to properly perform both, time-critical GSM layer 1 routines and upper layer routines or application tasks, the method according to the invention, in other words the GSM scheduler, must meet a number of requirements. Firstly, it is important to be able to interrupt the application tasks which are currently executing a system call. Otherwise, once an application task has started a system call, it is not possible to start a time-critical routine, such as a GSM layer 1 routine, during the latency time of the application tasks. Two solutions are provided for this problem. 1) All system calls are provided as deterministic calls and their duration is very short (not more than about 10 microseconds) . This requirement can be expressed as a latency condition for a non-interruptible RTOS (real-time operating system) to be used for the method according to the invention. The latency condition is defined as : duration(system_call)+latency(GSM_tiιner_ISR)<slιortest_GSM_latency « 10 microseconds In other words, the duration of a system call plus the latency duration of an interrupt service routine ISR is not longer than the shortest latency duration of a critical GSM routine, which is about 10 microseconds. 2) System calls are provided as interruptible calls. As men- tioned above, an RTOS (real-time operating system) is used to schedule and control the single-core μC-DSP and in this case the RTOS must provide interruptible system calls. Secondly, GSM routines that perform the speech encoding and the speech decoding have generally very long run times. While the speech encoding or speech decoding is performed, no application tasks can be performed. In accordance with the invention, the execution of the speech encoding and of the speech decoding is interrupted on a regular basis, in order to allow the execution of application tasks. The interruption of the speech encoding and speech decoding routines is implemented by using so-called ISTs (interrupt service threads) or RTOS tasks. The GSM protocol layer 1 in the RTOS is structured such that the GSM constraints can be fulfilled. In particular, GSM routines have medium to very short latency times. Routines with very short latency times are implemented as interrupt service routines (ISRs) or interrupt service threads (ISTs) . ISRs are interrupt handlers and cannot execute system calls. No task is executed as long as any ISR execution is pending. ISTs are similar to user tasks and they may execute any system call. ISTs have a higher priority than any other application task. Routines having a medium latency time such as speech and channel codecs are preferably implemented as RTOS tasks . In order to meet the real-time constraints of the GSM network, the method according to the invention also assigns respective priorities to the various tasks to be performed by the μC-DSP. A high priority is assigned to ISRs for power management, emergency modes etc.. Next in terms of priority are ISRs for GSM firmware routines, such as VB (voice band) , equalization routines, monitoring routines, and FCB (frequency correction burst) routines. Next are ISRs for standard applications and below those, in terms of priority, are certain GSM scheduling functions such as schedu- ling GSM tasks in order to enable application tasks to get processor time, loading GSM tasks into the Scratchpad memory, or o making sure that the GSM firmware is running under all circumstances. Low priorities are assigned to some application routines such as idle routines. The respective priority classes of the system can be expressed by the following relation: GSMJESR>~AppJSR- GSM ST- AppJST App ask In other words, application ISRs (App_IRS) have a lower priority than GSM ISRs (GSM_ISR) and thus they are allowed to interrupt the speech/channel decoders/encoders only for a short period of time. After performing tasks such as reading from or writing to registers of hardware devices, the application IRSs (App_IRS) exit and inform or signal the application ISTs (App_IST) that some operations need to be performed. However, as can be seen from the above relation, application ISTs (App_IST) can be executed only when no GSM ISRs (GSM_ISR) or GSM ISTs (GSM_ISTs) are ready to run, since GSM ISRs and GSM ISTs take precedence over application ISTs.

Claims: We claim: 1. A method for coordinating tasks in a real-time system, the method which comprises: providing a first task and a second task; starting an execution of the first task; suspending the execution of the first task a plurality of times for a respective plurality of time intervals; and executing the second task during at least one of the plurality of time intervals. 2. The method according to claim 1, which comprises: assigning a first priority to the first task; and assigning a second priority to the second task, the first priority being higher than the second priority. 3. The method according to claim 1, wherein the first task includes GSM layer 1 tasks and the second task includes GSM upper layer tasks. 4. The method according to claim 1, which comprises: estimating a termination time of the first task for providing an estimated termination time; and suspending the execution of the first task based on the estimated termination time. o 5. The method according to claim 1, which comprises executing the first task uninterrupted until real-time requirements of the first task are met. 6. The method according to claim 1, which comprises scheduling the suspending step with a real-time operating system. 7. The method according to claim 1, which comprises executing the first task and the second task with a single-core micro- processor digital signal processor of a mobile station in a GSM network. 8. The method according to claim 1, which comprises scheduling the suspending step with a real-time operating system having in- terruptible system calls. 9. The method according to claim 1, which comprises: scheduling the suspending step with a real-time operating system having non-interruptible system calls; and providing the non-interruptible system calls as deterministic systems calls having durations shorter than a latency period of the first task. 10. The method according to claim 1, which comprises: providing, as the first and second tasks, a GSM Interrupt Service Routine, an application Interrupt Service Routine, a GSM Inter- rupt Service Thread, an application Interrupt Service Thread, and an application task; and assigning respective priorities in a falling order to the GSM Interrupt Service Routine, the application Interrupt Service Routi- ne, the GSM Interrupt Service Thread, the application Interrupt Service Thread, and the application task.

Inventors: ALONSO NOGUEIRO LUIS ALFREDO, KUEFNER HOLGER, ALONSO NOGUEIRO, LUIS ALFREDO, KUEFNER, HOLGER
Applicants: ALONSO NOGUEIRO LUIS ALFREDO, INFINEON TECHNOLOGIES AG, KUEFNER HOLGER, ALONSO NOGUEIRO, LUIS ALFREDO, KUEFNER, HOLGER
Application year: 2001
Main classification: G06F9
IPC codes: G06F9, H04B7