Assignment #2 -- Real-Time Performance Monitoring and Analysis
Format: Plain text, Rich text, PDF, or MS Word
Code Format: Turn in all code in a tar or zip file!
Upon Completion upload to learn.colorado.edu, "Lab 2" and "Homework 2".
(If there is a problem with culearn, then E-mail to firstname.lastname@example.org with subject line "LAB SUBMISSION 2" (subject line must be all caps exactly as it appears between quotes) and CC the TAs.)
Be sure to include all source code with your submission.
All Group Design Assignments should be submitted to desire2learn.
(If there is a problem with d2l, then E-mail email@example.com with subject "GROUP SUBMISSION 2")
Group submission should be in an MS Word or text document with all group members clearly identified on a cover page! Only ONE submission needs to be made for all in the group.
Homework objectives are: understand message queues and difference between standard and heap message passing
Problem 1 -- Read Sha, Rajkumar, et al paper, "Priority Inheritence Protocols: An Approach to Real-Time Synchronization". Please summarize the paper's main points (at least 2 or more) in a short paragraph.
Problem 2 -- Review heap_mq.c and posix_mq.c. Write a brief paragraph describing how these two message queue applications are similar and how they are different. Make sure you not only read the code, but that you build it, load it, and execute it to make sure you understand how both applications work.
LAB ASSIGNMENT (Individual Problem)
Learning objectives are: debugging tools to allow logging and profiling of VxWorks code
Problem 3 -- Write a wrapper around logMsg that allows it to be used for a variety of subsystem logs at several different levels. You will need to update the priority of tLogTask to be lower than the tasks that you are using for your application tasks (using an initialization function is acceptable). This wrapper should allow for at least 3 subsystems and 3 priority levels per subsystem (eg. HIGH, MED, LOW). Provide a mechanism to set the log level by subsystem from the command line.
Problem 4 -- Modify your logging system to allow you to capture system logs to a text file on your host system. Use the ioGlobalStdGet & ioGlobalStdSet functionality to allow you enable, disable and restart logging to this file.
Problem 5 -- Update your logging system to incorporate additional features to meet your debugging needs. This may include message buffers to ensure strings are available for logMsg printing, automatically pre-pending the subsystem to the log message or tools to enable display/parsing your logs on your development system.
Problem 6 -- Create a mechanism for profiling the execution of your code. Your profiling mechanism should have a minimal impact on the execution time of the code that you are profiling. Use calls to your profiling system to start, stop and output the timing information. Look at the example code that usesthe x86 PIT (programmable interval timer) - see sample PIT code. The VxWorks "tickGet()" call can also be used to sample relative times, but is only accurate to the tick resolution (1 millisecond assuming sysClkRateSet(1000)). Make sure that your profiling engine can support at least 3 seperate profiling regions at once.
Problem 7 -- Show the net impact of adding your profiling instrumentation by profiling a nested loop. What is the effect of enabling profiling on the inner loop?
DESIGN ASSIGNMENT - Detailed Design (Group Problem) -- Turn in detailed design for your project. You can further refine a DFD (Data Flow Diagram) showing both hardware and software elements in your group project (one copy per group). Please turn in a paragraph describing your role in this detailed design.
Please turn individual paragraph in with your individual assignment submission!! Please do not forget this in your report!!!