期刊文献+

一种高效的IO处理框架设计

Design of an efficient IO processing framework
下载PDF
导出
摘要 传统的多线程处理模型,并不适合处理IO密集业务。如果当前线程因为IO请求、加锁等系统调用或者被更高优先级的任务打断而阻塞时,CPU需要进行线程的上下文切换,调度新的线程重新执行,单次线程切换的开销不大,时延是微秒级别,但是如果切换频繁,带来的开销就会比较大,这会直接降低CPU的利用率;此外,IO操作中难免要进行内存分配和数据拷贝的操作,操作系统自带的内存分配对于密集IO操作,会产生大量的内存碎片,降低程序和操作系统的性能。基于以上两个问题,设计一个高效的IO调度系统,采用基于协程的任务调度模式,解决传统多线程模型处理密集IO效率不高的问题;另外再基于内存池的内存管理,解决操作系统自带的内存管理性能不高的问题。利用以上两个关键技术,大大提高了IO密集业务的处理效率。 The traditional multi-threaded processing model is not suitable for handling IO intensive service.If the current thread is blocked due to system calls such as IO requests,locking,or being interrupted by higher priority tasks,the CPU needs to do a thread context switch and schedule new threads to re-execute.The cost of a single thread switch is not significant,and the latency is at the microsecond level.However,if the switch is frequent,the cost will be relatively high,which willdirectly reduce CPU utilization.In addition,it is inevitable to perform memory allocation and data copy operations in IO operations.The memory allocation provided by the operating system can generate a large amount of memory fragmentation for intensive IO operations,which can reduce the performance of programs and operating systems.Based on the above two issues,this article designs and implements an eficient IO scheduling system,which adopts a task scheduling mode based on coprocessing to solve the problem of low efficiency in processing dense IO in traditional multithreaded models.In addition,memory management based on memory pools solves the problem of low memory management performance inherent in the operating system.By utilizing the above two key technologies,the processing efficiency of IO intensive business has been greatly improved.
作者 饶颖 RAO Ying(School of Software Engineering,Shenzhen Institute of Information Technology,Shenzhen,Guangdong,China 518172)
出处 《深圳信息职业技术学院学报》 2023年第6期35-42,共8页 Journal of Shenzhen Institute of Information Technology
基金 深圳信息职业技术学院校级科技项目(项目编号:SZIIT2022KJ060)。
关键词 IO框架 无锁 协程 cpu亲和性 IO framework unlocked collaborative process CPU affinity
  • 相关文献

参考文献1

共引文献6

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部