* 해당 게시물은 경북대학교 컴퓨터학부 강의초빙교수, 배준현 교수님의 강의를 보고 작성되었음을 미리 알려드립니다. ( 개인적인 공부를 정리한 글입니다. )
> 주니온 TV Youtube Channel. https://www.youtube.com/channel/UCOcPzXDWSrnaKXse9XOPiog
> 주니온 TV Inflearn page. https://www.inflearn.com/users/@joonion
[ ] A thread is
- a lightweight process.
- a basic unit of CPU utilization.
- comprises a thread ID(pid X), a program counter, a register set, and a stack.
굳이 fork할 필요 없이, 프로그램 내에서 thread만 관리할 수 있다.
[ ] The benefits of multithreaded programming:
- Responsiveness: may allow continued execution
if part of process is blocked, especially important for user interfaces.
- Resource Sharing: threads share resources of process,
easier than shared-memory or message-passing.
- Economy: cheaper than process creation,
thread switching lower overhead than context switching.
- Scalability(확장성): proeess can take advantage of multiprocessor architectures
[ ] Multithreading in a multicore system.
- more efficient use of multiple cores for improved concurrency.
- There are four threads.
[ ] Programming Challenges in Multicore systems.
- Identifying tasks: find areas can be divided into separate tasks.
확실하게 병렬적으로 수행해야만 하는 작업이 무엇인지를 결정하는 것. 쪼개는 것이 무의미해질 수 도 있다.
- Balance: ensure the tasks to perform equal work of equal value.
- Data splitting: data also must be divided to run on separate cores.
- Data dependency: ensure that the execution of tasks is synchronized to
accommodate the data dependency
- Testing and debugging: more difficult than single-thread.
[ ] Types of parallelism.
분산시스템을 통해서 컴퓨터 환경을 구성한다면 위의 개념은 크게 중요하지 않다.
[ ] Amdahl's Law 코어는 무조건 많을수록 좋은가?
- for example,
S = 0.25, N=2, speedup = 1.6
S = 0.25, N=4, speedup = 2.28
모든 것이 병렬처리가 가능하다면, 선형적으로 속도가 증가하겠지만, 그렇지 못한다면 선형적인 결과를 기대할 수 없다.
'Computing > Operating System' 카테고리의 다른 글
09 > 동기화(1) (0) | 2021.11.15 |
---|---|
08 > CPU scheduling (0) | 2021.11.15 |
03 - 05 > Process [프로세스의 이해, 생성, 통신] (0) | 2021.11.07 |
01 - 02 Intro [운영체제란?, 운영체제 개념과 구조] (0) | 2021.11.07 |
[GNU] 정리. (0) | 2021.10.13 |