2022-01-08

1/9 자바 병렬 프로그래밍

 -재진입성 (reentrant): 동기화 메서드는 스레드 단위로 진입한다. 요청 단위가 아니다

- volatile 키워드 : 이 변수는 공유변수이며 재배치되서는 안된다는 뜻. 캐싱되지않는다

가시성만 보장한다

연산의 단일성은 보장하지 않음(약하다)

- 락은 연산의 단일성 및 가시성 둘다 보장


 Situations when constructors are not thread safe are for example :

  • modifying static variable from within a constructor without proper synchronization mechanism
  • publishing this reference from within constructor before the object is fully initialized and can be accessed by other threads.


https://www.baeldung.com/java-thread-constructor
- 완전히 생성된 후에 그 객체를 다룰수있도록 해야한다

댓글 없음:

댓글 쓰기

0328 fdisk, mkfs, mount, fstab

 1. 하드디스크를 붙인다. 2. fdisk -l로 하드디스크를 확인한다.  - interactiive한 커맨드모드 사용하여 (m) 붙인 하드디스크의 파티셔닝을 한다.  - 마지막에 w를 해야 실제로 반영이 된다.  3. mkfs를 하여 어떤 파일시스...