Computer Engineering13 [운영체제] 01. systemcall ✔️CPU에는 user mode와 kernel mode가 있음user mode에서는 일부 명령어만 처리가능, kernel mode에선 모든 명령어가 처리가능하고 하드웨어의 모든 feature를 사용 가능 system call이 일어나면 TRAP 명령을 이용하여 user mode에서 kernel mode로 전환하여 operating system이 동작→ 작업이 끝나면 다시 user mode로 example) read system callcount=read(fd, buffer, nbytes)fd: 파일, buffer: 포인터로 버퍼 가리킴, nbytes: 읽어야 할 바이트 수 다음 그림은 read system call을 실행하기 위한 단계 read의 인자들을 스택에 푸시 (push nbytes-> push.. 2024. 10. 23. 이전 1 2 3 다음