PES Assignment 3
PES Assignment 3
MECH-B 1604-17-736-070
PES - ASSIGNMENT 3
7(a) Explain Round-Robin architecture with an example.
A) Features of round-robin architecture:
1. Simplest architecture
2. No interrupts
3. The main loop checks each device one at a time,
4. and service whichever needs to be serviced.
5. The service order depends on the position in the loop.
6. No priorities
7. No shared data
8. No latency issues (other than waiting for other
9. devices to be serviced)
• The maximum delay is the maximum time to traverse the loop if all devices need to
be serviced
• Architecture fails if any one of the devices requires a shorter response time
• Most I/O needs fast response time (buttons, serial ports, etc.)
• Lengthy processing adversely affects even soft time deadlines
• Architecture is fragile to added functionality
• Adding one more device to the loop may break everything
Applications:
• Simple devices
• Watches
• Possibly microwave ovens
• Devices where operations are all user-initiated
• and process quickly
MOHAMMED ZIA AHMED KHAN
MECH-B 1604-17-736-070
PES - ASSIGNMENT 3
7(b) Compare all four software architectures with respect priorities, worst
response time for task code, the stability of response, and simplicity.
A)
PRIORITIES WORST CASE STABILITY OF SIMPLICITY
RESPONSE RESPONSE
FOR HIGHEST WHEN CODE
PRIORITY CHANGES
TASK CODE
9(a) What are the major differences of Real-time operating system with
other software architectures. Mention its advantages and
disadvantages.
A) Differences with other architectures:
• Signaling between interrupt routines and task code is handled by RTOS (no need for
shared variables).
• No main loop deciding what to do next, RTOS decides the scheduling.
• RTOS can suspend on task code subroutine to run.
Pros:
• The worst-case response time for the highest priority function is zero.
• System’s high priority response time relatively stable when extra functionality
added.
• Useful functionality pre-written.
• Generally come with vendor tools.
Cons:
• RTOS has cost
• Added processing time
• Code out of your control, may contain bugs.
MOHAMMED ZIA AHMED KHAN
MECH-B 1604-17-736-070
PES - ASSIGNMENT 3
9(b) What are the various criteria for selecting software architecture?
A) Selecting an Architecture:
• Select the simplest architecture that will meet your response requirements.
• If your response constraints require an RTOS, then buy one and use it because there
are also several debugging tools for it.
• It can create hybrids of the architectures.
• In RTOS or RR, the main task code can poll slow hardware devices that do not need a
fast response (leaving interrupts for faster hardware).