Thread: Clarification on tasks

  1. #1
    Registered User
    Join Date
    Feb 2012
    Posts
    347

    Clarification on tasks

    I know that RTOS executes the tasks at the exact time. But i have one clarification suppose if i create two taska at 10ms and 20ms. When the first 10ms is over it executes 10ms task but when another 10ms is over it needs to execute both 10 and 20 ms. Then how does it manage? If the time to finish ezecuting 10ms takes 5ms the 20ms task is dekayed by 5ms. Is it correct? Please help.

  2. #2
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,907
    Which RTOS are you talking about?
    Fact - Beethoven wrote his first symphony in C

  3. #3
    Registered User
    Join Date
    Feb 2012
    Posts
    347
    FreeRTOS

  4. #4
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,907
    Fact - Beethoven wrote his first symphony in C

  5. #5
    Registered User
    Join Date
    Feb 2012
    Posts
    347
    The document is very big. Can you help me if it answers my question. Please advise.

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    You do understand that if you only have one physical CPU core, that "at the same time" is just an illusion right?

    > Then how does it manage? If the time to finish ezecuting 10ms takes 5ms the 20ms task is dekayed by 5ms. Is it correct?
    If you've got a timer using 50% of the CPU, what do you want to happen?

    If it takes this long, you should be using tasks, so you have choices over priority and scheduling.
    Task Management - FreeRTOS Kernel - priorities
    Task Management - FreeRTOS Kernel - scheduling
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with 2 c++ tasks.
    By Vadim Polukejev in forum C++ Programming
    Replies: 4
    Last Post: 06-16-2015, 07:54 AM
  2. Homework tasks for fun
    By KoG Metalgod in forum C Programming
    Replies: 3
    Last Post: 12-19-2006, 12:40 PM
  3. Semaphores, OS tasks
    By Rennor in forum Networking/Device Communication
    Replies: 6
    Last Post: 08-24-2006, 10:58 PM
  4. C++ tasks
    By Womble in forum C++ Programming
    Replies: 4
    Last Post: 06-15-2003, 02:15 PM
  5. c++ tasks ??
    By tcr8008 in forum C++ Programming
    Replies: 3
    Last Post: 10-18-2002, 02:02 PM

Tags for this Thread