Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. registers question

registers question

Scheduled Pinned Locked Moved The Lounge
questionasp-nettutoriallounge
41 Posts 15 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    EbolaHost
    wrote on last edited by
    #1

    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)

    Kornfeld Eliyahu PeterK L C P Mike HankeyM 8 Replies Last reply
    0
    • E EbolaHost

      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)

      Kornfeld Eliyahu PeterK Offline
      Kornfeld Eliyahu PeterK Offline
      Kornfeld Eliyahu Peter
      wrote on last edited by
      #2

      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)

      "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

      E E 2 Replies Last reply
      0
      • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

        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)

        E Offline
        E Offline
        EbolaHost
        wrote on last edited by
        #3

        So after the sale did the EIP's point to the first thing that you, or the byuer will do next?

        Kornfeld Eliyahu PeterK 1 Reply Last reply
        0
        • E EbolaHost

          So after the sale did the EIP's point to the first thing that you, or the byuer will do next?

          Kornfeld Eliyahu PeterK Offline
          Kornfeld Eliyahu PeterK Offline
          Kornfeld Eliyahu Peter
          wrote on last edited by
          #4

          Me of course! Buyer do not know about computers - he thinks EIP is some innovation think...

          I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)

          "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

          1 Reply Last reply
          0
          • E EbolaHost

            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)

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            Each program runs in its own address and activity space, totally isolated from the other. As one is pre-empted, its environment, including registers, is saved and then restored when it gets its next timeslice.

            L 1 Reply Last reply
            0
            • E EbolaHost

              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)

              C Offline
              C Offline
              CPallini
              wrote on last edited by
              #6

              Context switch at Wikipedia[^].

              Veni, vidi, vici.

              1 Reply Last reply
              0
              • E EbolaHost

                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)

                P Offline
                P Offline
                Pete OHanlon
                wrote on last edited by
                #7

                Random random fact: While recording Wish You Were Here, the same former member wandered into the recording and none of the band recognised him.

                E 1 Reply Last reply
                0
                • E EbolaHost

                  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)

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  Obviously it can't work that way, precisely because of the reason you give. So why is this even a question?

                  L 1 Reply Last reply
                  0
                  • E EbolaHost

                    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)

                    Mike HankeyM Offline
                    Mike HankeyM Offline
                    Mike Hankey
                    wrote on last edited by
                    #9

                    EbolaHost wrote:

                    (random fact: Pink Floyd's wish you were here was written not for someone who died ,but for an ex member who went insane)

                    Syd Barrett[^] was the driving force and one of the original members of Pink Floyd. He released 2 solo albums; The Mapcap Laughs and Barrett but they didn't go very well. I have The Mapcap Laughs and it is a very strange album.

                    Along with Antimatter and Dark Matter they've discovered the existence of Doesn't Matter which appears to have no effect on the universe whatsoever! Rich Tennant 5th Wave

                    C E 2 Replies Last reply
                    0
                    • L Lost User

                      Each program runs in its own address and activity space, totally isolated from the other. As one is pre-empted, its environment, including registers, is saved and then restored when it gets its next timeslice.

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #10

                      So far 45 minutes have elapsed and nobody has suggested your answer is incomplete or theirs is better. I vote we move Q&A to the Lounge and post drivel in Q&A. All in favor raise your hands...

                      J L 2 Replies Last reply
                      0
                      • L Lost User

                        So far 45 minutes have elapsed and nobody has suggested your answer is incomplete or theirs is better. I vote we move Q&A to the Lounge and post drivel in Q&A. All in favor raise your hands...

                        J Offline
                        J Offline
                        Johnny J
                        wrote on last edited by
                        #11

                        S u n s h i n e wrote:

                        post drivel in Q&A

                        Where's the change in that? :confused:

                        Anything that is unrelated to elephants is irrelephant
                        Anonymous
                        -----
                        The problem with quotes on the internet is that you can never tell if they're genuine
                        Winston Churchill, 1944
                        -----
                        I'd just like a chance to prove that money can't make me happy.
                        Me, all the time

                        1 Reply Last reply
                        0
                        • Mike HankeyM Mike Hankey

                          EbolaHost wrote:

                          (random fact: Pink Floyd's wish you were here was written not for someone who died ,but for an ex member who went insane)

                          Syd Barrett[^] was the driving force and one of the original members of Pink Floyd. He released 2 solo albums; The Mapcap Laughs and Barrett but they didn't go very well. I have The Mapcap Laughs and it is a very strange album.

                          Along with Antimatter and Dark Matter they've discovered the existence of Doesn't Matter which appears to have no effect on the universe whatsoever! Rich Tennant 5th Wave

                          C Offline
                          C Offline
                          Chris Losinger
                          wrote on last edited by
                          #12

                          both of his solo records are great. and they've influenced a ton of artists over the years.

                          image processing toolkits | batch image processing

                          1 Reply Last reply
                          0
                          • L Lost User

                            Obviously it can't work that way, precisely because of the reason you give. So why is this even a question?

                            L Offline
                            L Offline
                            Lost User
                            wrote on last edited by
                            #13

                            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.

                            OriginalGriffO L Kornfeld Eliyahu PeterK 3 Replies Last reply
                            0
                            • L Lost User

                              So far 45 minutes have elapsed and nobody has suggested your answer is incomplete or theirs is better. I vote we move Q&A to the Lounge and post drivel in Q&A. All in favor raise your hands...

                              L Offline
                              L Offline
                              Lost User
                              wrote on last edited by
                              #14

                              Would anyone notice?

                              1 Reply Last reply
                              0
                              • L Lost User

                                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.

                                L Offline
                                L Offline
                                Lost User
                                wrote on last edited by
                                #15

                                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.

                                L 1 Reply Last reply
                                0
                                • L Lost User

                                  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.

                                  OriginalGriffO Offline
                                  OriginalGriffO Offline
                                  OriginalGriff
                                  wrote on last edited by
                                  #16

                                  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 – ∞)

                                  "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                                  "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                                  L 1 Reply Last reply
                                  0
                                  • L Lost User

                                    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.

                                    L Offline
                                    L Offline
                                    Lost User
                                    wrote on last edited by
                                    #17

                                    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.

                                    L 1 Reply Last reply
                                    0
                                    • OriginalGriffO OriginalGriff

                                      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 – ∞)

                                      L Offline
                                      L Offline
                                      Lost User
                                      wrote on last edited by
                                      #18

                                      :laugh: Well, I didn't want to say that.

                                      OriginalGriffO 1 Reply Last reply
                                      0
                                      • L Lost User

                                        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.

                                        L Offline
                                        L Offline
                                        Lost User
                                        wrote on last edited by
                                        #19

                                        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.

                                        OriginalGriffO 1 Reply Last reply
                                        0
                                        • E EbolaHost

                                          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)

                                          J Offline
                                          J Offline
                                          Jeremy Falcon
                                          wrote on last edited by
                                          #20

                                          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

                                          OriginalGriffO P 2 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups