O'Reilly - .NET Framework Essentials, 2nd Edition--第二章(续)

2.6.1.4 Class, Properties, indexers
see detail in the next chapter
2.6.1.5 Interfaces
Interfaces support exactly the same concept as a C++ abstract base class(ABC) with only prure virtual functions. An ABC is a class that declares one or more pure functions and thus cannot be instantiated. You specify them, but you don’t implement them. A class that derives from you interface must implement you interface. An interface may contain methods, properties, indexers, and events. In .NET, a class can derive from multiple interfaces.


2.6.1.6 Delegates
Delegate
声明用于定义一种引用类型,该类型可用于将方法用特定的签名封装。委托实例可以封装静态方法或实例方法。委托大致类似C++中的函数指针;但是委托是类型安全和可靠的。
2.6.2 The Common Language Specification (CLS)
The CLS specifies a series of basic rules that are required for language integration. Since Ms provides the CLS that spells out the minimum requirements for being a .NET language, compiler vendors can build their compilers to the specification and provide languages that target .NET. Besides compilers writers, application developers should read the CLS and use its rules to guarantee interoperation.

CLS是一个标准,若要写自己的.NET编译器,或者开发相关程序,需要遵循这个标准。因为这个标准定义了不同语言被编译成.NET语言的基本规范。


2.7 CLR Execution

The major component of the CLR include the class loader, verifier, JIT compilers, and other execution support, such as code management, security management, garbage collection, exception management, debug management, marshaling management, thread management, and so on.

2.7.1 Class Loader
The class Loader loads .NET classes into memory and prepares them for execution. Before it can successfully do this, it must locate the target class. To find the target class, the class loader looks in several different places, including the application configuration file (.config) in the current directory, the GAC, and the metadata that is part of the PE file, specially the manifest. The information that is provided by one or more of these items is crucial to locating the correct target class. Recall that a class can be scoped to a particular namespace, a namespace can be scoped to a particular assembly, and an assembly can be scoped to a specific version. Given this, two classes, both named Car, are treated as different types even if the version information of their assemblies are the same.
类加载器把类加载到内存,并让它们执行的准备。在完成这个之前,类加载器必须先发现目标类。为了发现目标类,类加载器在几个不同的地方进行查找,包括在当前目录下的应用程序配置文件,GAC,PE文件中的元数据,特别是声明部分。在这些的一个或者多个重中找到的信息对成功加载目标类是非常重要的。调用能发生在下面的情况下:在一个命名空间中调用一个类,在一个组件中调用一个命名空间,在一个确定的版本中调用一个组件。在这种条件下,两个类都叫“汽车”,将被看作不同的类型,即使它们组件的版本信息是一样的。

Function of the class loader:
Once the class loader has found and loaded the target class, it caches the types information for the class so that in doesn’t have to load the class again for the duration of this process. By caching this information, it will later determine how much memory is needed to allocate for the newly created instance of this class. Once the target class is loaded, the class loader injects a small stub, like a function prolog, into every single method of the loaded class. This stub is used for two purposes: to denote the status of JIT compilation and to transition between managed and unmanaged code. At this point, if the loaded class references other classes, the class loader will also try to load the referenced types. However, if the referenced types have already been loaded, the class loader has to do nothing. Finally, the class loader uses the appropriate metadata to initialize the static variables and instantiate an object of the loaded class for you.

2.7.2 Verifier.
What is? is the component that executes at runtime to verify that the code is type safe.
When verify? After the class loader has loaded a class and before a piece of IL code can execute.
What verify?
    Main: The metadata is well formed; The IL code is type safe.
    Other: performs rudimentary control-flow analysis of the code to ensure that the code is using types correctly.

Note: 1 it kicks in only when a method is being invoked, not when a class or assembly is loaded.
     2 verification is an optional step because trusted code will never be verified but will be immediately directed to the JIT compiler for compilation.

2.7.3 JIT Compilers.
What is it?  Just In Time Compiler
What Function? Convert IL to (managed) native code so that it can execute on the target operation system.
How perform? JIT compilation occurs only the first time a method is invoked. Recall that the class loader adds a stub each method during class loading. At the first method invocation, the VES reads the information in this stub, which tells it that the code for the method has not been JIT-compiled. At this indication, the JIT compiler complies the method and injects the address of the managed native method into this stub. During subsequent invocations to the same methods, no JIT compilation is needed because each time the VES goes to read information in the stub, is sees the address of the native method. Because the JIT compiler only performs its magic the first time a method is invoked, the methods you don’t need at runtime will never be JIT-complied.

