Presentation is loading. Please wait.

Presentation is loading. Please wait.

Overview of the Lab 2 Assignment: Linux Scheduler Profiling

Similar presentations


Presentation on theme: "Overview of the Lab 2 Assignment: Linux Scheduler Profiling"— Presentation transcript:

1 Overview of the Lab 2 Assignment: Linux Scheduler Profiling
James Orr, Chris Gill CSE 422S - Operating Systems Organization Washington University in St. Louis St. Louis, MO 63143

2 Experiment Configuration
We will pin a number of threads on each core (enough to examine scheduler differences in various ways) Threads will access a common shared data structure Grabbing a new number at the start of each “round” Incrementing (safely) a variable pointing to next number Cubing the selected number over and over again Very basic functionality Synthetic workload Interleaving simple steps Configurable experiments Shared data CSE 422S – Operating Systems Organization

3 User Space Program You can use any language you like (e.g. C++) … … as long as it can do what is required Thread creation and binding to cores Synchronization Appropriate setting of scheduler, priorities spinning sleeping Run your program repeatedly In different configurations Analyze and show the results Give instructions for how to run So we can reproduce your trials So we can try other variations CSE 422S – Operating Systems Organization

4 CSE 422S – Operating Systems Organization
Concurrency Behavior All threads should first barrier synchronize May need condition variable for sleep version No thread starts cubing until all are ready Afterward, threads should run concurrently As soon as all threads are ready, they should run concurrently, each doing rounds of iteratively cubing a number Synchronization while cubing Need to avoid data races, especially when updating variables other threads can read Make critical sections as short as possible (“lock data, not code”) Avoid unnecessary sharing of variables (use stack variables as needed) Lock access to variables that must be shared CSE 422S – Operating Systems Organization

5 CSE 422S – Operating Systems Organization
Lab Write-up As you work, record your observations along with answers to the questions posed in the lab assignment It’s a good idea to read the entire assignment and plan a bit before starting to work on it Write a cohesive report that analyzes, integrates, and offers explanations for what you observed Make connections among different parts of the assignment Compare and contrast different schedulers behaviors Identify how different factors affected scheduler behaviors CSE 422S – Operating Systems Organization


Download ppt "Overview of the Lab 2 Assignment: Linux Scheduler Profiling"

Similar presentations


Ads by Google