


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
Material Type: Assignment; Professor: Cheng; Class: Real-Time Systems; Subject: (Computer Science); University: University of Houston; Term: Fall 2008;
Typology: Assignments
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Task scheduling in real-time systems is to determine an execution order such that all tasks can meet the corresponding deadlines. To do this, we often need an estimate of the worst-case execution time (WCET) and then reserve that amount of CPU time accordingly. An When it is undetected, subsequent tasks may miss their deadline as a consequence of overrun occurs if the real execution time exceeds the estimate WCET. overspending CPU time. One solution to the task overrun problem is to lower the priority of the overrunning task once it consumes the reserved CPU time and only execute it in the background mode. This requires a measurement of task execution time at run time. In real-time systems, a task may be preempted (by high priority tasks) or blocked (due to unavailable resources locked by low priority tasks). The measurement of execution time at user application level is difficult, since we cannot predict the instances of preemption and blocking. On the other hand, it can be done easily at kernel level. As shown in the following diagram, a task is created, dispatched to run, switched off to waiting or ready state, and deleted (terminated). The measurement of execution time can be done once we mark the instances it is dispatched and accumulate the time it has spent when it is switched off or terminated.
vxWorks allows user tasks to add callback functions (hooks) to kernel at the instances of task creation, task deletion, and context switching. When a hook is called, the pointer to the task’s TCB is passed as a parameter. Thus, we can access TCB and use the spare space in TCB to record additional task information.
What you will do in the assignment:
The partition problem is an NP-Hard problem. The problem is to decide whether a given set of integers can be partitioned into two "halves" that have the same sum. More precisely, given a set S of integers, is there a way to partition S into two subsets S 1 and S 2 such that the sum of the numbers in S S 1 equals the sum of the numbers in S 2? The subsets 1 and^ S 2 must form a partitioning^ the sense that they are disjoint and they cover^ S. You need to develop a task to solve the partition problem optimally (using exhaustive search). The input is a set of six integers. It must run in vxWorks environment at the target Intel ARM-Xscale processor: Be aware of the issues of data consistency. You need to run the task several time (by generating different data-set) during your experiment. After the finish of every time, please show the data set and result(s) on the console.
Relevant vxWorks facilities for this project The vxWorks' libraries are more than the followings for the given purpose and of course you're not restricted to use just those. They are listed to give you a basic idea for the project.
FIRST NAME_LAST NAME_COSC6384 Assignment2.zip