Feedback
Feedback

If you are having issues with the exercises, please create a ticket on DevZone: devzone.nordicsemi.com
Drag & Drop Files, Choose Files to Upload 您最多可以上传 2 个文件。
  • 简体中文
    Eng
    简体中文
  • 第 7 课 – 多线程应用程序

    概览

    nRF Connect SDK 使用 Zephyr RTOS,这是一款专为嵌入式开发设计的实时操作系统。Zephyr 包含众多的内核服务和其他功能(包括线程),支持多线程应用程序开发。在本课中,我们将深入探讨线程概念以及 nRF Connect SDK/Zephyr 提供的线程相关服务。

    在练习部分,我们将介绍如何创建具有不同优先级的线程,并通过时间片轮转 (time slicing) 和工作队列 (workqueues) 等功能了解调度程序的行为。

    目标

    • 了解裸机编程与 RTOS 编程之间的主要区别,包括使用 RTOS 的优缺点
    • 熟悉 Zephyr RTOS 执行模型、中断服务程序 (ISR)、线程、线程生命周期、任务间通信/同步机制以及调度程序
    • 学习与线程相关的内核服务基础知识(用户定义线程、系统线程、工作队列线程)
    • 通过动手练习了解抢占式调度和时间片轮转
    • 通过动手练习实践如何创建线程、线程让步 (yielding) 和休眠 (sleeping)
    • 通过动手练习实践如何将工作卸载到工作队列

    Switch language?

    Progress is tracked separately for each language. Switching will continue from your progress in that language or start fresh if you haven't begun.

    Your current progress is saved, and you can switch back anytime.

    Register an account
    Already have an account? Log in
    (All fields are required unless specified optional)

    • 8 or more characters
    • Upper and lower case letters
    • At least one number or special character

    Forgot your password?
    Enter the email associated with your account, and we will send you a link to reset your password.