Download presentation
Presentation is loading. Please wait.
Published byBenny Kurniawan Modified over 5 years ago
1
Alternate Project #4 Process and Thread Performance
CS-3013 Operating Systems Hugh C. Lauer (Slides include materials from Slides include materials from Modern Operating Systems, 3rd ed., by Andrew Tanenbaum and from Operating System Concepts, 7th ed., by Silbershatz, Galvin, & Gagne) CS-3013, C-Term 2012 Alt Project #4 – Performance
2
Alt Project #4 – Performance
Project #4, Kernel Message System:– 50 points Intense kernel hacking and testing Optional two person teams Alternate Project #4, Thread and Processes Performance 35 points Entirely in user space Individual project only CS-3013, C-Term 2012 Alt Project #4 – Performance
3
Alt Project #4 – Performance
Objective To update Slide #36 of the Thread topic Conduct performance measurements on Linux and Unix systems to discover how fast processes and threads can be created and destroyed CS-3013, C-Term 2012 Alt Project #4 – Performance
4
Unix Processes vs. Threads
On a 700 Mhz Pentium running Linux Processes: fork()/exit(): 250 microsec Kernel threads: pthread_create()/pthread_join(): 90 microsec User-level threads: pthread_create()/pthread_join(): 5 microsec CS-3013, C-Term 2012 Threads 4
5
Alt Project #4 – Performance
Approach Write one or more test programs that Forks and waits for a process enough times to determine the inherent overhead of creating each new process Creates and joins a kernel thread enough times to determine the inherent overhead of creating each new thread Creates and joins a user-space thread enough times to determine the inherent overhead of creating each new thread CS-3013, C-Term 2012 Alt Project #4 – Performance
6
Alt Project #4 – Performance
Forking Performance Your test program should fork() a new process and immediately wait for it The child process should immediately exit with a zero return code Do this n1 times Measure the elapsed (wall-clock) time Divide by n1 to obtain fork()/exit() time of slide For your machine and operating system CS-3013, C-Term 2012 Alt Project #4 – Performance
7
Kernel Thread Performance
Your test program should pthread_create() a new thread and immediately pthread_join() it The newly created thread should immediately exit Do this n2 times Measure the elapsed (wall-clock) time Divide by n2 to obtain pthread_create() / pthread_join()time on slide For your machine, operating system, and kernel threads CS-3013, C-Term 2012 Alt Project #4 – Performance
8
User-Space Thread Performance
Obtain and install GNU Portable Thread package (GNU Pth) Also available on Search for “pth” under version 11.4 Re-run kernel thread experiment using pth (user-space threads) instead Obtain thread_create/join() times for performance number for slide CS-3013, C-Term 2012 Alt Project #4 – Performance
9
Alt Project #4 – Performance
Multiple Experiments Carry out these three experiments on as many platforms as you can manage Your virtual machine, plus at least one other 2 points for each additional Linux platform Must be different in speed, guest vs. host, etc. 3 points for each non-Linux platform I.e., cygwin, MacOS, etc. CS-3013, C-Term 2012 Alt Project #4 – Performance
10
Alt Project #4 – Performance
Reporting For each platform, report Times returned by the three experiments Processor type, speed, number of cores, RAM Type and version of operating system Guest or host Operating conditions (stand alone, shared, etc) Create Excel spreadsheet and chart to report results In Linux, processor and memory info is displayed in /proc/cpuinfo CS-3013, C-Term 2012 Alt Project #4 – Performance
11
Submitting Your Project
Due February 26, 11:59 PM Submit on Turnin under Alt Project 4 Include:– Code and makefile Write-up explaining your results and how you got them Chart(s) and spreadsheet(s) summarizing results CS-3013, C-Term 2012 Alt Project #4 – Performance
12
Alt Project #4 – Performance
Questions? CS-3013, C-Term 2012 Alt Project #4 – Performance
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.