-
4-1 MultithreadTIL(today i learned)/운영체제 2023. 4. 3. 21:15
스레드는 같은 프로세스에 속한 다른 스레드와 코드,데이터 섹션,등을 공유한다.
또한 각스레드마다 레지스터와 스택,프로그램 카운터를 가지고있다.
웹서버가 다중스레드화 되면,서버는 클라이언트의 요청을 listen하는 별도의 스레드를 생성한다.
장점:
응답성:긴 작업을 수행하더라도 프로그램의 수행이 계속되는 것을 허용함으로써,사용자에대한 응답성을 증가시킨다.
자원공유:스레드는 그들이속한 프로세스의 자원들과 메모리를 공유한다.
경제성:프로세스생성보다 비용이 적게든다.
규모 적응성:각각의 스레드가 다른처리기에서 병렬로 수행될수있다.
'TIL(today i learned) > 운영체제' 카테고리의 다른 글
Chapter 5: CPU Scheduling (0) 2023.04.10 Android Process Hierarchy (0) 2023.03.27 3.2.1 Scheduling Queues (0) 2023.03.22 3.1 Process Concept (0) 2023.03.20 용어 정리 (0) 2023.03.19