ISB、DSB和DMB的含义

简介: ISB、DSB和DMB的含义

参考

DDI0487J_a_a-profile_architecture_reference_manual.pdf

  • B2.3 Definition of the Arm memory model
  • B2.3.12 Memory barriers
  • Data Memory Barrier (DMB)
  • Data Synchronization Barrier (DSB)
  • Instruction Synchronization Barrier (ISB)

Data Memory Barrier (DMB)

The DMB instruction is a memory barrier instruction that ensures the relative order of memory accesses before the barrier with memory accesses after the barrier. The DMB instruction does not ensure the completion of any of the memory accesses for which it ensures relative order.

The basic principle of a DMB instruction is to introduce order between memory accesses that are specified to be affected by the DMB options supplied as arguments to the DMB instruction. The DMB instruction ensures that all affected memory accesses by the PE executing the DMB instruction that appear in program order before the DMB instruction and those which originate from a different PE, to the extent required by the DMB options, which have been Observed-by the PE before the DMB instruction is executed, are Observed-by each PE, to the extent required by the DMB options, before any affected memory accesses that appear in program order after the DMB instruction are Observed-by that PE.

The DMB instruction affects only memory accesses and the operation of data cache and unified cache maintenance instructions. It has no effect on the ordering of any other instructions executing on the PE.

Data Synchronization Barrier (DSB)

A DSB instruction is a memory barrier that ensures that memory accesses that occur before the DSB instruction have completed before the completion of the DSB instruction. In doing this, it acts as a stronger barrier than a DMB and all ordering that is created by a DMB with specific options is also generated by a DSB with the same options.

A DSB instruction executed by a PE, PEe, completes when all of the following apply:

  • All explicit memory effects of the required access types appearing in program order before the DSB are complete for the set of observers in the required shareability domain.
  • If the required access types of the DSB is reads and writes, the following instructions issued by PEe before the DSB are complete for the required shareability domain:
  • All cache maintenance instructions.
  • All TLB maintenance instructions.
  • All PSB CYNC instructions.

In addition, no instruction that appears in program order after the DSB instruction can alter any state of the system or perform any part of its functionality until the DSB completes other than:

  • Being fetched from memory and decoded.
  • Reading the general-purpose, SIMD and floating-point, SVE vector or predicate, Special-purpose, or System registers that are directly or indirectly read without causing side-effects

Instruction Synchronization Barrier (ISB)

An ISB instruction ensures that all instructions that come after the ISB instruction in program order are fetched from the cache or memory after the ISB instruction has completed. Using an ISB ensures that the effects of context-changing operations executed before the ISB are visible to the instructions fetched after the ISB instruction.

Examples of context-changing operations that require the insertion of an ISB instruction to ensure the effects of the operation are visible to instructions fetched after the ISB instruction are:

  • Completed cache and TLB maintenance instructions.
  • Changes to System registers.

Any context-changing operations appearing in program order after the ISB instruction take effect only after the ISB has been executed.

相关文章
|
存储 Python 容器
常量与变量:计算机编程中的基本概念
在计算机编程中,常量和变量是两个非常重要的概念。它们分别代表了在程序中固定不变的值和可以变化的值。了解这两个概念对于编写有效、可维护的代码至关重要。本文将详细讨论常量和变量的概念,并通过示例代码来展示它们在编程中的应用。
499 0
|
XML Java Android开发
Android App开发网络通信中使用okhttp下载和上传图片、文件讲解及实战(超详细实现用户注册信息上传 附源码)
Android App开发网络通信中使用okhttp下载和上传图片、文件讲解及实战(超详细实现用户注册信息上传 附源码)
1196 0
|
Kubernetes 应用服务中间件 nginx
使用kind搭建kubernetes
使用kind搭建kubernetes
350 5
|
前端开发 开发者 容器
【Web 前端】相对定位,绝对定位,固定定位的区别?
【4月更文挑战第22天】【Web 前端】相对定位,绝对定位,固定定位的区别?
|
XML JavaScript API
DOM 和 SAX 解析器之间的区别
【8月更文挑战第22天】
222 0
|
JavaScript
nodejs自动接收新邮件进行处理
通过imap 来接收邮箱新邮件,类似客户端系列,不过比较简单的,目前只有新邮件,后续也可以通过这个来做一个自己的邮件客户端。
nodejs自动接收新邮件进行处理
|
存储 Ubuntu Linux
xenomai3+linux构建linux实时操作系统-基于X86_64和arm
Xenomai是一个实时性解决方案,通过在Linux上添加实时内核Cobalt来增强实时性能。它有三个主要部分:libcobalt(用户空间实时库)、Cobalt(内核空间实时内核)和硬件架构特定层(ipipe-core或dovetail)。ipipe-core适用于Linux 5.4以下版本,而dovetail用于5.4及以上版本。本文介绍了在X86 Ubuntu环境下,如何编译Xenomai内核,搭建应用环境,包括配置、编译、安装和实时性测试。对于其他硬件架构,如ARM和ARM64,步骤类似。文章还提到了Xenomai与Linux内核版本的兼容性和实时性测试结果。
1289 0
xenomai3+linux构建linux实时操作系统-基于X86_64和arm
|
机器学习/深度学习 数据采集 算法
大模型时代下的数据标注
大模型时代下的数据标注
554 2
大模型时代下的数据标注
看看FIQ和IRQ
看看FIQ和IRQ
369 0
|
SQL 消息中间件 自然语言处理
看完这一篇,ShardingSphere-jdbc 实战再也不怕了
谈到分库分表中间件时,我们自然而然的会想到 ShardingSphere-JDBC 。 这篇文章,我们聊聊 ShardingSphere-JDBC 相关知识点,并实战演示一番。
2800 1

热门文章

最新文章