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. POTD

POTD

Scheduled Pinned Locked Moved The Lounge
7 Posts 5 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.
  • S Offline
    S Offline
    Shukra
    wrote on last edited by
    #1

    Phrase of the day. "Race Condition" I'm newbie in multi-threading, so googling articles on it, and found an article which says ".....and this is a race condition".....i think i will never get over it....

    Mike HankeyM B R 3 Replies Last reply
    0
    • S Shukra

      Phrase of the day. "Race Condition" I'm newbie in multi-threading, so googling articles on it, and found an article which says ".....and this is a race condition".....i think i will never get over it....

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

      Shukra wrote:

      "Race Condition"

      When you mistake exlax for chocolate.

      I wouldn't have to be such a smartass if you weren't such a dumbass. http://www.hq4thmarinescomm.com[^] My Site

      S 1 Reply Last reply
      0
      • S Shukra

        Phrase of the day. "Race Condition" I'm newbie in multi-threading, so googling articles on it, and found an article which says ".....and this is a race condition".....i think i will never get over it....

        B Offline
        B Offline
        Bassam Abdul Baki
        wrote on last edited by
        #3

        Today's News articles had a good free e-book on threading. http://blogs.msdn.com/b/nikosan/archive/2010/10/12/7-freely-available-e-books-guides-i-found-essential-for-net-programmers-and-architects.aspx[^]

        S 1 Reply Last reply
        0
        • Mike HankeyM Mike Hankey

          Shukra wrote:

          "Race Condition"

          When you mistake exlax for chocolate.

          I wouldn't have to be such a smartass if you weren't such a dumbass. http://www.hq4thmarinescomm.com[^] My Site

          S Offline
          S Offline
          Shukra
          wrote on last edited by
          #4

          thanks :)....i will

          1 Reply Last reply
          0
          • B Bassam Abdul Baki

            Today's News articles had a good free e-book on threading. http://blogs.msdn.com/b/nikosan/archive/2010/10/12/7-freely-available-e-books-guides-i-found-essential-for-net-programmers-and-architects.aspx[^]

            S Offline
            S Offline
            Shukra
            wrote on last edited by
            #5

            thanks....i've bookmarked the link.

            1 Reply Last reply
            0
            • S Shukra

              Phrase of the day. "Race Condition" I'm newbie in multi-threading, so googling articles on it, and found an article which says ".....and this is a race condition".....i think i will never get over it....

              R Offline
              R Offline
              Roger Wright
              wrote on last edited by
              #6

              "Race condition" is a term that comes from early digital design. I was there, so take my word for it... The principles apply just as well for software design, however. In combinatorial logic circuit design it was common to assume that all devices change state at the same moment. That's the textbook case, taught in school. In the real world, this isn't the case. Real digital devices take a few nanoseconds to change state and settle down. When circuits are designed that depend on simultaneous state changes, race conditions can occur. In this scenario, the changes in state are assumed to be completed before another part of the circuit reads the result and acts upon it. If not all of the expected inputs have settled to a final state before the next circuit samples the result, unexpected results can occur. The use of flip-flops driven by a common clock solves this problem, but at a cost in component prices and reliability - adding more circuit components always reduces MTBF. In software, especially code that uses threads, it's critical to never assume that an independent process will be complete when another thread is ready to accept the result. The state of all independent processes should be sampled and verified before any dependent process attempts to continue execution. It's not hard to do, but it does take a bit of discipline to get into the habit of validating intermediate results before proceeding with execution.

              Will Rogers never met me.

              N 1 Reply Last reply
              0
              • R Roger Wright

                "Race condition" is a term that comes from early digital design. I was there, so take my word for it... The principles apply just as well for software design, however. In combinatorial logic circuit design it was common to assume that all devices change state at the same moment. That's the textbook case, taught in school. In the real world, this isn't the case. Real digital devices take a few nanoseconds to change state and settle down. When circuits are designed that depend on simultaneous state changes, race conditions can occur. In this scenario, the changes in state are assumed to be completed before another part of the circuit reads the result and acts upon it. If not all of the expected inputs have settled to a final state before the next circuit samples the result, unexpected results can occur. The use of flip-flops driven by a common clock solves this problem, but at a cost in component prices and reliability - adding more circuit components always reduces MTBF. In software, especially code that uses threads, it's critical to never assume that an independent process will be complete when another thread is ready to accept the result. The state of all independent processes should be sampled and verified before any dependent process attempts to continue execution. It's not hard to do, but it does take a bit of discipline to get into the habit of validating intermediate results before proceeding with execution.

                Will Rogers never met me.

                N Offline
                N Offline
                Nagy Vilmos
                wrote on last edited by
                #7

                All Hail Woger!


                Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H

                1 Reply 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