time requirements in real-times systems?
-
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?
-
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?
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!
-
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!
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?
-
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?
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!
-
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?
"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
-
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?