Other: if you want to avoid the cost of JIT compilation at runtime, you can use a special tool called ngen, which compilers your IL during installation and setup time.

2.7.4 Execution Support and Management
    1 Garbage collection
    2 Exception handling
   3 Security support: code is safe to execute, declarative and imperative security checks.
    4 Debug support: Controlling program execution, breakpoints, exceptions, control flow …
    5 Interoperation support: managed (CLR) and unmanaged (no CLR) worlds

转载于:https://www.cnblogs.com/yang_sy/archive/2008/03/02/1087939.html

GPU/SoC Power & Performance 架构进阶(11):Linux Power Management、BPMP/SMU 与 GPU 控制链 本文系统梳理了Linux电源管理框架(cpufreq、cpuidle、devfreq、runtime_pm)在GPU/SoC中的应用,结合NVIDIA Jetson(BPMP)与AMD GPU(SMU/PMFW)的公开案例,解析软硬件协同的功耗控制链。重点强调OPP框架作为性能请求与硬件执行的桥梁,指出实际频率/电压需跨层验证。通过只读探索与请求追踪,揭示控制路径中各环节的卡点分析方法,并警示Runtime PM中的竞态风险与引用管理关键性,为嵌入式系统能效优化提供可迁移的架构视角。 阅读详情

相关推荐

Ubuntu升级遇到grub-efi-amd64-signed报错?3步搞定这个烦人的EFI目录问题

本文详细解析了Ubuntu系统升级时遇到的“grub-efi-amd64-signed”报错及“cannot find EFI directory”问题。通过剖析UEFI启动机制与EFI系统分区原理,提供了从诊断到修复的三步解决方案,帮助用户快速解决因EFI目录未挂载导致的升级中断,确保系统引导正常。

assembly8low的博客 585

O'Reilly - .NET Framework Essentials, 2nd Edition

如果你想了解.NET Framework 的基础那么这本书值得 一看!我觉得只看前三章就可以了,后面的可以选着看前面三章看完了,你对.NET Framework 就有个大致的了解了。这样对于开发asp.net的我已经足够了!下面是我自己的读书笔记: 开始读这本书,刚看完了第一章,觉得写的还不错,至少前言部分就已经吸引我了 早就开始知道一点.NET FrameWork,但是也只是知...

aoding8407的博客 576

Spyglass实战指南:跨时钟域同步方案深度解析

本文深度解析了Spyglass在跨时钟域同步方案验证中的实战应用。通过真实案例阐述了亚稳态的危害,并详细介绍了从基础的两级同步器到复杂的异步FIFO与握手协议等八大同步方案,以及如何利用Spyglass进行有效配置、检查与问题排查,为提升芯片设计可靠性提供系统性的避坑指南。

weixin_29219189的博客 840

O'Reilly - .NET Framework Essentials, 2nd Edition--第二章

CLR: manage and execute code written in .NET languages and is the basis of the .NET architecture. 2.1 CLR Environment How does the CLR work? CLR is the runtime engine that loads r...

aoding8407的博客 281

PSINS惯性系初始对准与代码解读

本文参考“摇摆基座上基于信息的捷联惯导粗对准研究”(秦永元),以及“严恭敏博士后研究报告”,详细解读并推导了静基座惯性系对准算法,并与PSINS代码进行对照解读。

u011012050的博客 6754

泛微E10 eBuilder低代码平台避坑指南:新手最容易犯的5个错误及解决方案

本文针对泛微E10 eBuilder低代码平台的新手开发者,总结了5个最常见错误及解决方案,包括表单联动配置、流程设计权限、动作流时序、数据加工类型转换和权限管理过度配置等问题。通过实战经验和代码示例,帮助开发者避开常见陷阱,提升开发效率。

weixin_30919429的博客 540

O'Reilly - .NET Framework Essentials, 2nd Edition--第一章

开始读这本书,刚看完了第一章,觉得写的还不错,至少前言部分就已经吸引我了 早就开始知道一点.NET FrameWork,但是也只是知之皮毛,现在正好好好的学习一下 这将是一个系列的blog,我会把一步步的来完成。 第一章是简介,所以很多东西我都是跳着看,呵呵,由于本书是英文的,才发现偶尔会出现一个单词,不认识了,呵呵,一直来以为自己的英语足够应付了,呵呵,看来还得加强...

