registers question
-
harold aptroot wrote:
So why is this even a question?
Not everyone understands how a multi-tasking operating system works. Certainly plenty of "developers" in Q&A would seem not to.
Richard MacCutchan wrote:
Not everyone understands how a multi-tasking operating system anything related to a computer works. Certainly plenty of "developers" in Q&A would seem not to
FTFY!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
-
harold aptroot wrote:
So why is this even a question?
Not everyone understands how a multi-tasking operating system works. Certainly plenty of "developers" in Q&A would seem not to.
Even though they may not know how it works, it should be immediately obvious that the way OP implied it might work is definitely impossible, especially since OP gave an argument for why that is so. If you prove something can't work, then obviously it doesn't work that way.
-
Even though they may not know how it works, it should be immediately obvious that the way OP implied it might work is definitely impossible, especially since OP gave an argument for why that is so. If you prove something can't work, then obviously it doesn't work that way.
-
Richard MacCutchan wrote:
Not everyone understands how a multi-tasking operating system anything related to a computer works. Certainly plenty of "developers" in Q&A would seem not to
FTFY!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
-
harold aptroot wrote:
it should be immediately obvious
Yes, but only if you have an undestanding of how an OS works, which is not always obvious to students, and others who are learning.
-
Suppose we run two programs on a single-core processor First sets the EIP pointer to 2 (example)and the second one sets it to 1 How does the first program know it will continue from adress 2 and not 1 ? Thank you very much (random fact: Pink Floyd's wish you were here was written not for someone who died ,but for an ex member who went insane)
Just to add to the context switching answer... The thing to remember is the CPU can only do one thing at once... just really really fast. Running two apps at once or two threads in an app at once is simply a software construct in things like the Windows subsystem. Hardware doesn't care.
Jeremy Falcon
-
:sigh: And I wish it wasn't true...
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
-
No. I'm not saying it should be obvious how a multi tasking OS works. I'm saying that it should be obvious that if you disprove a theory, that means it's wrong.
Only if you think scientifically. "Intelligent Design" has it's adherents, despite being a load of old cobblers...
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
-
Just to add to the context switching answer... The thing to remember is the CPU can only do one thing at once... just really really fast. Running two apps at once or two threads in an app at once is simply a software construct in things like the Windows subsystem. Hardware doesn't care.
Jeremy Falcon
Jeremy Falcon wrote:
The thing to remember is the CPU can only do one thing at once...
Erm...not quite. Each core is an "independent" processor which is part of the CPU - and two or more cores can be doing different things at the same time.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
-
Just to add to the context switching answer... The thing to remember is the CPU can only do one thing at once... just really really fast. Running two apps at once or two threads in an app at once is simply a software construct in things like the Windows subsystem. Hardware doesn't care.
Jeremy Falcon
What are you doing here? Shouldn't you be off doing something like, well... emoting?
-
Jeremy Falcon wrote:
The thing to remember is the CPU can only do one thing at once...
Erm...not quite. Each core is an "independent" processor which is part of the CPU - and two or more cores can be doing different things at the same time.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
OriginalGriff wrote:
Erm...not quite. Each core is an "independent" processor which is part of the CPU - and two or more cores can be doing different things at the same time.
OP asked in the context of a machine with one [single core?] CPU. ... not that we should be discussing this kind of thing in the Lounge.
I'm retired. There's a nap for that... - Harvey
-
Jeremy Falcon wrote:
The thing to remember is the CPU can only do one thing at once...
Erm...not quite. Each core is an "independent" processor which is part of the CPU - and two or more cores can be doing different things at the same time.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
He was talking about a single core CPU.
Jeremy Falcon
-
You are in the wrong place! We sold all our EIP's for food...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
Bacon to be more precise :-D
With friendly greetings,:) Eric Goedhart
-
What are you doing here? Shouldn't you be off doing something like, well... emoting?
Still a programmer by day, not forever, but for now.
Jeremy Falcon
-
OriginalGriff wrote:
Erm...not quite. Each core is an "independent" processor which is part of the CPU - and two or more cores can be doing different things at the same time.
OP asked in the context of a machine with one [single core?] CPU. ... not that we should be discussing this kind of thing in the Lounge.
I'm retired. There's a nap for that... - Harvey
H.Brydon wrote:
... not that we should be discussing this kind of thing in the Lounge.
Seeing that I have't been on CP in like, a decade, what happened to stuff like voting on posts?
Jeremy Falcon
-
harold aptroot wrote:
So why is this even a question?
Not everyone understands how a multi-tasking operating system works. Certainly plenty of "developers" in Q&A would seem not to.
Richard MacCutchan wrote:
"developers" in Q&A
A rare beast...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
-
H.Brydon wrote:
... not that we should be discussing this kind of thing in the Lounge.
Seeing that I have't been on CP in like, a decade, what happened to stuff like voting on posts?
Jeremy Falcon
The voting toy was taken away from the children until they learn how to behave like grownups :D
-
Jeremy Falcon wrote:
The thing to remember is the CPU can only do one thing at once...
Erm...not quite. Each core is an "independent" processor which is part of the CPU - and two or more cores can be doing different things at the same time.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
I think the term CPU is somewhat antiquated, from the days when you did have a central processing unit. Now we have lots of them and they are known as cores. In my mind CPU = Core, although I can see how it might not mean that to other people.
Regards, Rob Philpott.
-
The voting toy was taken away from the children until they learn how to behave like grownups :D
So...it won't be coming back then? :laugh:
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
-
The voting toy was taken away from the children until they learn how to behave like grownups :D
There are no grown ups, just us wabbits! ;P