일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- float
- align-items
- box-sizing
- 알고리즘
- REM
- 미디어 쿼리
- pandas
- 강화학습
- transform
- 포토샵
- stl
- 소수
- Codility
- 백준
- Javascript
- Gap
- 상태
- grid
- CSS
- spring
- skt membership
- SK바이오사이언스
- Photoshop
- c
- 확률
- c++
- 수학
- 반응형 웹
- Prefix Sums
- 통신사할인
- Today
- Total
sliver__
4.1 Thread & Concurrency overview 본문
A thread is a basic unit of CPU utilization; it comprises a thread ID, a program counter (PC), a register set, and a stack.
Shares with other threads belonging to the same process its code section, data section, and other operating-system resources, such as open files and signals.
Motivation

Benefits
Responsiveness - Multithreading an interactive application may allow a program to continue running even if part of it is blocked or is perform- ing a lengthy operation, thereby increasing responsiveness to the user.
Resource sharing - Processes can share resources only through techniques such as shared memory and message passing. Such techniques must be explicitly arranged by the programmer. However, threads share the memory and the resources of the process to which they belong by default. The benefit of sharing code and data is that it allows an application to have several different threads of activity within the same address space.
Economy - Allocating memory and resources for process creation is costly. Because threads share the resources of the process to which they belong, it is more economical to create and context-switch threads. Empirically gauging the difference in overhead can be difficult, but in general thread creation consumes less time and memory than process creation. Additionally, context switching is typically faster between threads than between processes.
Scalability - The benefits of multithreading can be even greater in a multiprocessor architecture, where threads may be running in parallel on different processing cores. A single-threaded process can run on only one processor, regardless how many are available.
'CS > 운영체제' 카테고리의 다른 글
4.4 Thread Libraries (1) | 2023.11.09 |
---|---|
4.2 Multicore Programming (0) | 2023.11.08 |
3.8 Communication in Client–Server Systems (0) | 2023.11.06 |
3.7 Examples of IPC Systems (0) | 2023.11.06 |
3.6 IPC in Message-Passing Systems (0) | 2023.11.06 |