Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/22/05 20:41
Read: times


 
#88184 - One task or three
Responding to: ???'s previous message
Erik Malund said:

yes, I disagree, the "task" is "print". The example you have given is a dot matrix printer controller and if you separate these 3 functions you will have no guarantee that "prepared print data" will be ready when the motor has located the printhead to a given position. Likewiase, if you separate tne functions you have no guarantee that the printhead is located where you want to be when you control the print head pulse width.

So, as all depend on all, you can not split it.

This is simply not true. The fact they depend upon each other does not mean they cannot be considered separately. In fact they are separate because two of them take place in different ISRs and the third runs in the background.

I am, of course, aware that you can make 'a' set a flag that 'b' wait for etc. and you can, of course design a printer where the motor stop and wait for "prepare print data", then "control the print head pulse width", then start the motor and repeat.

I doubt you would sell many.

I agree. This is a very poor design but has nothing to do with what we are discussing. The design I described has sold in the millions.

The issue is that if the functions depend on each other, you can not separate them into "tasks".

The fact they need to communicate with each other makes no difference to whether thay can be considered tasks.

The example of Windoew where no "task" depend on the other, your ICE run fine even if you have IE running BECAUSE they do not depend on each other.

Which is completely different. That is several applications running on a PC. We are discussing a single application consisting of several tasks.

The point is, I don't really care what you call them. The point is it is usefull to consider them this way in the design process because it emphasises the need to handle the communication between tasks. I have seen far too many applicaions using a simple workloop that fail to realise this and end up with the nightmare of the occasional random failure. In one way I am glad lots of people still code this way as it provides lots of work for me.

Ian




List of 44 messages in thread
TopicAuthorDate
please expalin RTOS, UnRTOS, MTOS...            01/01/70 00:00      
   Os's            01/01/70 00:00      
      thanks ...and now for Erik...            01/01/70 00:00      
         MicroC O/S II works fine            01/01/70 00:00      
      Threads?            01/01/70 00:00      
         Threads, Real Time and Multitasking            01/01/70 00:00      
            Just for clarification            01/01/70 00:00      
               Multiprocessing            01/01/70 00:00      
                  Multiprocessing            01/01/70 00:00      
                  Further clarification            01/01/70 00:00      
         Threads            01/01/70 00:00      
      Windoze            01/01/70 00:00      
         More Windoze            01/01/70 00:00      
            Ah...            01/01/70 00:00      
      Basic Info            01/01/70 00:00      
         extract from the above with translation            01/01/70 00:00      
            Completed            01/01/70 00:00      
               who are we            01/01/70 00:00      
                  Tics            01/01/70 00:00      
               the rest            01/01/70 00:00      
   But wait..there's more!            01/01/70 00:00      
   Real Time Info            01/01/70 00:00      
      hard/soft            01/01/70 00:00      
         Real Time Info            01/01/70 00:00      
   m,y opinion            01/01/70 00:00      
      why so late            01/01/70 00:00      
         one more thing            01/01/70 00:00      
            Architecture Independent            01/01/70 00:00      
               just to clarify            01/01/70 00:00      
                  No.            01/01/70 00:00      
      RTOS on a 51??            01/01/70 00:00      
         not the thing but the word            01/01/70 00:00      
            A Distinction (with a difference)            01/01/70 00:00      
               Tasks or Applications?            01/01/70 00:00      
            Multi Tasking            01/01/70 00:00      
               a dot matrix printer must be one task            01/01/70 00:00      
                  One task or three            01/01/70 00:00      
                     pray explain            01/01/70 00:00      
                        Tasks and Functions            01/01/70 00:00      
                           we are getting closer            01/01/70 00:00      
                              Not that far apart            01/01/70 00:00      
                              I doubt we are            01/01/70 00:00      
                           discussed            01/01/70 00:00      
                              TTCS            01/01/70 00:00      

Back to Subject List