Overview of the Lab 2 Assignment: Multicore Real-Time Tasks

Slides:



Advertisements
Similar presentations
R4 Dynamically loading processes. Overview R4 is closely related to R3, much of what you have written for R3 applies to R4 In R3, we executed procedures.
Advertisements

Concurrency Important and difficult (Ada slides copied from Ed Schonberg)
CSE 1301 Lecture 6B More Repetition Figures from Lewis, “C# Software Solutions”, Addison Wesley Briana B. Morrison.
1 9/29/06CS150 Introduction to Computer Science 1 Loops Section Page 255.
1 9/28/07CS150 Introduction to Computer Science 1 Loops section 5.2, 5.4, 5.7.
Project 2 – solution code
50.003: Elements of Software Construction Week 5 Basics of Threads.
What is the output generated by this program? Please assume that each executed print statement completes, e.g., assume that each print is followed by an.
Nachos Phase 1 Code -Hints and Comments
For Loops 1 Loops/Iteration Used to repeat an action Must have a STOP condition Three flavors - for, while, do/while Which loop to use? task with a specific.
Mr. Dave Clausen1 La Cañada High School Chapter 6: Repetition Statements.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 6 Looping.
Multiprogramming. Readings r Silberschatz, Galvin, Gagne, “Operating System Concepts”, 8 th edition: Chapter 3.1, 3.2.
Synchronized and Monitors. synchronized is a Java keyword to denote a block of code which must be executed atomically (uninterrupted). It can be applied.
1 Review of Process Mechanisms. 2 Scheduling: Policy and Mechanism Scheduling policy answers the question: Which process/thread, among all those ready.
Lab 2 Parallel processing using NIOS II processors
CS140 Project 1: Threads Slides by Kiyoshi Shikuma.
 In computer programming, a loop is a sequence of instruction s that is continually repeated until a certain condition is reached.  PHP Loops :  In.
CSCI1600: Embedded and Real Time Software Lecture 23: Real Time Scheduling I Steven Reiss, Fall 2015.
CS333 Intro to Operating Systems Jonathan Walpole.
Kernel Structure and Infrastructure David Ferry, Chris Gill CSE 522S - Advanced Operating Systems Washington University in St. Louis St. Louis, MO
Scheduling Classes and Real-Time Scheduling in Linux David Ferry, Chris Gill CSE 522S - Advanced Operating Systems Washington University in St. Louis St.
Mutual Exclusion -- Addendum. Mutual Exclusion in Critical Sections.
Concurrent Programming in Java Based on Notes by J. Johns (based on Java in a Nutshell, Learning Java) Also Java Tutorial, Concurrent Programming in Java.
Multiprogramming. Readings r Chapter 2.1 of the textbook.
Lab 4: Loops and Iteration Graham Northup
Processes and threads.
TrueTime.
Process Management Process Concept Why only the global variables?
Midterm Review Chris Gill CSE 422S - Operating Systems Organization
Loops BIS1523 – Lecture 10.
Introduction To Repetition The for loop
Time Sources and Timing
Midterm Review David Ferry, Chris Gill
Programming Logic and Design Fourth Edition, Comprehensive
EEE 6494 Embedded Systems Design
Department of Computer Science and Engineering
Overview of the Lab 2 Assignment: Linux Scheduler Profiling
Intro to Processes CSSE 332 Operating Systems
Overview of the Lab 3 Assignment: Kernel Module Concurrent Memory Use
Time Sources and Timing
Semester Review Chris Gill CSE 422S - Operating Systems Organization
Lecture 07 More Repetition Richard Gesick.
Realtime System Fundamentals : Scheduling and Priority-based scheduling B. Ramamurthy cse321-fall2014 9/20/2018.
Chapter 6: CPU Scheduling
Lecture 4B More Repetition Richard Gesick
Realtime System Fundamentals : Scheduling and Priority-based scheduling B. Ramamurthy cse321-fall /27/2018.
Exploring the Power of EPDM Tasks - Working with and Developing Tasks in EPDM By: Marc Young XLM Solutions
Iteration: Beyond the Basic PERFORM
Loops CIS 40 – Introduction to Programming in Python
Kernel Structure and Infrastructure
A Simulator to Study Virtual Memory Manager Behavior
Lecture Topics: 11/1 General Operating System Concepts Processes
Enforcing Real-Time Behavior I
Chapter 6: Repetition Statements
Overall Kernel Module Design
Top Half / Bottom Half Processing
Why Background Processing?
Midterm Review Brian Kocoloski
Kernel Synchronization II
Scheduling of Regular Tasks in Linux
Time Sources and Timing
Chris Gill CSE 522S – Advanced Operating Systems
Loops.
Kernel Tracing David Ferry, Chris Gill, Brian Kocoloski
Scheduling Classes and Real-Time Scheduling in Linux
CSE 153 Design of Operating Systems Winter 2019
Overview Activities from additional UP disciplines are needed to bring a system into being Implementation Testing Deployment Configuration and change management.
In Today’s Class.. General Kernel Responsibilities Kernel Organization
Scheduling of Regular Tasks in Linux
Presentation transcript:

