Pintos project2 정리-키워드 중심& 흐름

developer_jennifer·2023년 6월 28일
0

크래프톤 정글

목록 보기
26/29

Project 2: User Programs

User mode vs. Kernel mode

Process

  • Process Environment block (PEB)
  • Process identifier (PID)

User Stack

x86_64 calling convention

Register vs. Memory

argument vector

Executable Linkable Format (ELF) & loader

system call (syscall)

!!CAUTION!! some system call’s semantic may differ from POSIX standards

  • filesys related
    • open, close, create, read, write, seek, tell, ...
  • process related
    • halt, exit, exec, fork, wait ...

file descriptor

  • file descriptor table
  • dup2 syscall

Project 2 흐름

프로세스 실행 흐름

init.c → int main(void) → run_actions(argv) → run_task(char **argv) → process_create_initd(task) → thread_create (file_name, PRI_DEFAULT, initd, fn_copy) → initd→process_exec → load, do_iret

Argument Passing

process_create_initd(task)->process_exec-> argument_stack()-> process_wait

UserMemory

syscall이 호출되기 전 포인터에 대한 검증을 거친뒤 syscall을 실행
따라서 주소 값이 유저 영역에서 사용하는 주소 값인지 확인하는 함수, 유저 영역을 벗어난 영역일 경우 프로세스 종료

System call

이전에 정리한 글 보러가기

profile
블로그 이전합니다 -> https://heekyoung2000.tistory.com/

0개의 댓글

관련 채용 정보