removed redundant experiment
This commit is contained in:
@@ -150,12 +150,6 @@ compile_fork_bomb() {
|
|||||||
"$ROOT_DIR/fork_bomb/fork_bomb.c"
|
"$ROOT_DIR/fork_bomb/fork_bomb.c"
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_thread_stress() {
|
|
||||||
log "Compiling thread_stress"
|
|
||||||
gcc -O2 -pthread -o "$ROOT_DIR/thread_stress_test/thread_stress" \
|
|
||||||
"$ROOT_DIR/thread_stress_test/thread_stress.c"
|
|
||||||
}
|
|
||||||
|
|
||||||
compile_thread_recursive() {
|
compile_thread_recursive() {
|
||||||
log "Compiling thread_recursive"
|
log "Compiling thread_recursive"
|
||||||
gcc -O2 -pthread -o "$ROOT_DIR/thread_recursive_scaling/thread_recursive" \
|
gcc -O2 -pthread -o "$ROOT_DIR/thread_recursive_scaling/thread_recursive" \
|
||||||
@@ -164,7 +158,6 @@ compile_thread_recursive() {
|
|||||||
|
|
||||||
compile_creation_time
|
compile_creation_time
|
||||||
compile_fork_bomb
|
compile_fork_bomb
|
||||||
compile_thread_stress
|
|
||||||
compile_thread_recursive
|
compile_thread_recursive
|
||||||
|
|
||||||
# Defaults (override by env vars)
|
# Defaults (override by env vars)
|
||||||
@@ -207,11 +200,5 @@ run_with_sampling \
|
|||||||
"$OUT_DIR/thread_recursive_scaling.csv" \
|
"$OUT_DIR/thread_recursive_scaling.csv" \
|
||||||
0
|
0
|
||||||
|
|
||||||
run_with_sampling \
|
|
||||||
"thread_stress" \
|
|
||||||
"cd '$ROOT_DIR/thread_stress_test' && ./thread_stress" \
|
|
||||||
"$OUT_DIR/thread_stress.csv" \
|
|
||||||
0
|
|
||||||
|
|
||||||
log "All experiments finished"
|
log "All experiments finished"
|
||||||
log "Run directory: $OUT_DIR"
|
log "Run directory: $OUT_DIR"
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
#include <stdlib.h>
|
|
||||||
#include <pthread.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define THREAD_NUM 10000
|
|
||||||
|
|
||||||
void *task(void *args){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(){
|
|
||||||
pthread_t pid[THREAD_NUM];
|
|
||||||
|
|
||||||
int i = 0;
|
|
||||||
for(i=0; i<THREAD_NUM; i++){
|
|
||||||
if(pthread_create(&pid[i],NULL,task,NULL) > 0){
|
|
||||||
for(int j=0; j<i; j++){
|
|
||||||
pthread_join(pid[j],NULL);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user