Overview of the Lab 2 Assignment: Multicore Real-Time Tasks Chris Gill and Son Dinh CSE 522S – Advanced Operating Systems Washington University in St. Louis St. Louis, MO 63143

CSE 522S – Advanced Operating Systems Lab Objectives Kernel module releases multiple end-to-end tasks periodically on different cores Timer releases first sub-task Entire task must finish before next release Subtasks may span multiple cores Each subtask has its own release time, sub-deadline, execution time, and priority Each sub-task runs in its own kthread Completion releases downstream subtask Release guards prevent early execution You will calibrate subtasks’ execution times Number of iterations of a specific loop Measured in isolation first Also monitored at run-time Core 0 Core 1 Core 2 Core 3 CSE 522S – Advanced Operating Systems

“Data Driven” Module Configuration Each task (and subtask) is described by configuration data A custom header file contains config data General module functions read that data, configure threads, timers, counters, etc. Module init and exit functions Init allocates, exit deallocates Again use dynamic data structures Don’t assume fixed sizes/numbers for things that may vary per program inputs Module can be loaded in “calibrate” mode If loaded in calibrate mode, runs one subtask at a time on its core, finds number of iterations closest to given execution time, prints results to system log file Otherwise, will run all tasks at once, using the given numbers of iterations for each subtask that’s found in the config info struct rt_subtask_spec { unsigned int task_id; unsigned int subtask_id; unsigned int st_core; unsigned int st_exectime; … }; struct rt_subtask_spec* configuration = 0; int define_config(void); int setup_subtasks(void); CSE 522S – Advanced Operating Systems

Task Release Mechanisms Timer expires, wakes up thread for first subtask(s), reschedules next timer wakeup Keeps a “wheel” of subtask release times Uses absolute time to avoid release jitter Thread for first sub-task has no dependence First subtask is released when timer expires T 2,1 T 1,1 T 3,1 4 5 8 10 12 15 CSE 522S – Advanced Operating Systems

Subtask Release Mechanisms When subtask completes, updates a counter Also notifies a condition variable When a subtask wakes up it checks counter If not updated, blocks on the condition variable This handles both early and late completion Not awoken until release time, doesn’t start until predecessor has recorded its completion T 2,2 T 1,2 T 3,2 4 5 8 10 12 15 CSE 522S – Advanced Operating Systems

Monitoring and Evaluation Release time is when a job of a task is ready Start time is when a job is first scheduled Release guards should prevent start before release Execution time is sum of scheduled intervals Record subtask execution times, compare to what was specified in the configuration data Missed deadline if task runs past next release Τ1,1,1 Τ2,1,1 Τ1,1,1 Time released resumed preempted completed CSE 522S – Advanced Operating Systems

CSE 522S – Advanced Operating Systems Extra Credit Options Extend the calibration mode so it calculates subtasks’ sub-deadlines, priorities, etc., too Outputs that calculated data to the system log, in a nicely structured format Write a helper program that can extract that calculated system log file, and use it to generate .h file that the module can include to run correctly Add a mode to run using SCHED_DEADLINE Vary parameters to see their effects on behavior Compare results to standard SCHED_FIFO behavior CSE 522S – Advanced Operating Systems

CSE 522S – Advanced Operating Systems Lab Write-up As you work, please record your observations in detail It’s a good idea to read the entire assignment, and to plan and design a bit before starting to work on it It’s also a good idea to develop and test incrementally First, design and implement calibration mode Then, design and implement run mode Then design and implement extra credit options, if you’d like Make sure Kernelshark, etc. traces validate your assumptions Design and run and document results of validation experiments Write a cohesive report that analyzes, integrates, and offers explanations for what you observed Document the thinking behind your design Attribute sources for any code or design ideas you obtained from elsewhere (caveat – only use what you understand, and know to be correct) Explain not only what you did and what you saw, but also why you did that, and why you think what you saw happened CSE 522S – Advanced Operating Systems