본문/내용
Pintos
1. bochs, pintos 설치
Virtual Box를 이용하여 Ubuntu를 설치하고 bochs와 pintos를 설치한다.
1.1 bochs 실행화면
1.2 pintos -v -k -- run alarm-multiple 실행화면
2. Pintos 부팅과정 분석
threads/init.c의 main()에서 호출하는 함수들을 큰 것을 중심으로 보면 다음과 같다.
ram_init ();
- 램을 초기화 한다.
thread_init ();
- threads와 관련된 것들을 초기화 한다.
console_init ();
- console 관련 초기화
palloc_init ();
- page-size로 메모리를 나누어서 관리.
malloc_init ();
- 메모리 할당 관련 초기화
paging_init ();
- 새로운 Page Directory를 사용할 수 있도록 초기화
intr_init ();
- Interrupt controller를 초기화 한다.
timer_init ();
- timer 관련 사항 초기화
thread_start ();
- thread를 생성하며 스케쥴링을 시작한다.
serial_init_queue ();
- serial port device를 초기화
timer_calibrate ();
- loops_per_tick 를 조정한다.
run_actions (argv);
- 저장된 action을 모두 실행
3. Pintos Source 분석
1) devices
키보드 등의 I/O deviece interface를 위한 소스코드이다.
2) lib
표준 C library가 들어있다.
3) threads
base 커널을 위한 소스 코드가 있다.
4) userprog
user program loader를 위한 소스가 들어있다.
4. 테스트 작성 (Hello world, 작성자 이름)