
Modern Multiprocessors 에서 사용되는 shared memory 는 어디에서 부터 온 것일까? 에 대한 내용 Register : Holds a (binary value), Can be read & written Register 의 종류 Safe Register : valid 한 값을 읽으면 safe (some valid value) ㄴ ex) binary 1bit register read 0 or 1 (safe), read "hi" (unsafe) Regular Register : Old Vluae if no overlap, Old or one of new values if overlap ㄴ Regualr != Linearlizable Atomic Register : Linearizabl..

Concurrent Objects : 여러 쓰레드가 하나의 Object에 동시에 접근 Queue에서 하나의 enqueuer thread와 하나의 dequeuer thread만 있을 때라고 가정 Bounded Queue, Non Blocking 1. 가장 쉬운 방법 ㄴ 모든 method 에서 lock을 잡음 2. wait-free (wait-free 개념은 후에 나옴) ㄴ enqueue : non blocking 이므로, 꽉 차 있을 때 에러를 발생한다. tail을 1 증가시키고 element 추가 ㄴ dequeue : non blocking 이므로, 비어있을 때 에러를 발생한다. element 값을 저장 한 후 head를 1 증가 ㄴ lock을 잡을 필요도 없고, 일정 step 내에 끝남 Concurre..
Mutual Exclusion - algorithm for critical section 공유 불가능한 자원의 동시 사용을 피하기 위해 사용되는 알고리즘 Concurrent Programming 이 어려운 이유 : unpredictable 예측할 수 없다 #include #include int a; void foo() { for (int i = 0; i < 100000; i++) { a++; } } int main() { a = 0; std::thread thread1(foo); std::thread thread2(foo); thread1.join(); thread2.join(); std::cout
http://cs.brown.edu/courses/cs176/lectures.shtml CS1760 – Lectures Lectures Lectures will not be recorded this semester, but the videos from 2012 are available: 2012 CS1760 Lecture Videos. Date Topic September 6 Introduction (PDF) September 11 Mutual Exclusion (PDF) September 13 Concurrent Objects (PDF) September 18 Concu cs.brown.edu 자세한 정리보다, 공부했던 내용을 나중에 쉽게 찾아보기 위해 만들게 되었습니다
2023.02.24 2019년의 내가 제대로 알지 못했던 내용을 추가 기본적으로 shared_from_this 는 shared_ptr 로 만든 객체를 다른 함수에 넘기다 보니 rawPointer 로 변환하여 넘긴 상황에서 다시 shared_ptr 로 변환하는 용도로 사용한다. 기본적으로 public std::enable_shared_from_this 를 상속받은 클래스는 raw pointer 에서 shared_from_this 를 통해 shared_ptr 객체를 얻을 수 있지만, 이 객체는 이미 shared_ptr 로 관리되고 있는 객체여야 한다. 아래 예시를 살펴보자 class Hi : public std::enable_shared_from_this { public: Hi() { std::cout ge..
Ethernet : 네트워크 기술 중 하나, OSI 1~2 계층 CSMA/CD 방식 사용 CSMA/CD : - CSMA (carrier sense multiple access) 자신의 신호를 carrier에 보내기 전 항상 확인 - CD (collision detecting) : 유선 LAN에서 주로 사용하며, 자신이 보낸 신호가 충돌이 일어나면 충돌 신호를 보낸후, 재전송 -- IP : TCP/IP 를 사용하는 장비들을 구별하기 위한 주소 DNS : ip주소를 문자로 변경해 주는 시스템 서브넷 마스크 : 네트워크 부분(1), 호스트 부분(0)을 구분 - 네트워크 주소 : 라우터를 거치지 않고 내부적으로 통신이 가능한 영역 - 호스트 주소 : 특정한 내트워크 내에서 서로 구분하기 위한 주소 게이트웨이 :..

https://stackoverflow.com/questions/36092937/should-i-use-const-cast * (미리보기) 절대 이렇게 이용하면 안 된다 const bool do_it = true; bool *ptr = const_cast(&do_it); *ptr = false; // optimizer probably thinks this is always true if (do_it) initiate_nuclear_first_strike(); c++의 type casting에 대해 공부하던 도중 const, volatile 속성을 없애주는 const_cast에 대해 의문이 생겼다. 도대체 상수로 선언한 값을 왜 바꾸고 싶어 하는 걸까? const_casting에서는 non-const 변수..
- Total
- Today
- Yesterday
- chrome-extension
- Obstacle Avoidance
- Quest2
- Reciprocal n-body Collision Avoidance
- 잘못된 빨간줄
- 봄날에 스케치
- it's called a vrpit
- vr핏
- shared_from_this
- set value
- 에러 위치 찾기
- 면접
- cockroach db
- 클래스 맴버 변수 출력하기
- Golang
- boost
- red underline
- 영상 픽셀화 하기
- vrpit
- SuffixArray
- mysql
- ad skip
- 카카오
- RVO
- Visual Studio
- hole-punching
- C++
- 우리는 vr핏이라고 부릅니다
- 코어 남기기
- print shared_ptr class member variable
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |