반응형

전체 글 86

Lecture 1.6 ~ 1.9: Introduction, Protocols and Layering

1-6 Protocols and Layers Copyright © Pearson Education, Inc. or its affiliate(s). All Rights Reserved. mediaplayer.pearsoncmg.com Networks Need Modularity - We need a form of modularity, to help manage complexity and support reuse Protocols and Layers - Protocols and layering is the main structuring method used to divide up network functionality - Each instance of a protocol talks virtually to i..

Lecture 1.3 ~ 1.5: Introduction, Protocols and Layering

1-3 Network Components Copyright © Pearson Education, Inc. or its affiliate(s). All Rights Reserved. mediaplayer.pearsoncmg.com Parts of a Network - app과 연결된 노드 = host - 단순히 노드간에 메세지를 넘겨주는 노드 = router - 노드간의 연결 단위 = link - 하나의 host에 여러 app이 연결? => multiplexing Component Names Types of Links - Full-duplex : Bidirectional - same frequency, same time에 양방향 통신 가능 - Half-duplex : Bidirectional - same ..

Lecture 1.1 ~ 1.2: Introduction, Protocols and Layering

1-1 Goals and Motivation Copyright © Pearson Education, Inc. or its affiliate(s). All Rights Reserved. mediaplayer.pearsoncmg.com Three "networking" topics - Distributed systems : 각기 다른 어플리케이션들이 어떻게 네트워크 상에서 - Networking : 패킷들이 어떻게 네트워크 상에서 - Communications : 신호를 통해 어떻게 메세지가 네트워크 상에서 우리가 배울 것은 Networking! The Main Point 1. To learn how the Internet works 2. To learn the fundamentals of computer ..

Lecture 09: Machine-Level Programming 5: Advanced Topics

Memory Layout x86-64 Linux Memory Layout 최대 주소 값이 00007FFFF....FF 인 이유는 x86-64에서는 47 비트를 주소에 사용하기 때문 메모리 할당은 주소의 낮은쪽이나 높은쪽에서부터 된다 Memory Allocation Example malloc으로 할당한 메모리 중에 큰 메모리는 주소값이 큰 쪽에 할당되고, 작은 메모리는 주소값이 작은 쪽에 할당됨 계속 할당하다보면 사이에 존재하는 공간이 없어진다 Buffer Overflow : Vulnerability, Protection Recall: Memory Referencing Bug Example Such problems are a BIG deal String Library Code Vulnerable Buffe..

Lecture 08: Machine-Level Programming 4: Data

Arrays Array Allocation Array Access char *p; p++; // 실제로 p = p + 1; int *ip; ip++; // c언어에서는 +1이지만 실제로 ip = ip + 4; *(ip + 2) // 아래와 같다 ip[2] ip + x // notation ip + 4x // computation &는 주소값을 반환 *( 포인터 주소 )는 해당 주소에 저장된 값을 반환 Q. *(ip + negative_value) 가능한가? A. 컴파일러는 아무 상관없이 작동할 것이다. 다만 undefined value가 찾아질 뿐.. Q. *(2 + ip) 라면 어떻게 되는가? A. 불가능할 것이다 ㅎㅎ *(ip + 2)가 가능했던 것은 컴파일러가 포인터라는 것을 알고 +2를 scale..

Lecture 07: Machine-Level Programming 3: Procedures

Mechanisms in Procedures Passing Control : 빨간색 화살표와 같이 호출되면 이동했다가 리턴되면 다시 돌아가는 Passing data : P에서 정의된 x 값이 Q에 i로 전달되고, 리턴되는 값이 다시 P로 반환되는 Memory management : C에서는 반환되면 deallocate x86-64에서는 오버헤드를 많이 줄였다 Procedures x86-64 Stack LIFO : Last In First Out x86-64 Stack: Push x86-64 Stack: Pop Coding Conventions Procedure Control Flow %rip : program counter callq instruction은 아래의 3가지 역할을 한다 decrement s..

Lecture 06: Machine-Level Programming 2: Control

Control: Condition codes Processor State (x86-64, Partial) x86-64에는 16개의 register가 존재 rsp는 stack을 나타내는 레지스터 rip는 명령문을 가리키는 레지스터 condition codes는 주어진 4개의 1 bit flag 말고도 8개가 존재 Condition Codes (Implicit Setting) CF : 너무 큰 수의 연산에서 MSB 비트에서 올림이 발생한 경우 ZF : 연산으로 인해 0의 값이 발생한 경우 SF : 두 수의 연산으로 인해 음수의 값이 발생한 경우 OF : 연산에서 overflow가 발생한 경우(positive overflow & negative overflow) Condition Codes (Explicit ..

반응형