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] [March 2011 Threads] Reduce memory usage with Mutex SemaphorePosted by Boris Estudiez on March 8, 2011 Hi, I need to create 30 mutex semaphores for shared resources. Each mutex uses a queue, so 30 x 76 bytes = 2280 bytes...too much RAM for my MCU. My question is, How I can implement mutex or similar mechanism without using too RAM ?. Thanks in advance. Regards, Boris Estudiez.- http://www.slicetex.com.ar
RE: Reduce memory usage with Mutex SemaphorePosted by Dave on March 8, 2011 My question would be, why do you need 30 mutexes? Are you sure you have an optimal design?
RE: Reduce memory usage with Mutex SemaphorePosted by Richard on March 8, 2011 Mutexes have a lot to do - they have all the event information contained within them (instead of in a separate event control block), control how things queue waiting for the mutex, ensure things queue in priority order, implement priority inheritance, allow blocking on mutex receives, etc. If you need all that, then use a mutex, if you don't and your usage scenario is more simply, then you can implement something more simply, even some sort of protected shared variable might do.
Regards.
RE: Reduce memory usage with Mutex SemaphorePosted by Boris Estudiez on March 8, 2011 Hi, I need 30 mutexes becouse I have a script running on two tasks (A & B).
Task A and B share the same resources. Task B has higher priority than task A.
In my device, the script is loaded by a customer, so the access to the shared resources must be transparent.
I need priority inheritance when task B try to access to the resources.
Regards, Boris Estudiez.-
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|