ES Model Question Paper With Solution Key
ES Model Question Paper With Solution Key
1. Compare and Contrast top- down and bottom –up design for embedded systems.
In a bottom‐up design, we begin with individual components that could comprise a
system and work our way up to eventual completes a full system. In contrast, in a top‐down
design, we begin with an abstract notion of a device and work our way down to the components
that comprise the system. Of course, both methods are similar from the standpoint that the net
result is a finished product. However, they both obviously achieve this result in completely
different ways. Furthermore, both methods are related since it would be very difficult to do a
good top down design without any knowledge of underlying components and vice versa.
2. What is the difference between the Harvard and von Neumann architectures?
The difference between the van Neumann and Harvard style architectures is that a van
Neumann style machine has shared program and data memory while a Harvard style machine has
separate program and data memory.
3. Draw a UML sequence diagram that shows a four-cycle handshake between a bus master and
a device.
4. What factors provide a lower bound on the period at which the system timer interrupts for
preemptive context switching?
A combination of:
a. System scheduler overhead
b. Context switch overhead
Provide the lower bound on the timer interrupt period.
5. What factors provide an upper bound on the period at which the system timer interrupts for
preemptive context switching?
A combination of:
c. Deadlines of the processes
d. Periods of the processes
e. Execution time of the processes
Provide the upper bound on the timer interrupt period
6. Draw the pin diagram of PIC16F873
7. You are given these periodic tasks:
P1 5 1
P2 10 2
P3 10 2
P4 15 3
8. Write a program that continuously get 8-bit data from P0 and sends it to P1 while
simultaneously creating a square wave of 200 μs period on pin P2.1. Use timer 0 to create the
square wave. Assume that XTAL = 11.0592 MHz.
Solution:
We will use timer 0 in mode 2 (auto reload).
TH0 = 100/1.085 us = 92
11. Draw a UML sequence diagram for a busy-wait read of a device. The diagram should include the program
running on the CPU and the device. Or
Draw a UML sequence diagram for a busy-wait write of a device. The diagram should include the program running
on the CPU and the device.
12. Draw a UML sequence diagram for copying characters from an input to an output device using busy-wait I/O.
The diagram should include the two devices and the two busy-wait I/O handlers.
13. Draw a UML sequence diagram for copying characters from an input to an output device using interrupt-driven I/O.
The diagram should include the two devices and the two I/O handlers.
14. Draw a UML sequence diagram of a higher-priority interrupt that happens during a lower-priority interrupt handler.
The diagram should include the device, the two handlers, and the background program.
15. Draw a UML sequence diagram of a lower-priority interrupt that happens during a higher-priority interrupt
handler.The diagram should include the device, the two handlers, and the background program.
16. Three devices are attached to a microprocessor: Device 1 has highest priority and device 3 has lowest priority.
Each device’s interrupt handler takes 5 time units to execute. Show what interrupt handler (if any) is executing
at each time given the sequence of device interrupts displayed below.
Solution:
17. For the periodic processes given below, find a valid schedule
Process Time Deadline
P1 2 30
P2 5 40
P3 7 120
P4 5 60
P5 1 15
a. using standard RMS
solution:
L.C.M =120
P1 lasts 2 and has deadlines at: 30, 60, 90, 120
P2 lasts 5 and has deadlines at: 40, 80, 120
P3 lasts 7 and has deadlines at: 120
P4 lasts 5 and has deadlines at: 60, 120
P5 lasts 1 and has deadlines at: 15, 30, 45, 60, 75, 90, 105,120