[YB] 12장 - 자바 메모리 모델과 스레드 정리#4
Open
Bumnote wants to merge 3 commits into
Open
Conversation
SoTaeHo
reviewed
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
12장 주제인 "자바 메모리 모델과 스레드"에 대해서 읽어보았습니다.
우선, Servlet 기술로 인해 하나의 요청 당 하나의 스레드 즉, Thread Per Request가 이루어져 나름 스레드에 대해서 친숙하다고 생각했는데, 제 착각이었던 것 같습니다. JVM 내부적으로 스레드 개념은 정말 심오하고, 추상화가 많이 되어있으며 사실상 시스템 레벨인 커널과도 밀접한 관계가 있는 개념이라는 것을 깨달았습니다.
또한, volatile 지시어를 통해 메모리 가시성을 확보할 수 있고, 이를 통해 동시성을 막을 수 있다고만 알고 있었는데, 그 이유가 내부적으로 명령어 재정렬 최적화를 막아 명령어 순서를 보장함으로써도 동시성 문제를 막을 수 있다는 새로운 내용을 알게 되었습니다.
가상 스레드에 대해서도 읽어는 보았지만, 제법 와닿지는 않아서 이 내용들은 추후에 다시금 읽어보아야 할 것 같습니다. 중간 중간 토론회를 해도 괜찮을 것 같습니다.