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. General Programming
  3. C#
  4. time requirements in real-times systems?

time requirements in real-times systems?

Scheduled Pinned Locked Moved C#
businessquestionworkspace
6 Posts 3 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.
  • A Offline
    A Offline
    auting82
    wrote on last edited by
    #1

    Hi, I am having a hard time understanding some basic concepts in real time systems. I have tried reading up on it but when viewing a concrete system I can't really understand it. The application prints the time, student name, student number and semester year as given in the setup in the program runs a certain amount of loops for all tasks. Scheduler set up: Name Delay Thread#1 95ms Thread#3 187ms Thread#5 463ms When code is executed it looks like this. Print Out: [T1]:11:30:45:808[T3]:11:30:45:825[T5]:11:30:45:825[T1]:Mark Johnson[T1]:152585[T3]:Mark Johnson[T1]:2020 [T5]:Mark Johnson[T1]:2020 [T5]:Mark Johnson[T1]:11:30:45:949[T3]:152585[T1]:Mark Johnson[T1]:2020 [T3]:2020[T5]:152585[T1]:2020[T3]:2020 What are the real time requirements of this application?

    OriginalGriffO L 3 Replies Last reply
    0
    • A auting82

      Hi, I am having a hard time understanding some basic concepts in real time systems. I have tried reading up on it but when viewing a concrete system I can't really understand it. The application prints the time, student name, student number and semester year as given in the setup in the program runs a certain amount of loops for all tasks. Scheduler set up: Name Delay Thread#1 95ms Thread#3 187ms Thread#5 463ms When code is executed it looks like this. Print Out: [T1]:11:30:45:808[T3]:11:30:45:825[T5]:11:30:45:825[T1]:Mark Johnson[T1]:152585[T3]:Mark Johnson[T1]:2020 [T5]:Mark Johnson[T1]:2020 [T5]:Mark Johnson[T1]:11:30:45:949[T3]:152585[T1]:Mark Johnson[T1]:2020 [T3]:2020[T5]:152585[T1]:2020[T3]:2020 What are the real time requirements of this application?

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

      Windows is not and never has been a real time system: it's a multithreaded preemptive scheduling system, and that's different. Thread delays aren't absolute values, they are minimum values: the thread will delay for at least Xms, and will be available to run from that point - but that doesn't mean it will run immediately, or even soon, depending on other threads in the system and the number of cores available to process them. As the "Threads : Cores" ratio rises, more and more threads get delayed more and more. You have no direct control at all over when a thread will run: all you can do is say "wait at least this long"; you can't even guarantee that a thread will complete an operation before a second thread gets in there - so when you are sharing a single resource (such as the console) between multiple threads, you can't even guarantee that each message you see will be complete, much less in an order you want!

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony AntiTwitter: @DalekDave is now a follower!

      "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

      A 1 Reply Last reply
      0
      • OriginalGriffO OriginalGriff

        Windows is not and never has been a real time system: it's a multithreaded preemptive scheduling system, and that's different. Thread delays aren't absolute values, they are minimum values: the thread will delay for at least Xms, and will be available to run from that point - but that doesn't mean it will run immediately, or even soon, depending on other threads in the system and the number of cores available to process them. As the "Threads : Cores" ratio rises, more and more threads get delayed more and more. You have no direct control at all over when a thread will run: all you can do is say "wait at least this long"; you can't even guarantee that a thread will complete an operation before a second thread gets in there - so when you are sharing a single resource (such as the console) between multiple threads, you can't even guarantee that each message you see will be complete, much less in an order you want!

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony AntiTwitter: @DalekDave is now a follower!

        A Offline
        A Offline
        auting82
        wrote on last edited by
        #3

        Hi Original Griff, the question here is to analyze the system based on real-time requirements. The requirements will be any factor that may affect the running time of the tasks.The real-time involve tasks running in parallel, any common resources used by the system that will affect the timing and the time used by the application. You are saying here that windows is not a real time system, but this is an app created to simulate a real time system that has some tasks running. That's a different thing inst it :confused:? If one disregards the CPU and computer memory which other resources are these tasks sharing when running?

        OriginalGriffO 1 Reply Last reply
        0
        • A auting82

          Hi Original Griff, the question here is to analyze the system based on real-time requirements. The requirements will be any factor that may affect the running time of the tasks.The real-time involve tasks running in parallel, any common resources used by the system that will affect the timing and the time used by the application. You are saying here that windows is not a real time system, but this is an app created to simulate a real time system that has some tasks running. That's a different thing inst it :confused:? If one disregards the CPU and computer memory which other resources are these tasks sharing when running?

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

          What do you think? It's your homework after all, not mine!

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony AntiTwitter: @DalekDave is now a follower!

          "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

          1 Reply Last reply
          0
          • A auting82

            Hi, I am having a hard time understanding some basic concepts in real time systems. I have tried reading up on it but when viewing a concrete system I can't really understand it. The application prints the time, student name, student number and semester year as given in the setup in the program runs a certain amount of loops for all tasks. Scheduler set up: Name Delay Thread#1 95ms Thread#3 187ms Thread#5 463ms When code is executed it looks like this. Print Out: [T1]:11:30:45:808[T3]:11:30:45:825[T5]:11:30:45:825[T1]:Mark Johnson[T1]:152585[T3]:Mark Johnson[T1]:2020 [T5]:Mark Johnson[T1]:2020 [T5]:Mark Johnson[T1]:11:30:45:949[T3]:152585[T1]:Mark Johnson[T1]:2020 [T3]:2020[T5]:152585[T1]:2020[T3]:2020 What are the real time requirements of this application?

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

            "Real-time" is like an ATM; you want your cash NOW. Anything other than "real-time", means stuff might go into a "queue" for a while before it get processed, if there is "other" stuff that also needs doing. As for "your" app, no one knows what it's doing so no one can tell you if it has a "real-time" requirement or not. And simply printing the same static information over and over isn't anything; it's just nonsense.

            It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

            1 Reply Last reply
            0
            • A auting82

              Hi, I am having a hard time understanding some basic concepts in real time systems. I have tried reading up on it but when viewing a concrete system I can't really understand it. The application prints the time, student name, student number and semester year as given in the setup in the program runs a certain amount of loops for all tasks. Scheduler set up: Name Delay Thread#1 95ms Thread#3 187ms Thread#5 463ms When code is executed it looks like this. Print Out: [T1]:11:30:45:808[T3]:11:30:45:825[T5]:11:30:45:825[T1]:Mark Johnson[T1]:152585[T3]:Mark Johnson[T1]:2020 [T5]:Mark Johnson[T1]:2020 [T5]:Mark Johnson[T1]:11:30:45:949[T3]:152585[T1]:Mark Johnson[T1]:2020 [T3]:2020[T5]:152585[T1]:2020[T3]:2020 What are the real time requirements of this application?

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

              auting82 wrote:

              What are the real time requirements of this application?

              There are not any real time requirements, since all you are doing is printing some general information about people in your database.

              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