期刊文献+

Go语言并发安全的Map探索及研究

Exploration and Research of the Map of Concurrent Security in Golang
下载PDF
导出
摘要 在云原生领域,大多数项目都是用Go语言开发的,而Go语言标准库中的Map又是开发过程中常用的内置数据结构。但是,在官方的设计中,Map并不是一种并发安全的数据类型。因此,该文首先介绍了Map的设计,分析了它不是并发安全的原因,其次论述了并发安全的Map的实现方式,包括加锁、Go官方的sync.Map以及自己通过分片加锁实现的方式,并设计了两大类实验,对这几种实现方式进行基准测试,最后根据测试结果进行了分析与技术选型的建议。 In the cloud-native field,most projects are developed in Golang,and the Map in the Golang standard library is a commonly used built-in data structure in the development process.However,in the official design,Map is not a data type of concurrent security.Therefore,this article introduces the design of Map,analyzes the reason why it is not concurrent security,next introduces the implementation of the Map of concurrent security,including locking,Go's official sync.Map and its own way of implementing it through shard locking,then designs two types of experiments to benchmark these implementations,and finally conducts the analysis and recommends technical selection based on test results.
作者 阮正平 蒋林峰 RUAN Zhengping;JIANG Linfeng(Aostar Information Technologies Co.,Ltd.,Chengdu,Sichuan Province,610041 China)
出处 《科技资讯》 2023年第14期22-27,共6页 Science & Technology Information
关键词 Golang并发安全 sync.Map 分片加锁实现 实验设计 技术选型 Golang concurrent security sync.Map Shard locking implementation Experimental design Technical selection
  • 相关文献

参考文献9

二级参考文献84

  • 1邢承杰,宋式斌,林莉,杨旭.LoadRunner在系统性能优化中的应用[J].中山大学学报(自然科学版),2009,48(S1):301-304. 被引量:7
  • 2高金波,窦文.LoadRunner在EJB自动化测试中的应用[J].计算机与数字工程,2006,34(12):132-134. 被引量:3
  • 3杨萍,李杰.利用LoadRunner实现Web负载测试的自动化[J].计算机技术与发展,2007,17(1):242-244. 被引量:29
  • 4Barabanov, Yodaiken. Real-Time Linux . Linux Journal, Mar.1996.
  • 5Hill R ,Srinivasan B,Pather D S. Niehaus Temporal Resolution andReal-Time Extension to Linux:[Techn/cal Report ITTC-FY98-TR-11510-03]. Information and Telecommunication Technology Center. Electrical Engineering and Computer Science Departmaent, University of Kansas. June 1998.
  • 6Ishlwata Y, ART Linux. http://www. etl. go. jp/etl/robotics/Projects/ART-Linux/.Jan. 2001.
  • 7Tanenbaum A S, Woodhull A S. Operation Systems Design and Implementation, Second Edition. Prentice-Hall, 1997. 147-148.
  • 8Lamport L. The Mutual Exclusion Problem. Joural of the ACM, April 1986.
  • 9Sha L, Rajkumar R, Lehoczky J P. Priority Inheritance Protocols : An Approach to Real-Time Synchronization. IEEE Transactions On Computers, Sep. 1990.
  • 10IA-32 Intel Architecture. Software Developer's Manual Volume ;3 : System Programming Guide,2001.

共引文献61

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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