Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the system tasks in vxworks

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you what are the tasks of the system in vxworks, I hope you will gain something after reading this article, let's discuss it together!

Depending on the configuration, the VxWorks system will start some system tasks synchronously when it starts, some of which will quit after completing their own work, while others will run all the time. Common system tasks are as follows:

Task name: tRootTask

Priority: 0

Stack size: ROOT_STACK_SIZE. The specific value is related to CPU architecture. For more information, please see configAll.h.

Trigger condition: system startup

Components: none

Description: this is the first task that the kernel starts, and then it starts other system tasks. The task entry is the function usrRoot (), which initializes most of the system's functions. Typically, after initializing other functions, the task exits itself. To see it, we add a taskSuspend () at the end of the task and hang it up

Note: do not suspend, delete, or adjust the priority of these system tasks in the actual product. Otherwise, the behavior of the system will be unpredictable.

Task name: tLogTask

Priority: 0

Stack size: 5000

Trigger condition: interrupt or call logMsg () in the task

Component: INCLUDE_LOGGING

Description: used to record system information without using the IO of the current task

Maximum number of messages queued: MAX_LOG_MSGS. Default is 50.

Number of formatting parameters: 6

Task name: tExcTask

Priority: 0

Stack size: EXC_TASK_STACKSIZE, default is 8192

Trigger condition: call excJobAdd () in the interrupt

Component: INCLUDE_EXC_TASK

Description: this task is used to perform tasks that are not convenient to perform in an interrupt, so the highest priority must be used. The maximum number of jobs that can be queued on this task is MAX_ISR_JOBS, which must be a power of 2, and the default value is 16. If the work that needs to be queued in the interruption exceeds this limit, there will be an overflow warning "messages from interrupt levellost"

Task name: tJobTask

Priority: 0 at startup, dynamically adjusted according to the work performed

Stack size: JOB_TASK_STACK_SIZE, default is 8000

Trigger condition: other tasks submit work

Component: INCLUDE_JOB_TASK

Description: this task is used to perform work submitted by other tasks. It uses priority 0 to wait for work and dynamically adjusts it to the priority of the task that submits the work when the work is performed. One of the main functions is to handle the self-deletion of tasks.

Task name: tIsrN

Priority: 0

Stack size: 8192

Trigger condition: device interrupt calls isrDeferJobAdd ()

Component: INCLUDE_ISR_DEFER

Description: this task is used to perform the work submitted by the device driver through isrDeferJobAdd (). The letter N in the name indicates the sequence number of the CPU used by the task. In a single-core environment, there is only tIsr0. When this set of tasks is created, each is bound to the CPU of the corresponding sequence number. Device drivers in multi-core mode bind deferred work to the current CPU to avoid cross-CPU scheduling

Task name: tNet0

Priority: NET_TASK_PRIORITY, default is 50

Stack size: NET_TASK_STACKSIZE, default is 10000

Trigger conditions: packet arrival, transmission completion, timer arrival in the network protocol, requests from socket applications, etc.

Component: INCLUDE_NET_DEAMON

Description: this is the daemon thread for network drivers and network protocols

Task name: tWdbTask

Priority: WDB_TASK_PRIORITY, default value 3

Stack size: WDB_STACK_SIZE, default is 0x2000

Trigger condition: none

Component: INCLUDE_WDB

Description: WDB's target agent program for handling requests sent by host tool through target server

Task name: tShellN

Priority: SHELL_TASK_PRIORITY, default value 1

Stack size: SHELL_STACK_SIZE, default is 0x10000

Trigger condition: system startup

Component: INCLUDE_SHELL

Description: kernel shell exists as a task, and multiple shell can be launched at the same time. Different shell uses a different serial number N as the name suffix, and the name "tShell" is defined by SHELL_TASK_NAME_BASE. Functions called in shell will use the context of this shell.

Task name: ipcom_telnetd

Priority: 50

Stack size: 6144

Trigger condition: new Telnet connection

Component: INCLUDE_IPTELNETS

Description: this daemon thread allows remote users to log in to VxWorks's kernel shell through Telnet. It starts a set of tasks for each Telnet connection, including ipcom_telnetspawn,tStdioProxyhexNum,tLoginhexNum,tShellRemdecNum

After introducing the task scheduling, we will find that the priority of these system tasks is relatively high, and the priority of our own applications should be as low as possible.

After introducing the startup process of VxWorks system, we will know that after the embedded hardware is powered on, we first execute the initialization program of assembly language, then jump to the program of C language, then start the first task tRootTask, and then load other system tasks step by step.

These high-priority system tasks are usually in the Pend state, and they provide the appropriate functionality only when they are needed by the outside world (applications or peripherals). Their overall external performance is a powerful real-time operating system that provides many functions.

After reading this article, I believe you have a certain understanding of "what are the system tasks in vxworks". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report