trap(5)
-
[RISC-V] System Call
PA2: System Call System calls are interfaces that allow user applications to request various services from the operating system kernel. This project aims to explore and understand how system calls are implemented in the xv6 operating system.git-hub: https://github.com/snu-csl/os-pa2/ ๐ start.cxv6 kernel boot up code ๋ฆฌ๋ ์ค ์ปค๋์ ์ด๊ธฐํ ๊ณผ์ ์ ๋ด๋น ์ปค๋์ด ๋ถํ ๋ ๋ ๊ฐ์ฅ ๋จผ์ ์คํ๋์ด, ์ด๊ธฐ ํ๊ฒฝ์ ์ค์ #include "types.h"#include..
2025.05.03 -
[FreeBSD] Traps and Interrupts
3.3 Traps and InterruptsTraps, like system calls, occur synchronously for a process. Traps normally occur because of unintentional errors, such as division by zero or indirection through an invalid pointer. The process becomes aware of the problem either by catching a signal or by being terminated. Traps can also occur because of a page fault, in which case the system makes the page available an..
2024.07.10 -
[FreeBSD] Run-time structure of the kernel
Run-Time OrganizationThe kernel can be logically divided into a top half and a bottom halfThe top half of the kernel provides services to processes in response to system calls or traps. This software can be thought of as a library of routines shared by all processes. The top half of the kernel executes in a privileged execution mode, in which it has access both to kernel data structures and to t..
2024.07.10 -
[FreeBSD] Kernel Organization
3.1 Kernel OrganizationThe FreeBSD kernel can be viewed as a service provider to user processes. Processes usually access these services through system calls. Some services, such as process scheduling and memory management, are implemented as processes that execute in kernel mode or as routines that execute periodically within the kernel.In this chapter, we describe how kernel services are provi..
2024.07.09 -
[์ด์์ฒด์ ] CPU Interrupt
Interrupt handler - ์ธํฐ๋ฝํธ๋ฅผ ํด๊ฒฐํ๋ func - ISR (interrupt service routine) - ์ธํฐ๋ฝํธ ๋ฐ์! -> ์ด์์ฒด์ ๊ฐ ์ํ๋จ โญ๏ธ ์ธํฐ๋ฝํธ์ 3๊ฐ์ง ์ข ๋ฅ 1) Interrupt - Hardware interrupt - asynchronous - ๋น๋๊ธฐ๋ก ์ฒ๋ฆฌ๋๋ค. - CPU๋ ์ด ์์ (์ธํฐ๋ฝํธ)๋ฅผ ๊ธฐ๋ค๋ฆฌ์ง ์๋๋ค -> ๋ค๋ฅธ ์์ ์ํ -> ๋ค์ ๋์์ด == acync - ex) ํค๋ณด๋ ์ธํฐ๋ฝํธ, timer interrupt 2) Trap - Software interrupt - Application process - Sync ๋๊ธฐ์ ์ผ๋ก ์ฒ๋ฆฌ๋๋ค. - ex) System Call -> App์ด ๋์คํฌ์์ ๋ฐ์ดํฐ ์ฝ์ด๋ฌ๋ผ๊ณ OS์๊ฒ ๋์ ์์ฒญ (์บก์ํ, ์ธํฐํ์ด์ค ..
2023.03.25