(미완)[Python]Global Interpreter Lock에 대해서
GIL(Global Interpreter Lock)이란
In CPython, the global interpreter lock, or GIL, is a mutex that protects access to Python objects, preventing multiple threads from executing Python bytecodes at once. This lock is necessary mainly because CPython's memory management is not thread-safe.
deadlock이란
race condition이란
thread는 자기가 속한 process 내에 shared memory에 접근할 수가 있는데,
다수의 thread가 shared memory에 동시에 접근할 수도 있다.
이 때 다수의 thread가 동시에 한 변수에 각자의 작업을 한 것이,
각 thread가 작업한 것이 타 thread에 반영이 즉각 이루어 지지 않을 수가 있다. 이 현상을 race condition이라 한다.
즉, 다수 thread가 특정 값을 동시에 접근하여 변경하는 것을 가리킴
thread-safe란
race condition을 방지하며 thread가 작동함
mutex(mutual exclusion)란
참고자료:
dgkim5360.tistory.com/entry/understanding-the-global-interpreter-lock-of-cpython
왜 Python에는 GIL이 있는가
Python 사용자라면 한 번 쯤은 들어봤을 (안 들어봤다 해도 괜찮아요) 악명 높은 GIL (Global Interpreter Lock)에 대해 정리해본다. Global Interpreter Lock 그래서 GIL은 무엇인가? Python Wiki에서는 이렇게..
dgkim5360.tistory.com
timewizhan.tistory.com/entry/Global-Interpreter-Lock-GIL
Global Interpreter Lock (GIL)
해당 글은 아래 글을 번역 및 의역한 것이다. (보다 자세한 부분은 첨부된 페이지를 참조) https://realpython.com/python-gil/#why-wasnt-it-removed-in-python-3 Python의 Global Interpreter Lock (GIL)은 mute..
timewizhan.tistory.com
Deadlock - 나무위키
먼 길아기가 잠드는 걸 보고 가려고 아빠는 머리맡에 앉아 계시고. 아빠가 가시는 걸 보고 자려고 아기는 말똥말똥 잠을 안 자고. Deadlock. 교착 상태. 운영체제 혹은 소프트웨어의 잘못된 자원 관
namu.wiki