본문 바로가기 메뉴 바로가기

두찡의 일상

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

두찡의 일상

검색하기 폼
  • 분류 전체보기 (124)
    • 개발 (114)
      • 알고리즘 (6)
      • 일상 (50)
      • 병렬프로그래밍 (8)
      • 도트도전기 (12)
      • 코드로 알아보는 ARM 리눅스 커널 TIL (33)
      • arm64 linux 6 분석 (5)
    • 게임근황 (6)
    • 개발 외 일상 (2)
  • 방명록

분류 전체보기 (124)
[병렬프로그래밍] Spin Lock

1. Shared Bus snooping 메모리 트래픽이 있는 걸 알아서 기다림 2. Distributed each processor has partial of memory, cache internal circuit. Not share big bus 만약 Lock이 없다면 어떻게 해야할까? "spin" or "busy-wait" Test-and-Set Consensus number 2 swap true with current value return priori value Tas Lock if ret == false -> get lock if ret == true -> not get lock space O(1) - 하나의 변수에 TAS를 계속 반복 TTas Lock (Test and Test and Set..

개발/병렬프로그래밍 2019. 12. 17. 06:34
[병렬프로그래밍] Universality of Consensus

Consensus is universal (만능) n-thread consensus build (wait-free, linearizable, n-threaded implementation, any sequentially specified object) wait-free - stronger (system), lock-free (per thread) Lock-free : infinitely often some method call finishes (how to prevent starve) Wait-free : each method call takes a finite number of steps to finish lock 없이 execution order를 만들기 위해 도움을 받아야 함. 만약 실패한다면 새 ..

개발/병렬프로그래밍 2019. 12. 17. 05:51
[병렬프로그래밍] Consensus

Mutual Exclusion 이 안 좋은 이유 - Lock을 잡고 sleep 할 수 있다 Falut tolerance - 장애가 발생해도 정상적, 부분적으로 기능을 수행할 수 있음 Wait-Free synchronization 은 좋지만 어렵다 (Wait-Free : 일정 step 내에 method를 처리할 수 있음) systematically 하게 구현 하고싶지만 non deterministic 함 (현재 상태에서 여러 선택을 할 수 있음 - 오토마타 개념) Queue에서 Dequeuer가 여러 명일 때, Lock을 사용하지 않고 어떻게 처리할 수 있을까? Consensus (합의) 문제를 해결 할 수가 없음 -> race condition Consensus : Thread 별 값을 각각 갖고 있던 ..

개발/병렬프로그래밍 2019. 12. 17. 05:19
[병렬프로그래밍] Shared Memory

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..

개발/병렬프로그래밍 2019. 12. 17. 03:12
[병렬프로그래밍] Concurrent Objects

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..

개발/병렬프로그래밍 2019. 12. 17. 01:19
[병렬프로그래밍] Mutual Exclusion

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

개발/병렬프로그래밍 2019. 12. 17. 00:55
병렬프로그래밍 정리 시작

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 자세한 정리보다, 공부했던 내용을 나중에 쉽게 찾아보기 위해 만들게 되었습니다

개발/병렬프로그래밍 2019. 12. 17. 00:50
c++ shared_ptr, enable_shared_from_this

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..

개발/일상 2019. 11. 19. 19:40
네트워크 면접 공부자료

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)을 구분 - 네트워크 주소 : 라우터를 거치지 않고 내부적으로 통신이 가능한 영역 - 호스트 주소 : 특정한 내트워크 내에서 서로 구분하기 위한 주소 게이트웨이 :..

개발/일상 2019. 11. 18. 23:38
c++ 생성자, 소멸자, 대입 연산자, 복사 생성자 순서

아래 코드의 main 함수부터 순서대로 보자. #include class Data { public: int i; Data() { std::cout

개발/일상 2019. 10. 31. 17:54
이전 1 ··· 8 9 10 11 12 13 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • 링크드인
  • 깃허브
TAG
  • vrpit
  • Visual Studio
  • ad skip
  • chrome-extension
  • Golang
  • vr핏
  • Reciprocal n-body Collision Avoidance
  • 우리는 vr핏이라고 부릅니다
  • 영상 픽셀화 하기
  • 카카오
  • set value
  • 에러 위치 찾기
  • shared_from_this
  • hole-punching
  • Obstacle Avoidance
  • Quest2
  • mysql
  • 봄날에 스케치
  • red underline
  • it's called a vrpit
  • 코어 남기기
  • print shared_ptr class member variable
  • 잘못된 빨간줄
  • C++
  • SuffixArray
  • RVO
  • boost
  • 클래스 맴버 변수 출력하기
  • 면접
  • cockroach db
more
«   2025/05   »
일 월 화 수 목 금 토
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 31
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바