pintos(6)
-
[PintOS] Project 3 키워드 정리 (File-backed page, Direct Memory Access)
File-backed page Page :- 가상 메모리를 일정 크기로 나누는 단위- 보통 4KB- 프로세스 가상 주소 공간은 Page로 구성됨- 각 Page는 연속적인 가상 주소를 가짐Frame :- 물리 메모리를 일정 크기로 나누는 단위- 보통 4KB- 물리 메모리는 이런 Frame으로 구성됨- 각 Frame은 연속적인 물리 주소를 가짐Relation :- 가상 메모리의 Page는 실제 물리 메모리의 Frame과 Mapping됨- Mapping 정보는 Page Table에 저장- 프로세스가 특정 가상 주소에 접근하면, 해당 주소를 포함하는 Page를 찾음- 해당 Page와 Mapping된 Frame을 알아내기 위해 Page Table 이용- Mapping된 Frame의 물리 주소로 변환하여 실제 데이..
2024.06.02 -
[PintOS] 2-2 System Call
GIT [process.c, process.h, syscall.c, syscall.h, thread.c, thread.h, exception.c] 영상 출처 : https://www.youtube.com/watch?v=sBFJwVeAwEk - 현재 pintOS에는 system call handler 부분이 비어있음- handler 구현 이후, system call 동작도 구현해야 함 - System Call : OS에서 제공하는 서비스를 위한 programming Interface User mode program이 Kernel 기능을 사용할 수 있게 해줌- System Call은 kernel mode에서 실행되고, 다시 user mode로 전환시킴 - syscall3 : 3..
2024.06.02 -
[PintOS] 2-1 Arguments passing
GIT [process.c, process.h, syscall.c, syscall.h] 영상 출처 : https://www.youtube.com/watch?v=RbsE0EQ9_dY Background Project 2 : User programmingObjective- pintOS에서 user program을 실행하는 것 # pintOS, 다른 OS에서는 프로세스를 실행하기 위해서 argument를 받음- process_wait() 함수에서 process_execute() 함수 인자로 받아옴- process_execute()에서는 특정 동작을 실행하는 thread를 생성함- 하지만 process_wait의 skeleton code에는 단순히 return만 기입되어 있음 -> 이러면 그냥 꺼짐 -->..
2024.06.02 -
[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