



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
Main points of this exam paper are: Milliseconds, Microseconds, Second, Minute, Hour, Application, Components, Interface, Running, High-Priority Task
Typology: Exams
1 / 7
This page cannot be seen from the preview
Don't miss anything!




Summer Examinations 2011-
Exam Code(s) 4BEE Exam(s) Final Year Sports & Exercise^ Engineering
Module Code(s) EE Module(s) Embedded Systems Applications Programming
Paper No. Repeat Paper
External Examiner(s) Professor G.W. Irwin Internal Examiner(s) Prof. G. Hurley Dr. P. Corcoran
Instructions: SECTION A: Answer question one
SECTION B:
(30 marks - attempt all questions) and Any two other questions (20 marks each) from the remaining questions
Duration: 2 hrs No. of Pages 7 Discipline(s) Electrical & Electronic Engineering Course Co-ordinator(s)
Requirements MCQ
Handout Statistical Tables Graph Paper Log Graph Paper Other Material
This section is compulsory; attempt all questions – 2 marks per question (total 30 marks) ____________________________________________________
Question A1. On what timescale should user interface (UI) components of an application respond to input?
(a) 100 microseconds; (b) 10 milliseconds; (c) 1 second; (d) 1 minute; (e) 1 hour; (f) none of these
Question A2. Which of the following commands is used to list lines from a file on a POSIX compatible OS?
(a) ls; (b) chmod; (c) cat; (d) man; (e) tr; (f) none of these
Question A3. Which of the following is NOT a valid task state on an RTOS which allows task pre- emption?
(a) blocked; (b) ready; (c) running; (d) pre-empted; (e) steady; (f) none of these
Question A4. A low priority task holds a resource needed by a high-priority task, thus preventing the high priority task from completing within its deadline; this system state is known as?
(a) deadlock; (b) ostrich algorithm; (c) priority inversion; (d) task pre-emption; (e) shared-data problem; (f) none of these
Question A5. On what timescale should the anti-lock brake subsystem in a vehicle respond to sensor input indicating lock-up of a wheel of the vehicle?
(a) 100 microseconds; (b) 100 milliseconds; (c) 1 second; (d) 1 minute; (e) 1 hour; (f) none of these
Question A6. Which of the following is NOT a valid POSIX command?
(a) tail; (b) head; (c) cat; (d) man; (e) dog; (f) none of these
Question A7. Which of the following commands is used to list system processes on a POSIX compatible OS?
(a) ps; (b) ls; (c) push; (d) sh; (e) grep; (f) none of these
Question A8. A solar heating system for managing the temperature of a swimming pool uses a 24 hour cyclic control loop with a response time of 4 days to changes in the user-set pool temperature. How often should the temperature of water in the pool be measured? Every,
(a) 10 milliseconds; (b) 10 seconds; (c) 10 minutes; (d) 10 hours; (e) 10 days; (f) none of these
SECTION B - Attempt TWO of four questions – 20 marks per question.
( NB: Candidates should note that marks may be lost if answers are not presented in a neat and orderly manner)
____________________________________________________
Q 1. (a) In the task graph for a set of jobs shown in Fig 1 , each job is given as J (^) i(r (^) i , Di) where r (^) i is the release time and Di is the relative deadline. The jobs are pre-emptable and have identical execution times and priorities. List the effective release times and effective deadlines of each job assuming a maximum execution time of 1. [3 marks]
Fig 1: Job dependency tree with release times and deadlines.
(b) Produce a feasible EDF schedule assuming each job has an execution time of 1. [4 marks]
(c) What is the maximum execution time that the jobs can have and still be feasibly scheduled on a single processor? Explain your answer. [4 marks]
(d) Consider the following set of jobs:
Name Release Time Execution Time Priority J1 0 8 1 J2 2 5 1 J3 4 1 0 J4 6 3 2 J5 8 2 1
The times are all in ms and 0 is the highest priority. Create a schedule for the jobs using each of the following methods: First-come, first-served (FCFS) weighted round-robin with a quantum of 1ms (select appropriate weights) non-preemptive priority-driven based on the priorities given preemptive priority-driven based on the priorities given
Ignore the priority for the non-priority driven methods. If two jobs have the same priority choose the one that arrived first. [9 marks]
____________________________________________________
Q 2. (a) Explain briefly what each of the following Unix commands does. Give a typical command- line usage for each: (i) tar (ii) cat (iii) tail (iv) grep (v) mount (vi) chmod (vii) ps (viii) sh [4 marks] (b) Explain, in the context of a Unix-style OS, what the following commands do? (i) alias sysnuke rm -rf / (ii) kill -9 %3; fg %2 (iii) tail -f /var/log/messages (iv) grep -ic '^(.)(.)(.).\3\2\1$' /usr/dict/words(v) tr a-z A-Z < file1 > file [5 marks] (c) Describe carefully in words what exactly the following regular expressions match to: (i) < EE3[0-9][0-9]> (ii) ^EE3[0-9]$ (iii) ing> (iv) ^[0-9]$ (v) ^[aeiou]{2,} (vi) [^aAeEiIoOuU0-9]{4,} [6 marks] (d) Explain in detail what the following terms mean? (i) tab completion (ii) I/O redirection (iii) background task (iv) shell variable (v) file permissions
[5 marks]
Q 3. (a) Explain and differentiate between (i) interrupt latency, (ii) interrupt response, and (iii) interrupt recovery times. Sketch a diagram. How will interrupt nesting affect these timings? Explain. [4 marks]
(b) What is a pre-emptive RTOS? Sketch the state transition diagram for tasks in such an RTOS and explain the various pre-emption mechanisms. [6 marks] (b) In the context of an RTOS explain, using diagrams and/or code segments where appropriate, what is meant by: (i) a task; (ii) a semaphore; (iii) a task control block and (iv) a pipe_._ [4 marks]
(d) Explain what is meant by priority inversion? Give an example of how it can occur. Suggest some approaches to avoid or mitigate the effects of this phenomenon. [3 marks] (e) Comment on the statement: “In a non-pre-emptive RTOS, tasks cannot interrupt one another and therefore there are no data-sharing problems between tasks”. Do you agree or disagree? Explain your reasoning. [3 marks] ____________________________________________________
Mark each selection with a distinct “X”. Include this sheet with main answer book. ( NB: where applicable you must include rough-work calculations to obtain full marks for these questions. Please write you name below, detach this sheet and include with you main exam answer-book.) Student Name: ___________________________ ID Number: ____________________
- A (a) (b) (c) (d) (e) (f)