일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 컴퓨터구조개념
- 소프트웨어
- 방학
- 나는주니어개발자다
- 스프링부트개발
- 제품증정 #에스트라 #에스트라퓨처랩서포터즈 #리제덤아이세럼 #더마아이세럼 #레티노이드아이세럼
- 개발자
- 말하기시험
- 컴퓨터공학
- 책평가
- 코드잇
- 코멘토취업
- 코멘토5주인턴
- 함꼐자라기
- codeit
- JS
- .env파일
- 컴퓨터공학과
- computerarchitecture
- 컴퓨터구조
- Python
- 개발
- MIPS
- 스프링장점
- 코드잇파이썬
- 백엔드
- 파이썬
- 맥북FaceID
- CA
- 졸업영어
- Today
- Total
sollog
[CA] - Hazard 본문
오늘은 컴퓨터구조에서 발생하는 hazard에 대한 내용을 다루고자한다.
딱 들었을때 단어의 어감이 어떤가? 별로다!
맞다. 하자드는 다음 인스트럭션이 실행할 수 없을때 발생하는 녀석이다. 따라서 위험하다.
Hazard : The situation when the next instruction cannot be excuted in the following clock cycle.
1. Structural Hazard (구조적인 문제) - Hardware cannot support combination of instruction.
하드웨어가 인스트럭션 결합에 지지를 할 수 없을때
EX) The instruction and data should be fetched from the memory at the same time.
EX) 설치 및 데이터는 동시에 메모리에 가져와야 합니다.
2. Data Hazard (데이터 문제) : An instruction depends on the result of a previous instructions still in pipeline.
설치는 파이프라인에 따라 이전 지침의 결과들에 따라 달라집니다.
업데이트가 느린 경우에 발생해. 이전의 instruction이 아직 파이프라인에 남아있어서, 결과를 받아올 수 없는 경우임
Problem with starting next instruction before first is finished
- dependencies that go backward in time are data hazards.
첫 번째 지침을 완료하기 전에 다음 지침을 사용하는 건 좀 ..! 그렇다 마
3. Control Hazard (제어 문제): Control may be transferred to another instruction based on the results of an instruction
-> All the Hazard can be resolved by waiting . 모든 hazard는 대기를 통해 해결할 수 있음. waiting, stall, freeze (같은의미)
-pipeline control must detect the hazard. pipeline control이 위험을 감지해야함.
-take action (or delay action) to resolve hazards. 위험 조취를 해결
Control (Branch) Hazard Example
그럼 각각의 해결방법을 찾아보자.
Solutions
1. Structural Hazard (구조적인 문제)
*같은 clock cycle안에서 같은 resource를 access 하려고 할 때 발생함.
Resource Duplication
-Seperate I and D memories (caches) for memory access conflict. 메모리를 분리함
- Time-multiplexed or multi-port register file for register file access conflict. 동시에 읽고쓸 수 있게 구성
2. Data Hazard (데이터 문제) // 자세한 예시는 4장의 51페이지를 참고하기
- Freezing the pipeline (waiting,stall) instructions을 실행안하고 가만히 있는 것.
- (Internal) Forwarding
- Compiler scheduling
3. Control Hazard (제어 문제)
- Stall
- Optimized branch processing
1) Find out branch taken or not early. 브랜치 여부를 빨리 결정하자.
-> simplified branch condition
2) Compute branch target address early
-> extra hardware
- Branch prediction
- Delayed branch
'자기계발 > Study' 카테고리의 다른 글
codeit - 프로그래밍 시작하기 in Python (0) | 2024.01.04 |
---|---|
PA - 알고리즘 문제 풀이 (1) | 2023.12.30 |
[CA] - Improving cache performance (0) | 2023.12.01 |
[CA] - Basics of cache (0) | 2023.11.30 |
[CA] - Memory hierarchy general (0) | 2023.11.30 |