aoding8407的博客 190

RK3568 RGA硬件加速详解:图像缩放、旋转、格式转换10倍提速

RGA(Raster Graphics Acceleration)是瑞芯微(Rockchip)芯片系列中的 2D 图形加速引擎,专门用于处理像素级的图像操作。它通过硬件实现常见的图像处理算法,解放 CPU,降低功耗。RGA 是 RK3568 平台上一颗强大的 2D 图形加速引擎,能够:✅10-20 倍性能提升:大幅减少图像处理时间✅降低 CPU 占用:释放 CPU 资源给其他任务✅丰富的功能:缩放、旋转、裁剪、格式转换一应俱全✅易于集成:librga 提供简洁的 C API。

小灰灰的博客 1697

O'Reilly - .NET Framework Essentials, 2nd Edition--第三章

3.1 common programming model 3.1.1 System.Object Every type in .NET is an object, meaning that it must derive directly or indirectly form the Object class. The Object class exposes the public...

aoding8407的博客 162

超声波传感器(CHx01) 学习笔记 Ⅲ - I2C读写操作

CH-x01 通过 2 线 I2C 协议与主机处理器通信

nicole088的专栏 1740

【PCIe EP 设备入门学习专栏 -- 8 PCIe EP 架构详细介绍】

Synopsys PCIe 5.0 EP 架构由多个功能模块组成,整体遵循分层 + 模块化设计CXPL(事务层 + 链路层 + 物理层 MAC)XADM(仲裁/生成)、XAIM(应用接口)RADM(过滤/路由/Completion)CDM(配置空间)、PMC(电源管理)、LBC/DBI(寄存器访问)MSG_GEN(消息)、CXS(多芯片一致性)

CodingCos的博客 383

[免费下载 经典英文原版书] O'Reilly - C# Essentials 2nd Edition

 OReilly - C# Essentials 2nd Edition   更新日期: 2005年09月03日文件大小: 348.134KB图书格式: HTML/CHM图书语言: 英语   内容简介C# Essentials is a highly condensed introduction to the C# language and the .NET Framework. C# and

净心编程 2152

Pytorch CIFAR10图像分类 EfficientNet v1篇

EfficientNet源自Google Brain的论文EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks. 从标题也可以看出,这篇论文最主要的创新点是. 论文提出了,混合缩放,把网络缩放的三种方式:深度、宽度、分辨率,组合起来按照一定规则缩放,从而提高网络的效果。EfficientNet在网络变大时效果提升明显,把精度上限进一步提升,成为了当前最强网络。

风信子的猫Redamancy的快乐星球 1852

小白一键部署:VoiceStudio 本地语音工作室(Linux/Win/Mac)

VoiceStudio 是破十万星的开源本地语音工作室。本文在 Debian 13 实机用官方一行命令装上 0.5.7,记录 GPU 崩溃启动参数、Install local runtime、模型许可,以及 CPU 上 Voice Design 合成 7 秒 demo。与只做听写的 Hex 互补。

m0_56699208的博客 177

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

廖雪峰Python教程[完整版]

廖雪峰的python教程整理的,已经排好版了,而且还是完整的,适合小白

导出 ONNX 后 top-1 翻转:数值差 1e-3,先查 model.eval() 再比 opset

模型导出 ONNX 后数值偏移,边界样本 top-1 随之翻转。排查按导出模式、opset 版本与算子实现分三层展开并配复现脚本。该方法适用于部署前一致性验证,追求逐位一致仍需接受规范差异。

昨日种种,皆成今我。今日种种,皆成新我。 191

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

龙芯3a6000 银河麒麟v10sp1安装.net10全过程,编译libicu67

在龙芯平台安装.NET时,因缺少libicu67依赖,通过编译源码解决。下载ICU 67.1源码,替换支持LoongArch的config脚本,并修改double-conversion-utils.h以适配架构。使用runConfigureICULinux配置,编译后用checkinstall生成deb包,成功安装libicu67,后续顺利部署.NET运行时及SDK。资源链接已提供,仅供学习参考。

feetcrack的博客 191

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

导出ONNX后精度从95%跌到70%且零报错:先量级分诊再查tracing分支

导出 ONNX 后推理与 eager 静默不一致,指标下滑无报错。根因是 tracing 按样例输入固化分支,按差异量级分诊后定位控制流。

昨日种种,皆成今我。今日种种,皆成新我。 163

