전체 글(23)
-
[PintOS] 1-3 Advanced Scheduler
GIT [thread.c, thread.h, timer.c, synch.c, fixed_point.c, fixed_point.h, targets.mk] 영상 출처 : https://youtu.be/4-OjMqyygss 🔥 Main Goal1. MLFQ 특성을 갖는 4.4 BSD scheduler 구성하기 (queue 제외하고) - Give priority to the processes with interactive nature - Priority based scheduler ⇒ 우선순위 계산할 때 equation 사용 Why Advanced Scheduler ?- priority scheduler는 thread의 실행을 판단하는 요소가 prioirty 하나 뿐이다1. 우선순위에 따라..
2024.05.18 -
[PintOS] 1-2 Priority Scheduler, Priority Donation
GIT[thread.c, thread.h, synch.c, synch.h] 이론 영상 출처 : https://www.youtube.com/watch?v=myO2bs5LMak1. Priority schedulerWhy Priority Scheduler ?- Alarm Clock에서는 tick 단위로 실행 thread 관리, sleep & wake 상태로 thread 실행 관리- FIFO 방식이므로 thread의 중요도를 고려하지 않는 한계=> thread에 priority 요소를 추가하여, 우선순위를 고려한 scheduling을 하고자 함- 우선순위를 고려한다는 것은, priority라는 요소를 struct thread에 추가한다는 것 - 기존의 ready_list에 thread를 insert 할 때, p..
2024.05.18 -
[PintOS] 1-1 Alarm Clock
GIT[thread.c, thread.h, timer.c, timer.h] 이론 영상 출처 : https://www.youtube.com/watch?v=myO2bs5LMak# Todo - Pintos uses busy waiting for alarm - Modify pintOS to use sleep/wake for alarm# Files to Modify- threds/thread- devices/timer # todo1. create sleep_list 2. create wake_up()3. create sleep()4. modify timer_sleep()5. modify timer_interrupt()6. modify thread_init()7. Function : 쓰레드 상태를 blocke..
2024.05.16 -
[PintOS] Project 1 키워드 정리 (Race Condition, Context Switching, PCB, Process State)
Race Condition Definition :- 두 개 이상의 프로세스가 공통 자원을 동시에 읽거나 쓰는 동작을 할 때, 공용 데이터에 대한 접근이 어떤 순서에 따라 이루어졌는지에 따라 그 실행 결과가 같지 않고 달라지는 상황 Case :- 여러 프로세스가 공유 데이터 또는 리소스에 접근하고 시스템이 해당 리소스에 대한 접근을 적절하게 제어하거나 동기화하지 않을 때 발생 => 데이터 손상, 충돌 또는 시스템의 의도하지 않은 동작 발생 가능 Reason :- 공유 자원에 대한 동시 접근 여러 쓰레드 또는 프로세스가 적절한 동기화 없이 공유 리소스에 접근 - 비원자적 작업 여러 단계로 구성되고 단계 사이에서 중단될 수 있는 작업은 비원자적 여러 쓰레드가 공유 리소스에서 비원자적 작업을 수행하는 ..
2024.05.10 -
CSAPP: Network Programming
1. Client - Server Programming Model - 모든 네트워크 Application : Client - Server Model → 1개의 Server ↔ 1개의 Client- 서버 : 일부 리소스 관리 / 조작 → 클라이언트에 서비스 제공ex) 웹서버 , FTP 서버, 이메일 서버웹서버 : 디스크 파일 관리 -> 클라이언트를 대신해 이들을 가져오고 실행FTP 서버 : 클라이언트를 위해 저장하고 읽어오는 디스크 파일 관리이메일 서버 : 클라이언트를 위해 읽고 갱신하는 스풀 파일 관리Client - Server Model의 근본적 연산 = Transaction* Transaction : DB의 상태를 변화시키기 위해 수행하는 작업의 단위 DB의 상태 변화 : SEL..
2024.05.07 -
[Webproxy-lab] Tiny Web Server
GIT 1. main()- 주어진 포트 번호로 listening socket 생성 후, 반복적으로 request 처리 2. doit()- HTTP request 처리 3. read_requesthdrs()- HTTP request Header 읽음 4. parse_uri()- URI 분석 5. get_filetype()- 파일 이름으로부터 파일 타입을 결정 6. serve_static()- 정적 컨텐츠를 제공 7. serve_dynamic()- 동적 컨텐츠 제공 8. cgi-bin/addr.c- 2개의 숫자를 더하는 CGI 프로그램 코드 9. home.html 10. localhost:[port number] access make./tiny [port number]Chrome ->..
2024.05.06