ComputerScience(120)
-
[OS Project] Chap7. Kernel Panic
Kernel PanicA kernel panic occurs when the kernel encounters an unrecoverable error, similar to the concept of panic in Go or Rust. Have you ever seen a blue screen on Windows? Let's implement the same concept in our kernel to handle fatal errors. The following PANIC macro is the implementation of kernel panic#define PANIC(fmt, ...) \ do ..
2025.01.17 -
[OS Project] Chap6. C Standard Library
C Standard LibraryIn this chapter, let's implement basic types and memory operations, as well as string manipulation functions. In this book, for the purpose of learning, we'll create these from scratch instead of using C standard library. The concepts introduced in this chapter are very common in C programming, so ChatGPT would provide solid answers. If you struggle with implementation or under..
2025.01.17 -
[OS Project] Chap5. Hello World!
Say "hello" to SBI- SBI is an "API for OS". - To call the SBI to use its function, we use the ecall instruction#include "kernel.h"extern char __bss[], __bss_end[], __stack_top[];struct sbiret sbi_call(long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long fid, long eid) { register long a0 __asm__("a0") = arg0; register long a1 __asm__("a1") = arg1; ..
2025.01.16 -
[OS Project] Chap4. Booting the Kernel
2024. 01. 13. Monday ์ฐ์ ํ๋ก์ ํธ๋ฅผ ์๊ฒฉ์ผ๋ก ์ฐ๊ฒฐํด๋์๋ค. :) GitHub Desktop ์ฑ๋ ์ค๋๋ง์ ๋ค์ด๊ฐ๋ณธ๋ค , , https://github.com/SohyeonKim-dev/OperatingSystem GitHub - SohyeonKim-dev/OperatingSystem: OS ๋ง๋ค๊ธฐ ํ๋ก์ ํธOS ๋ง๋ค๊ธฐ ํ๋ก์ ํธ . Contribute to SohyeonKim-dev/OperatingSystem development by creating an account on GitHub.github.com ๐ฉ๐ป brew๋ก qemu ์ค์น brew install llvm lld qemu Let's boot OpenSBI OpenSBI: Open Sourc..
2025.01.13 -
[OS Project] ์ด์์ฒด์ ๊ตฌํํ๊ธฐ ํ๋ก์ ํธ
2025. 01. 10 Friday ์ด์ Geek News์์ ์ฌ๋ฏธ์์ด ๋ณด์ด๋ ํ๋ก์ ํธ๋ฅผ ์ฐพ๊ฒ ๋์๋ค.! ๐ฉ๐ป์ ๋๋ก ๋ ์ฝ๋ฉ์ ํ ๊ฒ . . ์ง๋ ๊ฒจ์ธ ๋ฐฉํ๋ ํ์ฐฝ ์ฑ ๊ฐ๋ฐํ๋ ๊ทธ ์์ ์ด ๋ง์ง๋ง์ธ ๊ฒ ๊ฐ๊ฑฐ๋ฑ์ ^^.. ...๐ฅ๋ฌด์ธ๊ฐ ๋ง๋ค๊ณ ์ถ์๊ฒ ์์ด์,ํ๋ฐ๋ฐ ๋ฐค์ ๊ฐ๋ฐํ๋ ๋๊ฐ ๊ทธ๋ฆฝ๊ธฐ๋ ํ๊ณ ,, ์์ฆ์ ํ๊ณ ์ถ์ ์ผ๋ณด๋ค ํด์ผํ๋ ์ผ์ ๋ ๋ง์ด ํ๊ฒ ๋๋ ๊ฒ ๊ฐ๋ค์ .. .·โ(โ_โ)โ·. https://operating-system-in-1000-lines.vercel.app/en/ Intro | OS in 1,000 Lines operating-system-in-1000-lines.vercel.app์ธ์์๋ ๋๋จํ ๊ฐ๋ฐ์๊ฐ ๋๋ฌด๋๋ฌด๋ง์ผ์ - ..
2025.01.10 -
[Pin] Encoding Memory Visualization
2024. 10. 22 TuesdayVisualizatinon - Text memory + CPU Cycle # Summary ์ ์ ์ผ๋ก ์ปดํ์ผ ๋ ์ฝ๋ -> objdump๋ก ํ์ธ ๋์ ์ผ๋ก ์ฐ๊ฒฐ -> ์ฝ๋ ์์์ ํ๋ฆฐํธ ์ฐ์ด์ ํ์ธ ๋์ ์ด๋ ์ ์ ์ด๋ ๊ตฌ๋ถํด์ ๋ถ์ํ๋ ๊ฒ ์ค์DLL์ด๋์ ๋ค๋ฅธ ๋ด์ฉ Rust ์ฝ๋์์ print ๊ตฌ๋ฌธ์ผ๋ก text ์ฃผ์ ํ์ธํ๊ธฐ 16์ง์ ๋ฉ๋ชจ๋ฆฌ -> 100 ๋จ์๋ ๋งค์ฐ ํฐ scale csv ํ์ผ -> Python์ผ๋ก ์๊ฐํ at Web - Plotly https://plotly.com/python/ PlotlyPlotly'splotly.com https://github.com/plotly/plotly.py GitHub - plotly/plotly.py: The in..
2024.10.22 -
[Pin] CoreBPE Memory Tracing by pinatrace
https://stackoverflow.com/questions/32026456/how-can-i-specify-an-area-of-code-to-instrument-it-by-pintool How can i specify an area of code to instrument it by pintool?There are four levels of granularity in Pin: routine, instruction and image, trace. Can i specify an limits/area to start and stop inserting instrumentation code. may by like directive like ( # startstackoverflow.com # ์์ฃผ ์ผ๋..
2024.10.15 -
[FreeBSD] Context Switching
4.3 Context SwitchingThe kernel switches among threads in an effort to share the CPU effectively; this activity is called context switching. When a thread executes for the duration of its time slice or when it blocks because it requires a resource that is currently unavailable, the kernel finds another thread to run and context switches to it. The system can also interrupt the currently executin..
2024.08.08 -
[FreeBSD] The Process and Thread Structure
The Process StructureIn addition to the references to the substructures, the process entry shown in Figure 4.1 contains the following categories of information: • Process identification: the PID and the parent PID • Signal state: signals pending delivery and summary of signal actions• Tracing: process tracing information• Timers: real-time timer and CPU-utilization counters The process substruc..
2024.07.21 -
[FreeBSD] PID and Process State
4.2 Process StateEvery process in the system is assigned a unique identifier termed the process identifier (PID). PIDs are the common mechanism used by applications and by the kernel to reference processes. PIDs are used by applications when the latter send a signal to a process and when receiving the exit status from a deceased process. Two PIDs are of special importance to each process: the PI..
2024.07.21