OS/PintOS 4

[Pintos] Alarm Clock

Alarm Clock 과제는 다음과 같습니다.devices/timer.c 에 있는 timer_sleep()을 다시 구현해봅시다.Although a working implementation is provided, it busy waits, that is, it spins in a loop checking the current time and calling thread_yield() until enough time has gone by. Reimplement it to avoid busy waiting. 🔥 이미 잘 작동하는 timer_sleep()이 구현되어있지만 이는 busy wait 방식입니다. 즉 이는 계속해서 반복문을 돌면서 현재 시간을 확인하고 충분한 시간이 경과할 때까지 thread_yield..

OS/PintOS 2024.09.05

[Pintos] project1: Threads 플로우 차트

Introduction · GitBookNo results matching ""casys-kaist.github.io  GitHub - casys-kaist/pintos-kaistContribute to casys-kaist/pintos-kaist development by creating an account on GitHub.github.com Thread Life cyclemain 함수에서 thread_init () 함수를 실행하면default thread 인 main thread가 하나 생성됩니다. 이후thread_start () 함수를 통해 스레드 스케쥴러가 작동하기 시작합니다.따라서 이 함수를 통해 스레드의 라이프사이클의 시작을 확인해볼 수 있습니다. thread_start 함수는 다음과 같은 ..

OS/PintOS 2024.09.03

PintOS 프로젝트 - 프로그램 이해를 위한 플로우 차트 그리기

핀토스에는 OS를 본뜬 정말 많은 프로그램이 존재한다. main 프로그램에서thread 사용을 위한 초기화 작업을 진행하거나,각 메모리 사용을 위한 초기화 작업을 진행한다. 또한 각 챕터별 과제에서 사용할 기능 및 장치도고유한 프로세스 플로우가 존재한다. 그런데 인터넷에서 구할 수 있는 자료는 전부 다 소스코드로만 이뤄져 있어서,각 과제를 제대로 이해하기 위해서는코드를 보고 플로우 차트를 직접 그려야 한다 생각했다. 그래서 여러 플로우 차트 중, 시스템 플로우 차트를 사용해각 기능들을 이해해보려고 한다. 플로우차트어떤 일을 처리하는 과정을 간단한 기호와 화살표로 도식화한 그림.주로 컴퓨터 프로그래밍에서 프로그램이 돌아가는 과정을 그림으로 나타낼 때 사용되는 일종의 블록선도이다.   각 단계는 정해진 다이..

OS/PintOS 2024.09.03