本文介绍了垃圾收集是阻止PCI中断还是DMA?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我有一个服务器应用程序(内置c#,。net 3.5,服务器GC和64位)从PCI设备接收和处理数据。它几乎实时运行,以便每25毫秒处理从PCI设备传输的数据。该应用程序使用DL​​L(在c ++中写入
)执行PCI接口,包括通过直接内存访问(DMA)进行数据传输。

I have a server application (built in c#, .net 3.5, server GC and 64 bits) that receives and processes data from PCI device. It runs in near real-time in order to handle data transferred from the PCI device per 25 milliseconds. The application uses DLL (written in c++) which perform PCI interface including data transfer through Direct Memory Access(DMA).

在操作应用程序时,存在输入数据延迟超过25ms的问题。从许多测试中,我发现了与垃圾收集相关的问题,当GC发生时,PCI接口被阻止。

There was an issue that input data is delayed over 25ms, uncommonly, while operating the application. From a number of tests, I found a problem related to Garbage Collection that PCI interface is blocked when GC occurs.

在测试中,我在.net 4.6.1中重新构建应用程序,以便使用ETW分析GC事件(我无法在.net 3.5中测量GC时间。)这是服务器GC,gcConcurrent为true。我还测试了SustainedLowLatency和交互模式,
并且两者都出现了同样的问题。

At the test, I re-built the application in .net 4.6.1 in order to analyze GC events using ETW (I couldn't fint dout way to measure GC time in .net 3.5). It was server GC with gcConcurrent true. I also tested with SustainedLowLatency and Interactive Mode, and same problem occurred at both.

所以这里有2个我想要的问题知道。

So here are 2 questions I want to know.

1。剂量垃圾收集是否禁用PCI中断?

1. Dose Garbage Collection make PCI interrupt disabled?

2。剂量垃圾收集块直接内存访问(DMA)?

2. Dose Garbage Collection block direct memory access(DMA)?

谢谢。

推荐答案

>> Dose Garbage Collection禁用PCI中断?剂量垃圾收集块直接内存访问(DMA)?

垃圾收集(GC)是一种自动内存管理方式。垃圾收集器,或者只是收集器,试图回收垃圾,或者由程序不再使用的对象占用的内存。

Garbage collection (GC) is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program.

总之,垃圾收集 适用于记忆。至于PCI接口被阻止的原因。我认为这是操作系统的一个动作。如果您想了解有关操作系统的更多信息,可以在此处查看。

In conclusion , Garbage collection  works with memory . As for why the PCI interface is blocked. I think it's a action from operating system. If you want to know more about operating system , you could see here.

最好的问候,

feih_7

Best regards,
feih_7


这篇关于垃圾收集是阻止PCI中断还是DMA?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 08:23