linux system programming, 238p. 두 시간 삽질했다. thread arg 를 포인터로 주는데 여러 개를 쓰려면 struct로 정의해서 써야 한댄다. 맞는지 틀린지.. #include <pthread.h> #include <stdio.h> #include <unistd.h> //arg를 여러 파라미터로 사용하기 위해, //구조체로 정의 //https://stackoverflow.com/questions/52812004/parameter-passing-multiple-values-using-void-pointer //여기 참조 //공유 자원. int sharedInt=0; //mutex 설정. static pthread_mutex_t the_mutex = PTHREAD_MUTEX_INITIALIZER; struct myStruct { //struct는 initilizer를 지원하지 않음.…… mutex 예제 계속 읽기


thread 예제
linux system programming, 234p https://bitsoul.tistory.com/m/157 여기 참조. #include <pthread.h> #include <stdio.h> #include <unistd.h> void* start_routine(void* arg ){ int pid; int threadID; pid= getpid(); printf(“pid is %d\n”, pid); threadID = pthread_self(); printf(“tid is %lu\n”,threadID); printf(“data is %s\n”,arg); } int main(){ pthread_t thread[2]; const char *message1=”hello one”; const char *message2=”hello two”; const char *message3=”hello main”; int ret,…… thread 예제 계속 읽기
daemon 예제
linux system programming, 174p 예제 실행. #include <sys/types.h> #include <sys/stat.h> #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <linux/fs.h> int main (void) { pid_t pid, sid; int i; int j=0; /* create new process */ pid = fork (); printf(“Pid is %d \n”,pid); if (pid == -1) return -1; else if (pid != 0)…… daemon 예제 계속 읽기
순창 채계산 출렁다리
Sorry you have no rights to view this post!
데이터 과학을 위한 통계
isbn: 9791162240984 R을 사용하여 여러 통계 개념을 설명한다. 이런 개념은 R을 이렇게 사용하면 된다 이런 느낌이다. 어차피 통계 일도 모르는 난 R보다 python을 쓸 생각이다. 여기 개념을 현실에 어떻게 적용할 지 도저히 모르겠다. box plot에서 outlier가 많다면 이를 근거로 어떤 판단을 할까? 당연한 사실을 알기만 하고 그 다음은 보이지 않는다.