章节10:AI编译的范畴-对比MLIR和TPU-MLIR

章节1:什么是MLIR章节2:MLIR的引入章节3:MLIR完成一个端到端的流程章节4:编写一个pass章节5:MLIR相关语法章节6:量化相关章节7:训练相关章节8:图优化章节9:理解典型网络与编译器图优化一、最典型的工作模式“针对某种芯片,在 MLIR 上构建专用编译工具链”——这确实是当前 AI 编译器领域最主流、最核心的工作范式。TPU-MLIR 就是标准样板:定义芯片专用的 Dialect(Top/Tpu);实现硬件相关的 Pass(LayerGroup、权重重排、内存规划);包裹完整的前端导入、

vcvdv123的博客 349

重装 openvino、yaml-cpp

【代码】重装 yaml-cpp。

u010948546的博客 221

YLT 智能助手(小岳)· 02|运行时装配与依赖注入

本文详解YLT智能助手的“装配根”设计:通过五阶段分步初始化(治理→核心→能力→服务→生命),以显式顺序声明依赖,实现47个组件的有序装配。摒弃自动DI容器,采用手工注入避免循环依赖与生命周期错乱,用显式门面替代setattr动态绑定,确保可读性、可测试性与架构清晰。核心思想是“构造即依赖”,让100+对象在单进程内协同无冲突,为桌面Agent提供可复用的手工依赖注入范式。

u010972645的博客 215

库内计算推理:一条SQL背后的算子融合,和外挂方案差了几次网络往返

外挂向量库的RAG架构,一次语义检索要在应用层和向量库之间走两次网络往返:查业务表拿上下文,再拿上下文去向量库做相似度匹配,最后在应用层拼装。金仓KES AI数据库把AI推理算子下推到数据库执行引擎中,关系过滤与向量相似度计算在同一执行计划中协同完成。本文拆解“计算向数据移动”的范式转变、ONNX Runtime嵌入内核的工程路径,以及算子融合如何把延迟从“两次往返”压到“一次执行”。

DBAxiaoye的博客 127

PyTorch导出ONNX后argmax翻转:差异跳变指向tracing而非精度

模型导出 ONNX 后输出与 PyTorch 不一致,个别输入会导致预测类别翻转。本文用语义链路查控制流固化、数值链路查浮点差异的双线排查定位根因。

昨日种种,皆成今我。今日种种,皆成新我。 204

移动架构第五次转身:用户往往只有模糊目标

移动架构每轮进化皆源于底层假设崩塌。从原生到AgentRuntime,核心转变是应对用户模糊意图——传统流程需手动拆解,而AgentRuntime通过分层运行时(输入层、AgentCore、NativeCapabilitySDK、后端服务)实现意图理解与任务编排。

QingyunAI的博客 288

OpenCode vs Claude Code:Agent 编排机制对比(2026 年 11 月)

对比 OpenCode 与 Claude Code 的 Agent 编排机制:Parent-Child 委托模型 vs 团队共享任务列表,覆盖任务生命周期、上下文隔离、通信方式、并发、恢复与扩展能力,并给出做 Agent Runtime 与自治团队的选型建议。

weixin_45284808的博客 314

LangGraph 中的 Runtime Context 是什么?

Runtime Context 是 LangGraph 中用来承载「运行环境与依赖」的机制,它把用户身份、租户信息、客户端、配置等与业务数据无关的内容从 State 中剥离出来,通过。Runtime Context 把这些「与业务数据无关、但节点运行需要」的东西抽离出来,通过统一的入口注入,节点按需读取,既干净又灵活。正确区分 State 与 Runtime Context,能让你的图结构更清晰、状态更干净、测试更容易。理解这个区别,是正确使用 Runtime Context 的前提。

张晨光老师的播客 386

hi3519dv500OSD示例实现讲解

sample_vio_osd.c 实现Hi3519DV500平台OSD功能,通过初始化时间与四角框区域参数,调用SDK接口创建并绑定Region至VENC/VPS通道。时间OSD采用双缓冲、周期刷新机制,支持自定义位置、颜色及字体放大;四角框则通过配置坐标、线宽与颜色实现。模块提供启动/停止接口,管理线程与资源,确保显示稳定可靠。

m0_75040012的博客 303
上一篇: windows server 2008 设置!
下一篇: O'Reilly - .NET Framework Essentials, 2nd Edition--第二章
aoding8407
博客等级 码龄11年 2粉丝 0原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值