While opening a GPIO device, is assigning initial pin required? if not, what can
ID: 3796979 • Letter: W
Question
Explanation / Answer
What is task priority ? How it effects the program execution?
Each task have priority range from 0 to configMAX_PRIORITIES - 1 . Task priorities is define in FreeRTOSConfig.h header file. Task priority is use for execution of program , which program will run first or next. We can arrange the schedule for processes.
Low priority tasks is assigned by low priority numbers. The zero priority task is called idle task (tskIDLE_PRIORITY).
Tasks is in the Ready or Running state will decide by FreeRTOS scheduler. Lower priority tasks that are always in the ready state and highest priority tasks always in running . Same priority can be assigned to any number of tasks .
Ready state tasks of equal priority when configUSE_TIME_SLICING is not defined, or if configUSE_TIME_SLICING is set to 1, then using a time sliced round robin scheduling scheme will share the available processing time.
What is MQX ? why we do need operating system ?
MQX is a real time operating system. MQX is standing for Message Queue eXecutive.
MQX is mostly using in embedded systems or embedded based application. MQX development is done on machine running Unix or Windows. Using cross-compiling software we can run on different – different CPU architectures.
MQX includes a following technique to manage resources
In MQX kernel, interrupts, semaphores, queues and a memory manager are taking some memory space as little as 6 KB of ROM .
MQX having some tools to manage resources :
i). TCP/IP stack ii) embedded MS-DOS file system iii) USB Host/Device Stack
iv) Task-Aware debugging v) Remote debugging and performance analysis tools.
MQX is portable operating system so we can use for any platforms and runs on any modern CPU ( Kinetis, PowerPC, ARC, ARM, xScale).
Why do we need operating system ?
If we are not using operating system then all of code we have write ourselves. OS is use for resource management, device drivers , file systems and threads. OS provide the better communication between user and hardware. Its managing the memory and hardware. Its provide the multitasking, multiprogramming and faster implementation of any task or problems .
____________________________________________________________________________________
What is different between operating system and RTOS ?
OS
RTOS
What do you define in TASK_TEMPLATE_STRUCT ? what are parameters for creating a task?
TASK_TEMPLATE_STRUCT is a list of task templates. When we are create tasks on the processor then we will use to define set of templates. For example MQX RTOS creates one instance of each task, whose template defines it as an autostart task.
Running application can create other tasks using a task template which is defines in template list or application defines dynamically. The end of the task template list is a zero-filled task template.
following attributes to a task can assign :
• Autostart - when OS starts, it creates one instance of the task.
• DSP – OS saves the DSP co-processor registers.
• Floating point – OS saves floating-point registers.
• Time slice – OS uses round robin scheduling for the task.
For example:
TASK_TEMPLATE_STRUCT OS_Template_List[] =
{
{ MAIN_TASK, Program_task, 0x3300, 10, "Program_task",MQX_AUTO_START_TASK, 0L, 0},
{ WORLD, world_task, 0x3000, 4, "world_task", MQX_TIME_SLICE_TASK, 0L, 100},
{ FLOAT, float_task, 0x4000, 3, "Float_task",OS_AUTO_START_TASK | OS_FLOATING_POINT_TASK, 0L, 0},
{ 0, 0, 0, 0, 0, 0, 0L, 0 }
};
OS
- Non-Deterministic and Non-time critical OS.
- In some cases non-predicable.
- Task scheduling is not priority based always cause it manages to achieve high performance.
- Its large size OS.
- In this completely fair scheduling(CFS) method.
- Unbounded latency .
- Virtual memory is present.
- Linux (Ubuntu, redhat, centos) windows.
RTOS
- Deterministic and time critical OS.
- Predicable and quick response.
- Task scheduling is priority based always.
- Its small size OS.
- Scheduling method is preemptive task scheduling method.
- Bounded latency (process will get execution within a define time).
- No virtual memory , directly interact with physical memory.
- Eg. RTlinux, FreeRTOs.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.