



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
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
1 / 5
This page cannot be seen from the preview
Don't miss anything!




Semester 1 Examinations 2010 / 11
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.
(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:
(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 %]
(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 %]