Embedded System Design Project
國立交通大學‧電機與資訊學院碩士班‧94-2 嵌入式系統設計
■ Problem Statement :
Your company delivered a Windows-based application system to customers. Suppose that there are five tasks in the system, and three of them are more urgent than the other two. Let there be only three priority levels (i.e., H -> M -> L) available in Windows. As a compromise, you decided to give priority H to the three urgent tasks and priority M to the other two tasks. Priority L is left unused.
The above arrangement seems working fine. But one day your customer complained that your system usually exhibit poor performance. After some investigation, you found that the three tasks with priority H sometimes won’t give up the CPU for a very long period of time. As a result, those two tasks with priority M have no chance to be serviced by the CPU unless those tasks with priority H voluntarily relese the CPU.
Now your boss ask you to implement a resource-reservation mechanism. Under this mechanism, each application is associated with a parameter, namely, “_share”. For example, if a task is assigned to _share(100, 200) then the task requires 100 ms of CPU time every 200 ms. By adopting this concept, each application can receive its desired share of CPU, and the trouble mentaioned above could be eliminated.
To reflect the urgency of different application, parameter “_ungency” is assigned to each application. Every application can be assigned to a unique urgency level. When there are two applications contending the CPU, the applications of higher-level of urgencies always win. Furthermore, it is permitted that less urgency applications are preempted by highly urgent applications.
There are two implementation issues : First, there is no access to source code of a proprietary system like Windows, so everything you do must be transparent to the operating system. Second, there are only three different priority levels in your existing system and you have to emulate that each application could have their unique urgency levels.
■ Check list of stuff to deliver
● An application with a simple GUI, by which users can dynamically adjust parameter “_share” ans “_urgency” to applications. *Note* target applications can be any ordinary application being running in Windows, like WORD, IE, etc.
● A short document (5 pages, 12pt font, single line space) on your implementation. Describe how you emulate a number of urgency levels by using only three priority levels. Also describe how you verify that your approach is correct.