전체 글

PS + hacking
· Hacking
Chunk: 덩어리1. ptmalloc이 할당한 메모리 공간을 의미2. 헤더와 데이터로 구성- 헤더: 청크 관리에 필요한 정보-- 사용 중인 청크 + 해제된 청크로 구성- 데이터: 사용자가 입력한 데이터가 저장bin: 사용이 끝난 청크들이 저장되는 객체62개의 smallbin63개의 largebin1개의 unsortedbin2개의 사용되지 않는 bin - smallbinsmallbin[0] = 32smallbin[61] = 1008 바이트 크기의 chunk를 보관청크의 크기는 16바이트씩 커짐. - 원형 이중 연결 리스트, 먼저 해제된 청크가 먼저 재할당- FIFO, LIFO - fastbin- 단일 연결 리스트- LIFO- 청크는 서로 병합되지 않음. - largebin- 1024 바이트 이상의 크기를..
cmd_center cmd_centerDescription IP를 확인할 필요가 없습니다! 혹시 다른 명령어는 못쓰나요? 다른 명령어를 사용했다면 플래그를 획득하세요! References https://dreamhack.io/learn/2/1#3 https://dreamhack.io/learn/2/14#3dreamhack.io문제 분석12345678910111213141516171819202122int main(){         char cmd_ip[256] = "ifconfig";        int dummy;        char center_name[24]; // bof         init();         printf("Center name: ");        read(0, center..
문제 분석먼저 주어진 소스코드를 자세히 보자.1234567891011121314if __name__ == "__main__":    s = Seed()     seed = s.GenerateSeed()    print(f"Seed: {seed}")     while 1:        k = input("Key: ").strip().split() # input ex) 41 42 43 44        kl = [int(x) for x in k]         if s.Authentication(seed, kl):            break     print('DH{fake_flag}')Colored by Color Scriptercsmain문을 먼저 살펴보면,s = Seed() 함수의 리턴 값을 저장하..
Key : 무언가를 식별하는 고유한 식별자 Super Key : tuple을 유일하게 식별할 수 있는 하나 이상의 속성들의 집합 Candidate Key 최소의 attribute, 여러개 가능 Primary Key 오직 1개, NULL X, 유일, 중복 X Foriegn Key 없는 관계에 대해 참조할 수 없도록 제한을 걸어둠 -> primary key가 다른 테이블에서 참조가 될 때 사용 Relational Algebra - 관계 대수 Select - 튜플 선택 Project - attribute 추출 - 중복은 제거 Cartesian product - 조건이 없는 결합 - 불필요한 정보가 포함될 수 있음 Join - 조건이 있는 결합
TCP: 연결 지향 Stream Delivery TCP: byte stream UDP: bound delivery Sequence Number - TCP 세그먼트의 연속된 번호 - random ACK 1. Selective ACK -> 받은 데이터의 시작 번호를 반환 2. Cumulative ACK -> 받은 데이터의 다음 번호를 반환 TCP segment format - Header: 20 ~ 60 bytes 16 bit: src port address 16 bit: dst port address 32 bit: sequence number 32 bit: acknowledge number 4 bit: HLEN 6 bit: reserved 6 bit: Flag 16 bit: window size 16 bi..
ISO vs OSI ISO: International Standards Organization OSI: Open System Interconnection 7: Application -> message 4: Transport -> packet, segment, user datagram / process-to-process 3: Network -> datagram / src-to-dst 2: Data link -> frame / hop-to-hop 1: Physical -> bit / one to next Network Curcuit Switching Network: 중앙제어 전달 방식 -> 먄악 중앙이 없어지면 모두 사용 불가능 -> 인터넷은 중앙을 없앰 -> 경로 설정에 필요한 중앙 제어가 존재하지 않음..
· Study/OS
Multi-Processor (MP) Scheduling 1) Loosely coupled | Distributed multiprocessor -> 물리적으로 다른 컴퓨터의 프로세서 2) Tightly coupled multiprocessor -> 한 컴퓨터 내의 여러 프로세스가 메모리 공유 approach MP scheduling 1) Asymmetric multiprocessing (master / slave) -> 다른 역할을 부여 --> bottleneck 발생 가능 2) Symmetric multiprocessing (SMP, peer) -> 대등한 역할 Design Issue - UP scheduling 하나의 프로세서 -> 큐에서 선택 --> 수행 중에 결정 - MP scheduling 1)..
· Study/OS
Terminology - CPU Burst: CPU to execute Time - I/O Burst: wait for I/O Time Type of scheduling 1. Long-term scheduling - 디스크에 있는 프로세스 중 어느 프로세스를 메모리로 적재할지 결정 2. Medium-term scheduling - multiprogramming을 관리하는 경우 - 어떤 프로세스를 디스크로 swap할지 결정 3. Short-term scheduling - 메모리에 있는 프로세스 중 어느 프로세스를 수행할지 결정 Scheduling Criteria - system oriented: throughput, processor utilization, fairness, fair-share - user..
sy46
벌크업 중인 cpp