목록Computer Science (32)
새발블로그
Load a instruction from memory (fetch) User the opcode field to identify the instruction type(decode_ Arithmetic/logic : add, sub, and, or read 2 operand values from register perform calculation write the result back into register add 4 to pcMemory access : lw read 1 word from the register (base address) add the base address with the offset(Immediate field) load word from data memory (Address : ..
Instruction Set Arthmetic operation Logic operation Multiplication /Division Load from memory / Store to memory Jump / branch Registers RISC-V (RV32I) : 32 * 32 bit registers 32bit : Word 16bit : Half word 8bit : Byte Register는 memory보다 빠름 Memory byte : 1byte (8-bit) Memory에 있는 데이터를 바로 연산할 수 없다. load, compute, store의 단계를 거쳐야하므로, memory access를 줄이는 방향으로 가야한다. Immediate Operands The constant Zero ..
Integrated Circuit Cost Yield : percentage of correctly working dies Cost per die = Cost per wafer / Dies per wafer * Yield Dies per wafer ≈ Wafer area / Die area Yield = 1 / (1 + (Defects per area * Die area) )^N Die area와 Cost per die는 정비례!! Chiplet Trend multiple small chips semiconductor technology Response Time and Throughput Response time (latency) Duration Throughput number of tasks CPU T..
Seven Ideas in Computer Architecture Abstraction SW : Applicataion, Programming language, Machine code HW : Processor architecture, Microarchitecture, Circuit, Semiconductor(transistors) Common case fast Common case > rare case Parallelism 같은 시간 내에 여러 일을 수행함 Pipelining 한 동작을 나누어서 함 Prediction 예측에 따라서 수행함 Hierarchy memory gierarchy에 따라 크기, 속도 차이 cache memory ( frequently accessed data) Dependabil..
compliation system unix > gxx -o hello hello.c gcc: 소스코드를 실행코드로 바꿀 수 있는 utility Preprocessing : Source program(text) -> Modified source program(text) ex) hello.c -> hello.i Compiliation : Assembly program(text) ex) hello.i -> hello.s Assembly : Relocatable object programs(binary) ex) hello.s -> hello.o Linking : Executable object programs(binary) ex) hello.o -> hello 이 때, 다른 object 도 결합 Running ..
01 해싱에서 충돌은 언제 발생하는가? (1) 키가 같은 경우 (2) 해시 함수의 값이 같은 경우 (3) 같은 해시 함수를 사용하는 경우 (4) 키의 길이가 같은 경우 02 크기가 13인 해쉬 테이블에서 입력 자료 27과 130은 어떤 인덱스로 매핑되는가? 해싱 함수는 h(key)=key%13라고 하자. (A)1, 10 (B)13, 0 (C)1,0 (D)2,3 03 크기가 11인 해싱테이블을 가정하자. 해시함수로는 다음을 사용한다. h(k)=k mod 11 입력 자료가 다음과 같은 순서로 입력된다고 하면 아래의 각 경우에 대하여 해시테이블의 내용을 그려라. 12, 44, 13, 88, 23, 94, 11, 39, 20, 16, 5 (1) 충돌을 선형조사법을 사용하여 처리한다. (2) 충돌을 이차조사법을 ..
01 이진 탐색 알고리즘의 특징이 아닌 것은? ① 탐색 효율이 좋고 탐색 시간이 적게 소요된다. ② 검색할 데이터가 정렬되어 있어야 한다. ③ 피보나치 수열에 따라 다음에 비교할 대상을 선정하여 검색한다. ④ 비교를 거듭할 때마다 검색 대상이 되는 데이터의 수가 절반으로 줄어든다. 02 키 값 28을 가지고 아래의 리스트를 탐색할 때 다음의 탐색 방법에 따른 탐색 과정을 그리고 탐색 시에 필요한 비교 연산 횟수를 구하여라. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 11 12 15 16 19 20 23 25 28 29 31 33 35 38 40 (1) 순차 탐색 (2) 이진 탐색 (3) 보간 탐색 03 AVL 트리에서 회전은 언제 이루어지는가? (1) 삽입 전 (2) 삽입 후..
01 다음 초기 자료에 대하여 삽입 정렬(Insertion Sort)을 이용하여 오름차순 정렬한 경우 PASS 1의 결과는? 초기 자료 : 8, 3, 4, 9, 7 ① 3, 4, 8, 7, 9 ② 3, 4, 9, 7, 8 ③ 7, 8, 3, 4, 9 ④ 3, 8, 4, 9, 7 02 다음 자료를 버블 정렬을 이용하여 오름차순으로 정렬할 경우 PASS 1의 결과는? 9, 6, 7, 3, 5 ① 3, 5, 6, 7, 9 ② 6, 7, 3, 5, 9 ③ 3, 5, 9, 6, 7 ④ 6, 3, 5, 7, 9 03 다음 자료에 대하여 "선택 정렬"을 사용하여 오름차순으로 정렬할 경우 PASS 3의 결과는? 초기 상태 : 8, 3, 4, 9, 7 ① 3, 4, 7, 9, 8 ② 3, 4, 8, 9, 7 ③ 3, 8..