Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
Advice
1 vote
2 replies
142 views

What is the difference between an interrupt and a context switch? I understand the concept of an interrupt and how it occurs. However, I'm digging deeper into the topic. I studied Computer ...
2 votes
1 answer
137 views

I am writing an interrupt routine for RISC-V. Interrupts occur in U-mode and are handled in S-mode. Upon an interrupt, I want to save the user execution context on the kernel stack of the thread that ...
0 votes
0 answers
47 views

I'm experimenting with STM32 baremetal context switching and came across this article. In it, the thread 0 is using MSP and others use PSP. I don't understand, how could thread context be saved on MSP ...
Sergey's user avatar
  • 1,368
0 votes
0 answers
51 views

If a core supports simultaneous multithreading (SMT) and executes multiple logical threads, how does the Reorder Buffer (ROB) differentiate which instruction belongs to which logical thread? ...
0 votes
0 answers
44 views

I'm studying operating systems and have encountered conflicting information about preemptive scheduling, specifically regarding SRT (Shortest Remaining Time) scheduling. My question focuses on whether ...
0 votes
1 answer
98 views

I wish to create something similar to a context switching mechanism, that allows using a shared resource one at a time. In my case it's a single session object connecting to a website, and each ...
0 votes
1 answer
66 views

I'm working on multitasking for my OS, more specifically fork() for usermode ELF-binaries (they call it by a syscall). After calling fork, it manages to return to the parent process (sometimes) but on ...
1 vote
1 answer
125 views

I am implementing context switching for my first os and I came into a little problem I cannot solve which is restoring the cpu status after saving it from a struct. As all the registers have to be ...
0 votes
0 answers
88 views

i am trying to add context switching to my first os what is the best method to do so? i have been trying different methods for a while now, this is my last attempt: use core::arch::asm; use crate::...
0 votes
0 answers
68 views

In the communication (with UDP protocol) between a Ubuntu 20.04 PC, patched with PREEMPT-RT, and an external machine, the nominal behavior foresees an alternating packet exchange between the two ...
1 vote
0 answers
89 views

During the context switch the operating system (OS) needs information from the CPU to create a Process Control Block (PCB), but accessing the CPU could alter the very information it's trying to ...
1 vote
1 answer
115 views

I'm studying an OS implemented in a stm32f103rb. I arrived at 02-ContextSwitch-1 chapter and found that the program crashes and throws this error. qemu: fatal: Trying to execute code outside RAM or ...
0 votes
0 answers
44 views

Logic tells me that in Linux, the OS does not allow context switchwes between threads of the same process during the operation of a signal handler, but I wasn't able to find anything concrete about it ...
1 vote
0 answers
291 views

I've searched for it several times and I don't think it's a duplicate. AFAIU, context switches typically (e.g. on Linux) happen in kernel mode, and there are a few answers on SO stating that mode ...
0 votes
0 answers
500 views

I suspect that my application suffers from too much context switches. There is huge amount of threads (do not ask why) and I wonder whether overhead related to switching context becomes problematic. ...

15 30 50 per page
1
2 3 4 5
...
22

AltStyle によって変換されたページ (->オリジナル) /