61 questions
1
vote
1
answer
194
views
Interpretation of prev task within context_switch() in Linux kernel scheduler code
I'm trying to understand the implementation of context switching in the Linux kernel (specifically in x86) and to that end I have a couple of questions.
Why is the switch_to() macro defined and ...
0
votes
0
answers
40
views
Which is more costly in terms of performance: a few threads with many context switches or many threads with few context switches?
Which is more costly in terms of performance: a few threads with many context switches or many threads with few context switches?
Assuming that the CPU can process one thread at a time:
In Case 1 with ...
0
votes
2
answers
439
views
Can anyone explain this assembly code for the "stack" point of view?
Can anyone explain the arm based assembly code for the stack point of view ; specifically the stack view for "reset_handler" right before calling "main", "save_context" ...
0
votes
2
answers
488
views
Do we need to handle weak reference and context switching?
To mitigate memory leaks we keep a weak reference of an activity in an inner class running on different thread. We check weakreference.get() is non null and then only proceed further. What if when we ...
0
votes
0
answers
93
views
How does the Windows dispatcher load the next process to run on CPU?
There is not a lot of details available online for this question but was hoping that someone out there might have a clue. I know that its the job of the scheduler to determine (select) the next ...
-1
votes
1
answer
2k
views
How does the scheduler interrupt the CPU?
So what I would like to know is when the thread scheduler performs a context switch how is the CPU interrupted so the task of switching over to a different process gets accomplished? Does the CPU get ...
0
votes
0
answers
147
views
ASP.NET MVC thread context switching overhead
I would like to know if an asynchronous implementation like the one I will show below generates a context switch problem.
public async Task<JsonResult> Get()
{
var data = await ...
1
vote
2
answers
3k
views
How to calculate context swicthing for anonymous plsql block
How many context switches will happen for the below given plsql block
Declare
ll_row_count number := 0;
begin
for i in (select * from employee)
loop
ll_row_count := ...
2
votes
0
answers
165
views
How many asynchronous cores should I use?
In an ideal async program, every event loop is always occupied with zero downtime between receiving data and polling->action-execution.
My program listens on an array of ports, and the polling and ...
0
votes
1
answer
944
views
Does OS save memory values in context switch?
I have a question about which datas will be saved in context switching.
I have searched but all links just talked about registers.
My question is does os also save the memory values of a process ?
...
0
votes
1
answer
225
views
Performance in Oracle insert to table from select with function calls
I am writing a query to calculate some values and save them onto a table on a periodic basis. The values I needs are being returned from a function call.
These values need to be saved on to a table, ...
0
votes
1
answer
192
views
Context Switching to Specific Process after Specific ISR
Is there any (dirty)method to provoke context switching to specific process after specific ISR?
In normal situation, after an ISR, the process which was interrupted will keep running, and I have to ...
2
votes
1
answer
134
views
Launching parallel network tasks using xargs whilst minimising context switching overhead
I want to run 100 networking (non cpu intense) jobs in parallel and want to understand the best approach.
Specifically is it possible to run 100+ jobs using xargs and what are the drawbacks?
I ...
4
votes
2
answers
2k
views
Measure context switching in java
I have a java system doing lot of i/o operations.
I do understand that non CPU bound tasks can benefit from # of threads more than #CPUs.
As I/O operations time is non deterministic(I don't know ...
0
votes
1
answer
742
views
How does interrupt polling perform context switching?
Consider a very old single-core CPU that does not support hardware interrupts, and let's say I want to write a multi-tasked operating system. Using a hardware timer, one can poll an IRQ line in order ...
0
votes
1
answer
442
views
What should be Memory Protection Strategy for ARM Cortex CPU?
I need to implement a multitasking system with MPU for ARM Cortex M3/M4 processors.
In that system, there will be a Kernel which manages resource in Privileged mode and user applications in ...
1
vote
0
answers
427
views
JVM Threads and Context Switching from the memory standpoint
I'm not sure if this is a vague question, if it is then I would be more than happy to be pointed a direction to get some clarity.
I've got a bunch of Java Tests (30 to be precise) that gets run using ...
5
votes
2
answers
6k
views
Where can I find specifics about Windows 10's process scheduling?
I'm currently learning about CPU scheduling and I'm curious about the specifics on Windows 10's scheduling. From what I know a round-robin scheduling is used along with differing levels of priority, ...
1
vote
2
answers
444
views
Context Switching delay in centos7
In my C application, the main process forks a child process and then sleeps for ten microseconds to give the child time to get ready. After the sleep period, the parent process sends a signal to the ...
0
votes
2
answers
1k
views
Saving ARM NEON registers while context switching in Android
At the time of context switching Android saves all ARM general registers on stack and restore it after.
Does Android OS stores NEON registers on stack?
If not, how to make a safe usage of NEON in ...
1
vote
2
answers
847
views
Context Switch OS : How much and How frequent Context Switching is recommended for OS?
I was asked to answer a question about the OS context switch and I cannot find the answer in my textbook.
How much and How frequent Context Switching is recommended for OS?
0
votes
2
answers
508
views
How to make text clickable in TextSwitcher so that it can open another activity?
I have a Text Switcher in my app. Everything is working. My text is switching, but I want to open another activity when the text in the Text Switcher is clicked. How can I achieve this in android ??
...
2
votes
2
answers
909
views
Grails - switching data sources based on User
We are developing a Grails web application, where different users (customers) need to be pointed at different databases containing only their organization's data. Unfortunately, the separated ...
1
vote
1
answer
680
views
Minimize Context Switching Time between process
I have 4 process sharing a common semaphore, all the process have the same priority.
The critical region inside the lock, has the read/write operation including the
fflush() call.
In the logs, I ...
3
votes
1
answer
1k
views
Counting the number of context switches in a c program when that program is executed
I want to output the number of context switches that are performed by the windows OS while executing my program.