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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Busy Waiting

Busy Waiting

Scheduled Pinned Locked Moved C / C++ / MFC
questionperformancehelp
4 Posts 4 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.
  • D Offline
    D Offline
    Daniel Kanev
    wrote on last edited by
    #1

    I have read many articles about 'Busy Waiting' prevention in thread synchronization. I am wondering if busy waiting is really a big problem with processors available nowadays. What is your opinion - is busy waiting just a theoretical problem or it really affects system performance? Thank you.

    CPalliniC C S 3 Replies Last reply
    0
    • D Daniel Kanev

      I have read many articles about 'Busy Waiting' prevention in thread synchronization. I am wondering if busy waiting is really a big problem with processors available nowadays. What is your opinion - is busy waiting just a theoretical problem or it really affects system performance? Thank you.

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      Daniel Kanev wrote:

      I am wondering if busy waiting is really a big problem with processors available nowadays.

      IMHO wasting time is an issue regardless of processor speed. :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      In testa che avete, signor di Ceprano?

      1 Reply Last reply
      0
      • D Daniel Kanev

        I have read many articles about 'Busy Waiting' prevention in thread synchronization. I am wondering if busy waiting is really a big problem with processors available nowadays. What is your opinion - is busy waiting just a theoretical problem or it really affects system performance? Thank you.

        C Offline
        C Offline
        Cedric Moonen
        wrote on last edited by
        #3

        Daniel Kanev wrote:

        I am wondering if busy waiting is really a big problem with processors available nowadays

        Suppose that you have a loop in which you constantly check the value of a variable (and do something if the variable is true), no sleep or wait, only an 'endless' loop. This loop will consume the maximum resources it can use on the processor on which it is running. So, even if you have a faster processor, you will only loop faster. But all other process will still be slowed down because of that. So, yes, busy waiting is bad, even if you have the fastest processor in the world.

        Cédric Moonen Software developer
        Charting control [v1.4] OpenGL game tutorial in C++

        1 Reply Last reply
        0
        • D Daniel Kanev

          I have read many articles about 'Busy Waiting' prevention in thread synchronization. I am wondering if busy waiting is really a big problem with processors available nowadays. What is your opinion - is busy waiting just a theoretical problem or it really affects system performance? Thank you.

          S Offline
          S Offline
          Stephen Hewitt
          wrote on last edited by
          #4

          Yes, it's a big problem on a multitasking OS.

          Steve

          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