首页 > 其他分享 >ISB、DSB和DMB的含义

ISB、DSB和DMB的含义

时间:2023-10-21 15:23:38浏览次数:33  
标签:DMB instruction memory ISB DSB instructions

参考

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.

标签:DMB,instruction,memory,ISB,DSB,instructions
From: https://www.cnblogs.com/pengdonglin137/p/17779013.html

相关文章

  • DSB和DMB后面的可选项的含义
    参考资料DDI0487J_a_a-profile_architecture_reference_manual.pdfB2.3.12MemorybarriersShareabilityandaccesslimitationsonthedatabarrieroperations......
  • docker 查询精选,提示server misbehaving
    错误提示root@u-master1:~#dockersearchnginxErrorresponsefromdaemon:Get"https://index.docker.io/v1/search?q=nginx&n=25":dialtcp:lookupindex.docker.ioon127.0.0.53:53:servermisbehaving处理方法root@u-master1:/etc/docker#vim/etc/resolv.......
  • day1 C语言:对于P1055 ISBN号码的代码优化及多解
    day1C语言:对于P1055ISBN号码的代码优化及多解先看题目 直接说最优解,其他方法后置 第一部分1.第一个点是数据的输入,本人第一的想法是直接用int类型去接受数据,但因为“-”的存在,在取得各位数字时会用到复杂循环和取余计算,所以这里用到char类型输入数据去取得各个位上的......
  • 「NOIP2008 普及组」ISBN 号码 题解
    前言转自博客,早期黑历史作品。这是本蒟蒻の第一篇题解qwq,发在博客上,还请多多关照.这道题是一道橙题,难度没有太大的问题,对于大犇们来说自然是一遍过的,本蒟就只能调调再交了.题面传送门题目描述每一本正式出版的图书都有一个ISBN号码与之对应,ISBN码包括99位数字、1......
  • isEmpty 和 isBlank 的区别
    背景:"isEmpty"和"isBlank"是两个常见的字符串操作方法,用于检查字符串是否为空或空白。它们在不同编程语言和库中可能有些许差异,我将为您提供通用的理解。       isEmpty系列StringUtils.isEmpty()是否为空.可以看到""空格是会绕过这种空判断,因为是一个空格,......
  • Matlab-对wav音频文件DSB调制及解调
    1.读取wav音乐文件%读取音频文件filename='jay.wav';[sound_data,fs]=audioread(filename);%9507502x244100sound_data_1=sound_data(:,1);sound_data_1=sound_data_1';%转置sound_data有两列,因为此音乐文件有两个通道,音频采样率为44100;这......
  • P1055 [NOIP2008 普及组] ISBN 号码
    [NOIP2008普及组]ISBN号码题目描述每一本正式出版的图书都有一个ISBN号码与之对应,ISBN码包括$9$位数字、$1$位识别码和$3$位分隔符,其规定格式如x-xxx-xxxxx-x,其中符号-就是分隔符(键盘上的减号),最后一位是识别码,例如0-670-82162-4就是一个标准的ISBN码。ISBN码......
  • [USACO09MAR]Cow Frisbee Team S
    [USACO09MAR]CowFrisbeeTeamS题目描述老唐最近迷上了飞盘,约翰想和他一起玩,于是打算从他家的\(N\)头奶牛中选出一支队伍。每只奶牛的能力为整数,第\(i\)头奶牛的能力为\(R_i\)。飞盘队的队员数量不能少于\(1\)、大于\(N\)。一支队伍的总能力就是所有队员能力的总和。约......
  • 【读书笔记】ISBN9787121353932
     【前言】是否所有人都可以公平地享受科技发展带来的生产力进步?AIGC应用越完善,内容生产的社会必要劳动时间就越少,人工就越没有价值。全社会新增劳动岗位的速度很快就会跟不上AIGC应用取代人工的速度,而不会使用AIGC应用的劳动者可能将无法获得收入、无法进行消费,从而逐步被剥离......
  • MantisBT中文使用手册(四)—— Issue生命周期与工作流
    IssueIssue的创建方式Issue的生命周期是从它被创建的一刻开始的。创建Issue的方法一般有以下几种:MantisBT的Web界面——也就是用户登录MantisBT后报告Issue的地方。SO......