경쟁조건,상호배제 실습
POSIX Thread 라이브러리를 사용하여 경쟁조건과 상호배제를 실습경쟁조건(race condition)
https://github.com/jyheo/OperatingSystemExercise/blob/master/race_cond.c상호배제(mutual exclusion)
https://github.com/jyheo/OperatingSystemExercise/blob/master/race_mutex.c빌드&실행
$ gcc race_cond.c -o race_cond -l pthreadMakefile을 이용하기
https://github.com/jyheo/OperatingSystemExercise/blob/master/Makefile
해보기.
https://github.com/jyheo/OperatingSystemExercise/blob/master/race_cond_2.c실행결과가 원하는 값 2000000이 나오지 않는 이유는?
해결하기 위한 방법은?