Revised Title: Telecom Engineering Exam: MEng at Cork Institute of Technology, Jan 2007, Exams of Embedded Systems

The instructions and questions for a 2-hour exam on embedded systems software development for students pursuing a master of engineering in telecommunications engineering at cork institute of technology. The exam covers topics such as statecharts, finite state machines, inter-task communications, frame size, static scheduler, and interrupt handling in the context of an rtos. Students are required to answer question 1 and any two other questions, and may use class notes. The exam is overseen by mr. P. French, dr. S. Mcgrath, mr. A. Murphy, and mr. D. O’donovan.

Typology: Exams

2012/2013

Uploaded on 03/31/2013

paramita
paramita 🇮🇳

4.6

(16)

120 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Cork Institute of Technology
Master of Engineering in Telecommunications Engineering
January 2007
Embedded Systems Software Development
(Time: 2 Hours)
Read instructions carefully
Answer Question 1 AND any TWO other questions.
Class notes MAY be used.
Examiners: Mr. P. French
Dr. S. McGrath
Mr. A. Murphy
Mr. D. O’Donovan
1. The operation of a microwave oven may be described by Figure 5 in Appendix A.
a) Discuss the benefits of statecharts over finite state machines. Use the microwave oven
in Figure 5 to illustrate your answer. [6 %]
b) Describe each of the following concepts used for inter-task communications in a typical
RTOS.
i. Event flag group
ii. Pipe
iii. Mailbox. [6 %]
c) Select a situation from Figure 5 to illustrate how an event flag group may be applied.
[2 %]
d) Taking any 2 of the communications mechanisms discussed in b) show, using µC/OS-II
RTOS commands, how you would
Create
Signal
Receive
the communication from one task to another. [8 %]
(continued over)
pf3
pf4
pf5

Partial preview of the text

Download Revised Title: Telecom Engineering Exam: MEng at Cork Institute of Technology, Jan 2007 and more Exams Embedded Systems in PDF only on Docsity!

Cork Institute of Technology

Master of Engineering in Telecommunications Engineering

January 2007

Embedded Systems Software Development

(Time: 2 Hours)

Read instructions carefully Answer Question 1 AND any TWO other questions. Class notes MAY be used.

Examiners: Mr. P. French Dr. S. McGrath Mr. A. Murphy Mr. D. O’Donovan

  1. The operation of a microwave oven may be described by Figure 5 in Appendix A.

a) Discuss the benefits of statecharts over finite state machines. Use the microwave oven in Figure 5 to illustrate your answer. [6 %]

b) Describe each of the following concepts used for inter-task communications in a typical RTOS. i. Event flag group ii. Pipe iii. Mailbox. [6 %]

c) Select a situation from Figure 5 to illustrate how an event flag group may be applied. [2 %]

d) Taking any 2 of the communications mechanisms discussed in b) show, using μC/OS-II RTOS commands, how you would

  • Create
  • Signal
  • Receive the communication from one task to another. [8 %]

(continued over)

e) In Figure 5, assume the (period, execution time) for the following tasks are: ‘Cooking’ task (10, 4) ‘Displaying’ task (15, 4) ‘Door’ task (6, 1) where all values quoted are in milliseconds.

For the three periodic tasks above: i. Select an appropriate frame size [2 %] ii. Determine an appropriate static scheduler for the corresponding hyper- period. [6 %] iii. How would such a scheduler be implemented in practice? [4 %]

f) ‘The commands void OSIntEnter(void) and void OSIntExit(void) should be called on entry and exit of an ISR in the μC/OS-II RTOS.’

Discuss why these two commands are required. During your discussion make reference to inter-task communications and nesting interrupts. [6 %]

  1. a) In connection with software architectures contrast and compare Function queue scheduling with Round robin with interrupts. [6 %]

b) Why is the keyword ‘volatile’ in the C language a necessity in terms of RTOS. [2 %]

c) Consider the following generic RTOS code: (It is assumed that GetLevelValue() and SetOffAlarm()exist.) static int iLevels[2]; void interrupt vReadLevels (void) { iLevels[0] = GetLevelValue(); iLevels[1] = GetLevelValue(); } void main (void) { int iLevel0, iLevel1; while (TRUE) { iTemp0 = iLevels[0]; iTemp1 = iLevels[1]; if (iLevel0 != iLevel1) { SetOffAlarm(); } } } Figure 1 (continued over)

  1. a) Contrast and compare 3 types of semaphore and give example syntax from the μC/OS-II RTOS. [9 %]

b) Describe what is meant by Priority inversion how μC/OS-II RTOS deals with this issue [6 %] c) Draw a table showing the outcome of Figure 3 for a priority-driven, pre-emptive scheduler for a two processor system. [15 %]

Figure 3

  1. a) Discuss the role of interrupt service routine (ISR) in RTOS programming. Your discussion should address the following: i. Types of interrupt ii. Response time [8 %]

b) Describe the problem associated with the unblocking of higher priority tasks from interrupt routines, as illustrated in Figure 4. How may this problem be remedied? [5 %]

Figure 4

c) How are interrupts connected to the shared data problem in RTOSs? Describe 2 methods for solving this problem. [6 %] (continued over)

d) In a static schedule RTOS configuration, explain one approach for dealing with the occurrences of interrupts? [4 %]

e) Explain, using examples, how jitter is introduced into RTOS timing delay. How can such delays be minimised? [7 %]

Appendix A:

Figure 5

evEnter

evCook[IS_IN(DoorClosed)/cookTiime = params->timeToCook(cookTime);

Emitter Idle

Door Clock Source

Cooking

Microwave Oven

entry/theEmitter->disable()

tm(CookTime)

evDoorOpen evCook[IS_IN(DoorClosed)]

evStop

evSetPower/pclOn = params->pclOb; OnTime = 1000 * pclOn;OffTime = 1000 * (1-pclOn);

WaitingToEmit tm(OnTime)/theEmitter->Disable(); Emitting

tm(OffTime)/theEmitter->enable();

DoorOpen DoorClosed

evDoorClose evDoorOpen WaitingForTick

tm(1000)/++timeOfDay; GEN(evTick);

[else] [isDoorClosed()]

DisplayTimeOfDay entryClock ->show(timeOfDay);

evTick/theClock ->show(timeOfDay) Processing

DisplayTimeOfDay entry/theDisplay ->show(cmd);

evTick/--cookTiime; theTimer ->show(cookTime);

DisplayingCookTime

tm(CookTime)

evStop (^) evStop

evKeyPress/cmd = params->key;

/cmd += params->key;

Displaying

Emitting

C