提交 73cc8c39 编写于 作者: W wusongqing

updated docs

Signed-off-by: Nwusongqing <wusongqing@huawei.com>
上级 da14fb7b
# Overview Template
##Basic Concepts
## Basic Concepts
***[Writing Requirements]***
......@@ -64,13 +64,13 @@ It is considered good practice that you understand the following concepts before
- Semaphore allows only a specified number of tasks to access a shared resource at a time. When the number of tasks accessing the resource reaches the limit, other tasks will be blocked until the semaphore is released.
***[Example 2]***
***[Example 2]***
**Working Principles of Mutexes**
**Working Principles of Mutexes**
In a multi-task environment, multiple tasks may access the same shared resource. However, certain shared resources are not shared, and can only be accessed exclusively by tasks. A mutex can be used to address this issue.
In a multi-task environment, multiple tasks may access the same shared resource. However, certain shared resources are not shared, and can only be accessed exclusively by tasks. A mutex can be used to address this issue.
When non-shared resources are accessed by a task, the mutex is locked. Other tasks will be blocked until the mutex is released by the task. The mutex allows only one task to access the shared resources at a time, ensuring integrity of operations on the shared resources.
When non-shared resources are accessed by a task, the mutex is locked. Other tasks will be blocked until the mutex is released by the task. The mutex allows only one task to access the shared resources at a time, ensuring integrity of operations on the shared resources.
......@@ -80,15 +80,15 @@ It is considered good practice that you understand the following concepts before
*Mandatory. Describe the constraints of the development task and the negative impact of the constraints, including but not limited to the following:*
- ***[Function Limitations]***
- ***Function Limitations***
- *Application scope of the function (specify scenarios that are not supported)*
- *Specification limitations*
***Operation constraints**:*
- ***Operation Limitations***
*Operations on known issues*
*Potentially risky operations (such as performance deterioration)*
*Operations that may cause performance deterioration*
- *Operations on known issues*
- *Potentially risky operations (such as performance deterioration)*
- *Operations that may cause performance deterioration*
*The table below describes the writing requirements. After finishing the writing, check your content against these requirements one by one.*
......
......@@ -64,13 +64,13 @@ XX系统音频模块支持音频业务的开发,提供音频相关的功能,
- 信号量允许多个任务在同一时刻访问同一资源,但会限制同一时刻访问此资源的最大任务数目。访问同一资源的任务数达到该资源的最大数量时,会阻塞其他试图获取该资源的任务,直到有任务释放该信号量。
【写作样例-2】
【写作样例-2】
**互斥锁运作原理**
**互斥锁运作原理**
多任务环境下会存在多个任务访问同一公共资源的场景,而有些公共资源是非共享的,需要任务进行独占式处理。互斥锁怎样来避免这种冲突呢?
多任务环境下会存在多个任务访问同一公共资源的场景,而有些公共资源是非共享的,需要任务进行独占式处理。互斥锁怎样来避免这种冲突呢?
用互斥锁处理非共享资源的同步访问时,如果有任务访问该资源,则互斥锁为加锁状态。此时其他任务如果想访问这个公共资源则会被阻塞,直到互斥锁被持有该锁的任务释放后,其他任务才能重新访问该公共资源,此时互斥锁再次上锁,如此确保同一时刻只有一个任务正在访问这个公共资源,保证了公共资源操作的完整性。
用互斥锁处理非共享资源的同步访问时,如果有任务访问该资源,则互斥锁为加锁状态。此时其他任务如果想访问这个公共资源则会被阻塞,直到互斥锁被持有该锁的任务释放后,其他任务才能重新访问该公共资源,此时互斥锁再次上锁,如此确保同一时刻只有一个任务正在访问这个公共资源,保证了公共资源操作的完整性。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册