Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Science, Software Engineering & Robotics Workshop, FGCU, April 27-28, 2012 Real-Time Memory Management by Andon M. Coleman Mentor: Dr. J. Zalewski.

Similar presentations


Presentation on theme: "Computer Science, Software Engineering & Robotics Workshop, FGCU, April 27-28, 2012 Real-Time Memory Management by Andon M. Coleman Mentor: Dr. J. Zalewski."— Presentation transcript:

1 Computer Science, Software Engineering & Robotics Workshop, FGCU, April 27-28, 2012 Real-Time Memory Management by Andon M. Coleman Mentor: Dr. J. Zalewski

2 Computer Science, Software Engineering & Robotics Workshop, FGCU, April 27-28, 2012 Often confused with high-performance computing, because in other domains real-time means without noticeable delay. Real-time software is frequently high- performance, but more precisely it completes tasks within application-defined deadlines. What is Real-Time Computing?

3 Computer Science, Software Engineering & Robotics Workshop, FGCU, April 27-28, 2012 Designing real-time software involves identifying the worst-case performance of algorithms and modifying them, or selecting different algorithms in order to consistently meet deadlines. By contrast, in traditional software, algorithms are optimized to improve average- and best-case performance; occasional missed deadlines are acceptable. What is Real-Time Computing?

4 Computer Science, Software Engineering & Robotics Workshop, FGCU, April 27-28, 2012 Recent paradigm shift from fast single-core systems with ever- increasing clock rates to slower multiple-core systems with ever- increasing core counts: + Allows multiple programs to run simultaneously without competing for time on a single-processor. -Requires re-designing existing software to use algorithms that can be split into multiple concurrent tasks. Re-designing software to use multiple processors usually involves creating multiple threads. Each thread shares the same pool of memory, and keeping two threads from trying to claim the same unused memory can lead to serious performance issues. Threats to Real-Time Computing

5 Computer Science, Software Engineering & Robotics Workshop, FGCU, April 27-28, 2012 Two professors will grab and attempt to leave the supply closet with the first stapler they see, regardless whether another individual already has their hands on it. Naïve Solution:Lock the door to the supply closet whenever someone enters Problem:Potential pileup of waiting professors Real-Time Solution:Allocate multiple supply closets, in proximity to classrooms – ideally one closet per-classroom. The Great Stapler Conflict Resource Contention

6 Computer Science, Software Engineering & Robotics Workshop, FGCU, April 27-28, 2012 The Great Stapler Conflict “Lazy” Algorithms – Blessing or Burden? Assign staplers with very little record-keeping overhead, but require professors to come back and fill-out paperwork to get staples the first time they actually want to use their stapler. Short-Term Gain:Defers bureaucratic nonsense until first-use Problem:Potentially causes deadlines to be missed in a mad scramble for staples at the end of class. Real-Time Solution:Never give anyone a stapler without staples!

7 Computer Science, Software Engineering & Robotics Workshop, FGCU, April 27-28, 2012 Expected Results Not necessarily desirable, but as predicted… Optimization for best-case performance Optimization for deadline consistency Time spent waiting for resources TCMalloc – Mac OS X jemalloc – Mac OS X Ratio of Kernel-mode to User-mode time

8 Computer Science, Software Engineering & Robotics Workshop, FGCU, April 27-28, 2012 Unexpected Results When theory conflicts with reality Linux Scheduler Jitter: ± 1ms Entire process completes in one second Each thread starts after the prior finishes due to undesirable kernel behavior. Imagine if the threads were re-scheduled, so that Thread 3 began first… Thread 1, the simplest of all threads, would finish at least four times later! Thread CPU Time vs. Elapsed Time (VxWorks 6.7)


Download ppt "Computer Science, Software Engineering & Robotics Workshop, FGCU, April 27-28, 2012 Real-Time Memory Management by Andon M. Coleman Mentor: Dr. J. Zalewski."

Similar presentations


Ads by Google