Examination Paper: Embedded Software Co-Design, Cork Institute of Technology, 2010-11, Exams of Embedded Systems

An examination paper from the cork institute of technology, focusing on the module 'embedded software co-design' in the master of engineering in embedded systems program. It includes instructions for the exam, questions covering topics such as function queue scheduling, passing information between processes, and rtos operation, as well as prototypes and sample code for various functions and structures. Intended for university students and requires answers to specific questions.

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
INSTITIÚID TEICNEOLAÍOCHTA CHORCAÍ
Semester 1 Examinations 2010 / 11
Module Title: Embedded Software Co-Design
Module Code: ELTR9009
School: Electrical and Electronic Engineering
Programme Title: Master of Engineering in Embedded Systems
Programme Code: EMBED_9
External Examiner(s): Mr. P. French, Dr. P. Quinlan, Mr. D. Heffernan
Internal Examiner(s): Donal O’Donovan
Instructions: Answer ANY 2 questions.
Duration: 2 hours
Sitting: Winter 2010
Requirements for this examination:
Note to Candidates: Please check the Programme Title and the Module Title to ensure that you have
received the correct examination paper.
If in doubt please contact an Invigilator.
pf3
pf4
pf5

Partial preview of the text

Download Examination Paper: Embedded Software Co-Design, Cork Institute of Technology, 2010-11 and more Exams Embedded Systems in PDF only on Docsity!

CORK INSTITUTE OF TECHNOLOGY

INSTITIÚID TEICNEOLAÍOCHTA CHORCAÍ

Semester 1 Examinations 2010 / 11

Module Title: Embedded Software Co-Design

Module Code: ELTR

School: Electrical and Electronic Engineering

Programme Title: Master of Engineering in Embedded Systems

Programme Code: EMBED_

External Examiner(s): Mr. P. French, Dr. P. Quinlan, Mr. D. Heffernan Internal Examiner(s): Donal O’Donovan

Instructions: Answer ANY 2 questions.

Duration: 2 hours

Sitting: Winter 2010

Requirements for this examination:

Note to Candidates: Please check the Programme Title and the Module Title to ensure that you have received the correct examination paper. If in doubt please contact an Invigilator.

  1. (a) Contrast function queue scheduling with co-operative multitasking from a scheduling perspective. [6 %]

(b) Describe how ‘void *’ may be used as a mechanism for passing information of a ‘generic’ type from one process to another. Illustrate how this technique may be used for a queue in uCOS-II using the following prototypes:

unsigned char OSQPost (OS_EVENT *pose, void *pvMsg); void *OSQPend (OS_EVENT *pose, WORD wTimeout, BYTE *pByErr);

Note: Only the lines Post and Pend lines are required, along with a sample message to be sent and received. [ 8 %] (c) The following diagram illustrates the operation of an RTOS over a sample time period.

Figure 1. i. Describe the passage of events indicated by (a) in Figure 1.1. [6 %] ii. Under what conditions would the path (b) in Figure 1.1 result? [ 6 %] iii. What commands in C/OS-II RTOS permit a response of type (b) to be achieved? Briefly explain why this is the case. [ 6 %]

(d) In connection with message queues in the Linux operation system, explain how the message size and prioritisation may be implemented. Use the prototypes and sample structure in Figure 1.2 to illustrate your answer. [9 %] int msgsnd(int msqid , const void * msgp , size_t msgsz , int msgflg ); int msgrcv(int msqid , void * msgp , size_t msgsz , long msgtyp , int msgflg ); struct cheese_msgbuf { long mtype; char name[20]; int type; float yumminess; }; struct pirate_msgbuf pmb = {2, { "L'Olonais", 'S', 80, 10, 12035 } }; Figure 1.2 (Continued over)

(c) Compare each of the following concepts used for inter-task communications in typical RTOSs:

  1. Event flag group
  2. Queues [8 %]

(d) Consider a system of four independent pre-emptable periodic tasks: T 1 = (3, 1), T 2 = (6, 1), T 3 = (6, 2), and T 4 = (12, 1). All jobs have a phase equal to zero, and a relative deadline equal to their period. Demonstrate that a clock-driven cyclic schedule is feasible. [12 %]

(e) Construct a cyclic schedule for the tasks in (d), demonstrating that the system meets all deadlines. [6 %]

(f) Another task with an execution time of needs to be added. What is the minimum period for which the schedule would remain feasible? [4 %]

  1. (a) There are several different algorithms for scheduling periodic tasks on a single processor system. Those algorithms fall into two broad categories: clock-driven and priority-driven. Discuss the relative advantages and disadvantages of the two categories of algorithm, explaining when it is appropriate to use a clock-driven scheduler and when one would expect to use a priority-driven scheduler. [6 %]

(b) The four independent preemptable periodic tasks: T 1 = (5, 2), T 2 = (4, 1), T 3 = (10, 1), and T 4 = (20, 3) are to be implemented on a system that supports priority scheduling. Which priority scheduling algorithm would you prefer: rate monotonic or earliest deadline first? Justify your answer. [6 %]

(c) A revised system specification requires that a periodic calibration task be added to the system. The task needs to execute every 10 time units with an execution time of 2 units. Is the schedule still feasible? [3 %] (Continued over)

(d) Compare and contrast the following Linux interprocess communications (IPC) techniques:  Shared memory segments [5 %]  Memory mapped files [5 %]

(e) Describe and contrast 3 typical hardware/software co-verification configurations. [15 %] (f) Consider the generic RTOS code in Figure3.1. 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 3. i. What potential problem is associated with the code in Figure 3.1? [2 %] ii. Describe 2 different methods for solving this problem [ 8 %]