CS 43

Chapter 1: Software, Data Structure, and C++

경희대학교 박제만 교수님의 자료구조 수업을 기반으로 정리한 글입니다.What is abstraction?▶ Too abstract.▶ Too concrete(명확한).▶ Between too abstract and too concrete.AbstractionA model of a complex system that includes only the details essential to the perspective of the viewer of the system. Programs are abstractions.Tells what the program mus do, but not how the program does it.Abstraction Data Type (ADT)▶ ADT A data type who..

CS/자료구조 2025.03.22

Chapter 0: Introduction

경희대학교 박제만 교수님의 자료구조 수업을 기반으로 정리한 글입니다.What do we learn?Data StructureDataThe way to represent information in a suitable format for communication or analysis by humans or maachines. Data StructureWe should be able to properly manage a collection of data elements.Why should we learn data structure?to develop a high-quality programIt works.It can be modified without excessive time and effort.It is ..

CS/자료구조 2025.03.21

Chapter 1: Introduction

경희대학교 허선영 교수님의 운영체제 수업을 기반으로 정리한 글입니다.Computer System Basics▶ Introduction 작성한 test.cpp는 바로 실행될 수 없어, 머신이 이해할 수 있는 머신 랭귀지(binary)로 된 실행 가능한 형태의 프로그램(Executable)으로 번역해 주어야 한다. 이때 그 번역을 할 때 사용되는 게 컴파일러이다. test.exe는 결국 CPU가 해야 하는 명령어들을 순차적으로 저장을 하고 있는 것이다. machine language는 CPU가 처리, 즉 실행할 수 있는 언어로 binary로 되어 있기에 사람이 명령어를 이해하는 게 어렵다.이 머신 랭귀지를 사람이 이해할 수 있는 명령어로 표현한 게 assembly language이다. (1:1 관계) Ins..

CS/운영체제 2025.03.17

Computer Network Lecture.03 DLC

경희대학교 이성원 교수님의 컴퓨터 네트워크 수업을 기반으로 정리한 글입니다.ContentsDLC BasicSimple ProtocolStop-and-Wait ProtocolGo-Back-N ProtocolSelective Repeat ProtocolDLC Example - HDLCDLC Example - PPPDLC BasicData Link Control LayerConceptData Link layer2계층 하단부 - MAC Layer: physical한 medium을 여러명이 공유할 때 어떤식으로 효율적으로 공유할 것인가에 대한 방법2계층 상단부 - DLC Layer: physical한 layer에서 error가 발생했을 때 어떤 방법으로 검출 및 복구할 것인가에 대한 방법으로 2계층 역할에 충실D..

Lecture 20: Additional Lecture

경희대학교 김정욱 교수님의 컴퓨터 구조 수업을 기반으로 정리한 글입니다.Program vs. Process vs. Thread1. Program실행 가능한 파일들의 집합으로, 정적인 개념이다.Program은 disk에 일반적으로 저장되어 있어, 수명에는 제한이 없다.▶ Program2. Process실행중인 Program으로, 동적인 개념이다.Process는 main memory에 일반적으로 저장되어 있어, 수명에는 제한이 있다. (Process 종료 or 컴퓨터 off)▶ Process3. ThreadProcess의 가장 작은 실행 가능한 unit으로,Process 안에서 할당받은 자원을 이용하고, 실제로 작업을 수행하는 주체이다. (일꾼)Process는 일반적으로, mutiple threads를 가진..

CS/컴퓨터 구조 2024.12.15

Lecture 19: Memory Hierarchy - 3

경희대학교 김정욱 교수님의 컴퓨터 구조 수업을 기반으로 정리한 글입니다.Common Framework for Memory Hierarchy▶ cache / main memory TLB는 address를 mapping하는 정보밖에 없기 때문에, data를 포함한 캐시보다 작다. 용량이 클수록 miss rate가 낮다. 때문에 miss rate은 L1 > L2 > main memory ※ 용량 - L1: layer 1 cache Block Placement of Memory HierarchyQ1. Block이 어디에 위치할 수 있는가?▶ Direct mapped / Set associative / Fully associative ▶ Miss rate 확률 cache size가 증가할수록 miss rate 감..

CS/컴퓨터 구조 2024.12.15

Lecture 18: Memory Hierarchy - 2

경희대학교 김정욱 교수님의 컴퓨터 구조 수업을 기반으로 정리한 글입니다.Misses in Direct-Mapped Cache (Problem)Example▶ 0, 8, 0, 6, 8 address를 cache(size: 4)에 저장하는 상황0 -> cache memory의 index 0 위치에 Memory[0]에 대응되는 data 저장8 -> cache memory의 index 0 위치(switch)에 Memory[8에 대응되는 data 저장 0 -> cache memory의 index 0 위치(switch)에 Memory[0]에 대응되는 data 저장6 -> cache memory의 index 2 위치에 Memory[6]에 대응되는 data 저장8 -> cache memory의 index 0 위치(sw..

CS/컴퓨터 구조 2024.12.15

Lecture 17: Memory Hierarchy - 1

경희대학교 김정욱 교수님의 컴퓨터 구조 수업을 기반으로 정리한 글입니다.ROM vs. RAMROM (Read Only Memory)Write는 못하고 (저장 불가) Read만 할 있는 MemoryNon-volatile memory (비휘발성 메모리): 전원이 꺼져도 데이터가 없어지지 않음※ Mask ROM: 반도체 생산 공정인 마스킹 단계에서 고정된 데이터 회로 패턴으로 생산하는 방식 (책을 대량 인쇄하는 것처럼) ※ ROM은 공장에서 애초에 0과 1의 패턴들이 다 만들어져 나오기에 Write 할 수 없다.▶ ROM RAM (Random Access Memory)temporary MemoryRead-write memory: 읽고, 쓰기 둘 다 가능Volatile memory (휘발성 메모리): 컴퓨터가 ..

CS/컴퓨터 구조 2024.12.07

Lecture 16: The Processor - 5

경희대학교 김정욱 교수님의 컴퓨터 구조 수업을 기반으로 정리한 글입니다.3. Control HazardsProblemControl Hazard는 branch hazard라고도 하며, Data Hazard와 마찬가지로 pipeline시 발생하는 문제이다.즉, branch할 때 pipeline에서 발생하는 hazard가 control hazard이다.▶ Control hazard beq 조건 만족시 44, 48, 52줄의 instruction은 필요없게 된다.하지만, 이때 pipeline시 조건을 만족하면 문제가 발생한다. (조건을 만족하지 않으면 문제가 발생하지 않는다.) EX/MEM의 Zero signal에 기반하여, MEM/WB의 결과값인 branch or not (PC + 4)로 branch 여부가 ..

CS/컴퓨터 구조 2024.12.06

Lecture 15: The Processor - 4

경희대학교 김정욱 교수님의 컴퓨터 구조 수업을 기반으로 정리한 글입니다.Pipeline HazardsPipelining는 속도가 향상된다는, 즉 성능이 향상된다는 장점이 있다.하지만, 매 cycle마다 instruction을 실행해야 하는데 그렇지 못하는 경우, 3가지 Hazards가 발생한다. Three types of pipeline hazards1. Structure hazards: 구조적 문제2. Data hazards: 필요한 데이터를 아직 못 받은 문제3. Control hazards: 브랜치 문제1. Structure HazardsProblem현재에는 데이터가 저장된 메모리, instruction이 저장된 메모로 나눠져 있다.하지만 과거엔 영역이 나누어져 있긴 하지만 메모리가 하나로 되어 있..

CS/컴퓨터 구조 2024.12.03