전체 글

PS + hacking
문제 분석먼저 주어진 소스코드를 자세히 보자.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 Scripter..
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..
· Study/OS
Mode Switch 현재 수행중인 프로세스를 교체하지 않고 수행중인 상태를 변화시키는 것 system call / exception -> 프로세스 관련 O - kernel: process context에 위치 interrupt -> 프로세스 관련 X - kernel: interrupt context에 위치 각각의 프로세스는 user, kernel stack이 존재 -> kernel은 user stack에 관계없이 실행 가능 When to Switch Process 1) Process switch 2) Interrupt -> time slice에 의한 timer interrupt -> blocked -> ready로 가는 경우 higher priority process인 경우 교체 3) Exception..
· Study/OS
Programm vs Process - program: passive entry stored on disk (binary sequence) - process: active entity (executin sequence) / 메모리에 올라온 상태 Process Control Block (PCB) - OS에서 가장 중요한 자료 구조 - OS에서 프로세스에 필요한 정보가 포함 - 인터럽트가 발생하고 수행되었을 때 마치 발생하지 않은 것처럼 다음 프로세스를 수행하기 위한 목적 - PC, processor register (context switch)는 PCB에 저장됨. - process마다 존재 1) Process Identification: PID 2) Processor State Information: St..
sy46
벌크업 중인 cpp