FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [September 2016 Threads]
Hello,
When a task blocks because a semaphore isn't available to take, does the context immediately switch to another task? Or does the OS pend until the next systick after which a context switch occurs?
I need to sample something at 1000 hz, but my systick is also at 1000 hz. I'm worried that my sampling task will starve all other tasks of processing time.
Thanks in advance.
FreeRTOS, by default, uses a prioritised pre-emptive scheduler. It will
always run the highest priority task that is able to run.
If a task enters the Blocked state (because it is waiting for an event,
be that a message on a queue, or a direct to task notification, or
whatever) the scheduler will immediately select another task.
If a task sends an event to a higher priority task that causes the
higher priority task to exit the Blocked state, then the scheduler will
immediately switch to the unblocked task.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.