2016년 3월 8일 화요일

Chatting Server based on MultiThread


















  • One process can implements multitasking as using multithread.
 Use 'clnt_cnt, clnt_socks[]' valuables in critical section because of synchronization.
 Critical section is implemented by using 'mutex'
 - pthread_mutex_lock(&mutex) : critical section start
 - pthread_mutex_unlock(&mutex) : critical section end





















  • Thread Context Switching is faster than Process Context Switching
 thread share heap, data(static), code except for stack, register.



Source Code



◈ references
   picture - http://fingerdev.tistory.com/24
   picture - http://www.ibm.com/

댓글 없음:

댓글 쓰기