13,813 questions
Advice
0
votes
3
replies
51
views
WinSux broke my PC, so i cannot install apps without admin
i tried out winsux but it broke my pc literally, i reinstalled windows with my files exclueded(not a clean install). now installiations fails cuz temp folder needs admin priv. i tried taking the owner ...
Advice
0
votes
0
replies
33
views
Does Adaptive Autosar prefer Microkernel OS?
In Adaptive Autosar does anyone use is monolithic architecture? if not why only mikrokernel architecture for OS?
2
votes
0
answers
67
views
GDB examine command shows different value than value loaded from the same address
I tried to make a function that finds all existing PCIe device's functions and saves the physical address of their config space to an allocated memory for my os, but I noticed that I got WAY too much ...
0
votes
0
answers
148
views
Make seeking inside sub circular buffer lock free in Producer Consumer
I've a class which is a QIODevice that wraps a background producer thread. It consumes data from a source QIODevice in a producer thread and provides it via the standard QIODevice API (read, seek, etc....
0
votes
2
answers
145
views
Parsing /proc/meminfo using read() in C gives incorrect RAM values
I am trying to extract MemTotal and MemFree from /proc/meminfo using open() and read() (not using fgets() or scanf()).
However, the values are sometimes incorrect or extremely large.
Total Memory in ...
Advice
0
votes
9
replies
105
views
Does an interrupt occur when a process goes from running -> terminated?
I'm reading the 9th Edition of Silberschatz' OS Concepts book and couldn't find a sufficient answer to my question. My first instinct is to say no but then again, the kernel has to be handed control ...
1
vote
0
answers
82
views
x64 Bootloader with C-Kernel
I'm currently working on an x64 Bootloader for a school project, but can't get it to run my Kernel.
Bootloader.asm
;###################################
; Real Mode
;##########################...
Advice
1
vote
1
replies
71
views
How does UEFI pass RAM information from bootloader (like GRUB) to different operating systems?
I have a question regarding the UEFI boot process and how it handles memory information:
UEFI reads the Serial Presence Detect (SPD) data from RAM chips and "knows" the available physical ...
Advice
0
votes
6
replies
104
views
What are the technical advantages of using Linux over Windows?
I'm considering switching from Windows to Linux for my software development environment and would like to understand the performance and security benefits of making this change.
Specifically, I'm ...
1
vote
4
answers
244
views
Is exit syscall invoked implicitly?
Is exit syscall actually invoked even if it is not called by a library function explicitly in the case a program terminates correctly by reaching the return statement in the main function?
0
votes
2
answers
107
views
What is the system call interface?
I am still unclear on this concept. As far as I know,system calls are invoked by library functions known as wrapper functions that typically have the same name. For example,open() in the standard C ...
Advice
1
vote
9
replies
115
views
Are system calls actually APIs?
I'm studying Operating systems concepts from books, I'm on system calls topic.
From what I have understand so far is that system calls are basically some special functions allowing user program to ...
Advice
0
votes
1
replies
55
views
Effective Access Time in TLB level 2
I'm currently studying for my exam in an OS course, and I'm wondering if I'm calculating correctly the Effective Access Time in TLB level 2.
So the case is: If we use two-level paging, assume TLB has ...
Advice
0
votes
6
replies
115
views
Where should a beginner start with System Design and Pattern Recognition?
I am a software developer and I’m starting to learn System Design and Pattern Recognition concepts.
I want to understand:
how to approach system design problems step by step.
what fundamentals I ...
Advice
0
votes
1
replies
81
views
Cross-platform clipboard sync in Rust – polling vs OS events
I’m new here and working on a personal Rust project: a local Wi-Fi clipboard sync tool for Windows (GNU based linker), Linux, and FreeBSD.
The idea is simple: detect clipboard changes on one machine ...
Advice
0
votes
1
replies
75
views
Can Ray pause/resume tasks at synchronization points when GPUs are limited?
I'm training multiple neural networks in parallel using Ray, where networks must synchronize at specific points during training (not just at completion) to share metadata and update hyperparameters ...
0
votes
0
answers
83
views
IOAPIC fails on real hardware
I am writing my own operating system. I've just switched from PIC to APIC and everything works just fine in QEMU, but on real hardware it's a real mess:
Sometimes I get an interrupt 2, which I don't ...
0
votes
0
answers
57
views
How can a segment register with 16bit point to a segment descriptor in 32 protected mode
My understanding is i386 has segment registers with 16bit like CS it can point to code_descriptor in the GDT that should be in the RAM, to be able to reach to it we need 32bit address : How can CS ...
2
votes
0
answers
92
views
Readers-writer spinlock implementation for lab locks MIT OCW OS
I am trying to learn some operating system engineering so I came about MIT's operating system engineering course which has been wonderful so far.
The problem I'm having is with the second problem read-...
2
votes
0
answers
40
views
Surprising Result for os.loadavg in Node,js
So I am running Node.js on Windows Subsystem for Linux (WSL), and I made an experiment regarding Node.js `os.loadavg()`. Keep in mind my device has 16 CPU cores.
Consider 2 Node.js processes:
loadTest....
0
votes
0
answers
50
views
Are maskable and nonmaskable interrupt signals raised on two different interrupt request lines?
Are maskable interrupts that are typically raised from controllers to request CPU attention and non maskable interrupts (reserved for critical hardware errors) raised on two different interrupt ...
2
votes
0
answers
142
views
Packet corruption in Lockless ring buffer (multiple producer, single consumer)
I Am implementing Lockless ring buffer for multiple producer and single consumer (keeping in plan to extend it to multiple produce and consumer)
using design reference of dpdk buffer : https://doc....
0
votes
0
answers
49
views
What constitutes a "Mixed I/O-bound" workload in the context of CPU scheduling simulations?
am currently working on an assignment to simulate and analyze the performance of various CPU scheduling algorithms (such as FCFS, SJF, and Round Robin).
I was given a list of workload scenarios to ...
2
votes
1
answer
131
views
Using udf (undefined instruction) to check if the behavior is defined?
During debugging of some native code, I jumped into the assembly of calloc() on my MacOS (ARMv8). And I see some interesting technique, that seems to be checking if the instructions are defined at ...
Advice
0
votes
2
replies
89
views
Need advice on an operating system mini-project
I have a mini-project in which the objective is to simulate the movement of multiple robots (threads) on a 2D matrix (shared resource), using semaphores to ensure mutual exclusion when accessing the ...
Advice
0
votes
0
replies
57
views
Context Switching statistics on MacOS
On Linux, I can use tools like vmstat 1 2 or read from /proc/stat to measure the total and average number of context switches over a given time interval (for example, 1 second).
Is there an equivalent ...
Advice
1
vote
0
replies
58
views
What is the point of block group descriptors
I am implementing an EXT2 filesystem driver and trying to understand the purpose of block group descriptors.
From the superblock, I already know:
s_blocks_per_group - number of blocks in each block ...
1
vote
1
answer
109
views
Why does an ELF file include a `PHDR` entry if the program header table location is already known?
I'm building a small practice OS, I'm writing linker scripts and using ld to produce ELF files that my OS loader will load manually.
Here’s my current understanding of the loading process for ELF ...
3
votes
1
answer
218
views
Memory Layout of C Programs: How is size of stack-heap space determinded?
I was reading an article on the Memory Layout of C Programs; https://www.geeksforgeeks.org/c/memory-layout-of-c-program/.
It mentioned, under "4. Stack Segment":
When the stack and heap ...
3
votes
0
answers
173
views
Thread quantum expires in 0.012 milliseconds?
This CPU Usage (Precise) view below seems to indicate that this thread's quantum is expiring after only 0.012 milliseconds on row 19. Rows 6 and 29 look normal with a 15 millisecond thread quantum ...
1
vote
1
answer
122
views
Trouble setting up Interrupts in custom Assembly based Kernel
I am working on an assembly kernel, using the OSDev Wiki and a PDF from Nick Blundell. I have set up my GDT and it seems to work fine. I am also able to load the IDTR as well. However, when I try to ...
1
vote
0
answers
115
views
MacOS does not grant requested thread QOS
I would like to run a single-threaded program in MacOS 26.0 at the highest QOS level (QOS_CLASS_USER_INTERACTIVE), in order to get more consistent performance on a compute-bounded benchmark. By ...
1
vote
1
answer
229
views
MIT OS course 6.828, boot/main.c - outw to port 0x8A00 with magic numbers? [closed]
void bootmain(void)
{
struct Proghdr *ph, *eph;
// read 1st page off disk
readseg((uint32_t) ELFHDR, SECTSIZE*8, 0);
// is this a valid ELF?
if (ELFHDR->e_magic != ELF_MAGIC)
...
1
vote
1
answer
104
views
is non-blocking directory listing possible in linux?
If a directory contains broken or unresponsive mount points (for example, FUSE or NFS mounts), standard tools like file managers, or even a simple ls from the command line, can hang forever when ...
1
vote
0
answers
100
views
exception handling on different architectures
I have two questions about exception handling.
I read exception handling code of some real-time operating system (I mean assembly code). I note that on some architectures we allocate on stack more ...
-4
votes
1
answer
113
views
idt_64 definiton crashes the os [closed]
im following a udemy course on making an operating system from scratch, but i have run into a very bizarre error:
Makefile:
DISK = os.img
KERNEL = kernel.bin
BOOTSECTOR = bootsector
NASM = nasm
QEMU =...
-1
votes
1
answer
168
views
System call transition to system call table
When a system call is invoked by a user program, a software interrupt (trap) is raised, control first passes to the fixed location of the interrupt vector (IR) which contains the ISR associated with ...
0
votes
0
answers
67
views
Dynamic Core Management via Arm's PSCI on OdroidC4
I have been creating a basic core management tool which is able to dynamically turn CPU cores on and off using Arm's PSCI CPU_ON and CPU_OFF functions. This worked great on QEMU, however moving onto ...
0
votes
0
answers
220
views
Nightly Rust #[unsafe(naked)] function leads to undefined symbol linker error in --release mode on RISC-V
I am writing a hobby OS kernel in Rust for the riscv64gc-unknown-none-elf target. I have defined my trap_entry, as a #[unsafe(naked)] function within a Rust module.
When I compile in release mode (...
1
vote
1
answer
136
views
I'm writing an Assembly x86 bootloader, but the printing function doesn't print the given string correctly
I'm writing a bootloader in x86 Assembly for my operating system. Note that I have already wrote a few bootloaders and I never faced this problem. This is the code that I compile with NASM (precisely ...
0
votes
2
answers
372
views
Sleeping Barber problem: how to prevent the barber from cutting before the customer is ready?
Recently, I've been studying the classic Sleeping Barber problem and came across a possible solution from Wikipedia:
# The first two are mutexes (only 0 or 1 possible)
Semaphore barberReady = 0
...
2
votes
1
answer
170
views
BIOS int 0x13 sector read works, but jump to loaded second stage code at 0x0800:0x0000 does not transfer control
I’m writing a simple bootloader that uses BIOS interrupt int 0x13 to read a second-stage loader from disk and then jump to it.
; boot\boot.asm
[bits 16]
[org 0x7C00]
jmp strict short start
...
0
votes
0
answers
129
views
AArch64 RPi4b bare-metal OS hangs after MMU enable
I am currently writing a small bare-metal OS for Raspberry Pi 4b for the AArch64/Arm64 architecture.
Unfortunately the OS hangs after enabling the MMU on real hardware. When testing the OS in QEMU ...
2
votes
1
answer
139
views
Why does UEFI GetMemoryMap return EFI_BUFFER_TOO_SMALL after allocating a buffer of the reported size?
I'm writing a UEFI application in Zig.
I'm calling GetMemoryMap() twice: once to get the required buffer size, then again after allocating the buffer using AllocatePool().
Here's my code:
fn ...
4
votes
2
answers
5k
views
PostgreSQL Error: "template database has a collation version mismatch" after OS upgrade After upgrading my operating system
template database "epa_db" has a collation version mismatch
The template database was created using collation version 1540.3,1540.3, but the operating system provides version 1541.2,1541.2
1
vote
2
answers
119
views
How to write a panic message if the UART is already locked by the panicking code?
I'm working on a hobby RISC-V OS kernel (QEMU virt) in no_std Rust and want my panic_handler to print the panic information to UART (is it the right way?).
My println! macro eventually calls a _print ...
1
vote
1
answer
1k
views
ERROR in emulator start after aosp build Andorid Emulator I tried running
After successfully compiling the AOSP build from the repo tried starting the emulator with the command provided in the documentation
$launch_cvd --daemon
but encountered the following error log:
06-...
0
votes
0
answers
115
views
How is a multithreaded code (ex using OpenMP) converted to assembly?
For example, When I multithread a "for loop" using OpenMP, making the iterations as different threads, How does it get translated to Assembly?
Also can a multithreaded code run on hardware ...
0
votes
0
answers
41
views
Issue when Porting Newlib (sys/crt0.o: No such file)
I'm trying to port Newlib following this tutorial after following this tutorial, and I'm running into an issue near the end. I'm at this step:
mkdir build-newlib
cd build-newlib
../newlib-x.y.z/...
-1
votes
1
answer
83
views
Rust Kernel: Undefined refrence to 'core::panicking::panic_null_pointer_derefrence'
Im writing a kernel in Rust, but are having some problems with the panicking module.
I have written a build script that should build the boot image of the OS, but i seem to get an error while trying ...