728x90
1.컴퓨터 기초
-알고리즘
-c언어 기초
-네트워크 기초
-운영체제
int main(int argc, char **argv)
{
int data[DATA_SIZE] = {5, 16, 4, 7, 1, 3, 2, 6, 8, 13, 11, 9, 10, 12, 15, 14};
pthread_t tid[3];
int thr_id;
int status;
char tm[] = "thread_m";
t_print((void *)tm);
/* 1.DIVIDE */
struct range first_half, second_half, merge_range;
int mid = DATA_SIZE / 2;
first_half.t_name = "thread_1";
first_half.index = 0;
first_half.end = mid;
first_half.data = data;
second_half.t_name = "thread_2";
second_half.index = mid + 1;
second_half.end = DATA_SIZE - 1;
second_half.data = data;
merge_range.t_name = "thread_3";
merge_range.index = mid;
merge_range.end = DATA_SIZE - 1;
merge_range.data = data;
/* 2.SORT */
/* TODO 1: 1st Thread / Sort first half of data */
thr_id = pthread_create( &tid[0], NULL, sort_thread, &first_half);
if (thr_id < 0)
{
perror("thread create error : ");
exit(0);
}
/* TODO 2: 2nd Thread / Sort second half of data */
thr_id = pthread_create( &tid[1],NULL, sort_thread, &second_half);
if (thr_id < 0)
{
perror("thread create error : ");
exit(0);
}
/* 3.MERGE */
/* TODO 3: 3rd Thread / Merge the result of two halfs */
thr_id = pthread_create( &tid[2],NULL,merge_thread, &merge_range);
if (thr_id < 0)
{
perror("thread create error : ");
exit(0);
}
/* TODO 4: waits for the first thread */
pthread_join(tid[0], NULL);
/* TODO 5: waits for the second thread */
pthread_join(tid[1], NULL);
/* TODO 6: waits for the third thread */
pthread_join(tid[2], NULL);
int i;
for (i = 0; i < DATA_SIZE; i++)
printf("%d ", data[i]);
printf("\n");
return 0;
}
멀티 스레드 프로그래밍 시 어떤 스레드가 완료될지 모르기 때문에 출력이 매번 다르다.
2.개발 기초
-자바
-스프링
-빌드툴(maven, gradle)
3.블록체인 개발
-솔리디티 기본
-스마트 컨트랙트 분석
4.기타
-도커
-디자인 패턴
5.개별 프로젝트
-cpu scheduler
-ghostcops
728x90
'매일 개발 공부' 카테고리의 다른 글
매일 개발 공부 2022.5.31 (4) | 2022.05.31 |
---|---|
매일 개발 공부 2022.5.29 (0) | 2022.05.29 |
매일 개발 공부 2022.5.26 (0) | 2022.05.26 |
매일 개발 공부 2022.5.25 (0) | 2022.05.25 |