ComputerScience(106)
-
[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 -
[Cross Compile] TensorFlow Lite RISC-V Cross Compile
0402 WednesdayTensorFlow Lite RISC-V Cross Compile set(CMAKE_SYSTEM_NAME Linux)set(CMAKE_SYSTEM_PROCESSOR riscv32)# riscv32-glibc-ubuntu-22.04-llvm-nightly-2025.01.20-nightly.tar.xz # 툴체인 경로 설정 # /home/sohyun/toolchains/riscv/sysrootset(triple riscv32-unknown-linux-gnu)set(toolchain /home/sohyun/toolchains/riscv)set(CMAKE_SYSROOT ${toolchain}/sysroot)set(CMAKE_C_COMPILER ${toolchain}/bin/${tri..
2025.04.02 -
[Paper Review] A Portable and Fault-Tolerant Microprocessor Based on the SPARC V8Architecture
A Portable and Fault-Tolerant Microprocessor Based on the SPARC V8 Architecturehttps://ieeexplore.ieee.org/document/1028926 A portable and fault-tolerant microprocessor based on the SPARC v8 architectureThe architecture and implementation of the LEON-FT processor is presented. LEON-FT is a fault-tolerant 32 bit processor based on the SPARC V8 instruction set. The processors tolerates transient S..
2025.03.17 -
[OS Project] Chap10-1. Process - PCB and Context switch
ProcessA process is an instance of an application. Each process has its own independent execution context and resources, such as a virtual address space. Practical operating systems provide the execution context as a separate concept called a "thread". For simplicity, in this book we'll treat each process as having a single thread. Process control block The following process structure defines ..
2025.01.19 -
[OS Project] Chap9. Memory Allocation
Memory AllocationBefore implementing a memory allocator, let's define the memory regions to be managed by the allocator . = ALIGN(4); . += 128 * 1024; /* 128KB */ __stack_top = .; . = ALIGN(4096); __free_ram = .; . += 64 * 1024 * 1024; /* 64MB */ __free_ram_end = .;} This adds two new symbols, __free_ram and __free_ram_end. This defines a memory area after the stack space. ..
2025.01.18 -
[OS Project] Chap8. Exception
ExceptionException is a CPU feature that allows the kernel to handle various events, such as invalid memory access (aka. page faults), illegal instructions, and system calls. Exception is like a hardware-assisted try-catch mechanism in C++ or Java. Until CPU encounters the situation where kernel intervention is required, it continues to execute the program. The key difference from try-catch is ..
2025.01.17 -
[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