Lab
7: Real-Time Operating Systems
Lab Description
In this lab, you will work with VxWorks, a commercial RTOS. You will compile the VxWorks kernel and modify a simple program to illustrate concepts in real-time operating systems. This program will eventually interpret push-button presses and toggle LEDs as required later in the lab. The process of generating this program will expose you to the concepts of tasks, inter-task communication, task scheduling, and interrupts in the context of the VxWorks RTOS. It is important to understand these concepts for use with the next two labs and the project.
Prelab
Review basic operating system concepts such as threads, processes, scheduling, mutual exclusion, semaphores, and inter-process communication. Much of this lab description is conceptual information, so it will also be useful to read over the lab before your lab time. Also, complete the following exercise.
Read the section in this lab about task scheduling in VxWorks, and read the section on scheduling in the VxWorks Programmer’s Guide (posted on the course website). Construct runtime schedules for the priority-driven scheduler and the priority-driven round-robin scheduler for the following task set. Computation time refers to how long the task will run before terminating. Arrival time is the time at which the task will be ready to run (but a task may or may not start at this time according to the rules of the scheduler). Priority is the task’s priority as defined in VxWorks. The period is how often the task repeats itself. If a task’s period is zero, it occurs only once. Use a time slice of 5 for the priority-based round-robin scheduler. Assume that equal-priority tasks are scheduled in increasing numerical order, i.e. T2 will execute before T3 if both are ready and of highest priority. Construct your schedules over long enough of a time period such that all of the aperiodic tasks have completed.
|
Task |
Computation Time |
Arrival Time |
Priority |
Period |
|
T1 |
5 |
0 |
100 |
20 |
|
T2 |
15 |
0 |
125 |
0 |
|
T3 |
10 |
5 |
125 |
0 |
|
T4 |
10 |
10 |
50 |
0 |
Lab Files
The following files are necessary for doing this lab.
|
File |
Description |
|
Lab 7 Instructions |
|
|
Lab 7 Evaluation Form |
|
|
VxWorks Kernel Workspace |
|
|
Lab 7 Project Workspace |
|
|
SystemACE Image |
|
|
VxWorks Programmer’s Guide |