-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
solvedQuestion solvedQuestion solved
Description
Step-1에
For debugging purposes, you may change the constant definitions in burger.h. However, your implementation must be able to work with arbitrary constant values.
라고 적혀있습니다.
https://www.ibm.com/docs/en/zos/2.4.0?topic=functions-pthread-create-create-thread
ibm의 문서에 따르면, pthread_create() inspects this address space before creating a new thread. A realistic limit is 200 to 400 threads.
이라고 적혀있습니다. 즉, 동시에 실행될 수 있는 thread의 수에는 제한이 존재하며, CUSTOMER_MAX를 10000 이상의 매우 큰 값으로 설정해 두고, ./client 1000등을 실행할 경우 일부 thread가 정상적으로 실행되지 않아 pthread_join에서 block되는 경우를 확인하였습니다. 이 경우에 client에서 다음 세 가지 경우 중 어떤 방식으로 구현하여야 하는지 문의드립니다.
- thread가 정상적으로 실행되지 못한 경우, 앞선 thread가 종료될 때까지 기다린 후 다시 생성 시도
- thread가 정상적으로 실행되지 못한 경우 에러를 반환하고 client를 즉시 종료
- thread가 정상적으로 실행되지 못한 경우 정상적으로 실행되지 못한 스레드를 기록해 둔 후, pthread_join에서 예외처리
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
solvedQuestion solvedQuestion solved