All Questions
Tagged with os or operating-system
13,826 questions
2 votes
0 answers
77 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
1 answer
24 views
Implementing blocking memory management in RTOS [closed]
I am reading about blocking memory allocation idea in book Real time concepts in embedded systems by QingLi. A blocking memory allocation function can be implemented using both a counting semaphore ...
-1 votes
0 answers
88 views
Which compiler optimizations can break code without volatile when calling through function pointers? [closed]
Here is the code: void (*volatile sys_func)(void); void main(int argc, char **argv) { int i, j; for (j = 0; j < 3; ++j) { for (i = 0; i < 10000; ++i); sys_func(); } ...
0 votes
0 answers
38 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
87 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
77 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
34 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
36 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
58 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
179 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
161 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
107 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
82 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 votes
1 answer
214 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
91 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 ...