4110/6110 Embedded Systems Review


Complete the following problems.

Note that you must be connected to GSU's VPN before the links will work, since the videos are hosted on a machine that is not visible off campus.

Watch the video Interrupts (chapter 4's content).
  1. Chapter 4 talks about interrupts. What is the ISR? Write an example one.
  2. What assembly language command-types does the book present? What are the equivalents in the assembly language that you studied in CSC3210?
  3. If an interrupt occurs, then another, why would saving the state in fixed memory locations be a problem? Illustrate with an example.
  4. In assembly language, you might have commands like "sei" (set interrupt disable bit) and "cli" (clear interrupt disable bit), so "sei" disables interrupts, and "cli" re-enables them. These are from the 6502. Show how the shared data bug would look in assembly.

    I'm not looking for code that would compile, just that you have a reasonably expressed and consistent code example with comments that indicate what's going on. (So something with "mov r1, r2 ; r1 <- r2" would be good, but something like "add r1, r2 ; add
    sub A, r1, B ; subtract" would be a bad example -- comments don't help, add takes two parameters but sub takes three, mix of A and r1 for registers.)

    Then show how the shared data bug code could have sei/cli added to make it work.
Watch the video Software Architectures (chapter 5's content).
  1. Suppose that we have a round-robin software architecture, with devices A, B, and C. If the code to service each device takes 100 ms, 40 ms, and 85 ms, respectively, and checking each device takes 10 ms, how much time will elapse from the start before each device is serviced? Suppose that devices B and C need servicing on start-up, then device A needs service 92 ms after the start, then device C needs service (for a second time) 47 ms after that, and device B needs service (for a second time) 32 ms after that.
  2. Given devices A, B, C, and D, and a function-queue-scheduling software architecture, suppose that function_A takes 100 ms, function_B takes 40 ms, function_C takes 85 ms, and function_D takes 153 ms. Device A has highest priority, followed by B, then C, then D. Each interrupt takes 5 ms. Describe what happens and when according to the following schedule:
    startup: devices B and C generate interrupts
    startup + 56 ms : device D generates an interrupt
    startup + 63 ms : device A generates an interrupt
    startup + 90 ms : device B generates an interrupt
    startup + 130 ms : device D generates an interrupt
    startup + 135 ms : device C generates an interrupt
    startup + 160 ms : device B generates an interrupt
  3. For the question above, what would the result be if we used round-robin with interrupts instead?
  4. What software architecture best describes the system for labs 1, 2, and 3, and why?