替换缓存对象的方法和装置制造方法及图纸

技术编号:9622139 阅读:198 留言:0更新日期:2014-01-30 12:17
本发明专利技术公开了一种替换缓存对象的方法和装置。该方法包括:接收需要存入缓存器的第一缓存对象;在该缓存器中保存的至少一个缓存对象的数量或占用的内存达到最大值时,获取该至少一个缓存对象中每个缓存对象的权重值;根据该每个缓存对象的权重值,确定该至少一个缓存对象中权重值最小的第二缓存对象;将该缓存器中保存的该第二缓存对象替换为该第一缓存对象。该装置包括:接收模块、获取模块、第一确定模块和替换模块。本发明专利技术实施例的替换缓存对象的方法和装置,基于每个缓存对象的权重值,通过替换权重值最小的缓存对象,能够去除最不可能被访问的缓存对象,提高缓存器的命中率,从而能够提高系统的性能。

Method and apparatus for replacing cache objects

The invention discloses a method and a device for replacing cache objects. The method includes: receiving a first cache object stored in the buffer; the number or occupation of at least one object stored in the buffer cache in the memory is the maximum, get the weight of each cache object the at least one cache object in value; according to the weight value of each slow memory object, determine the weight of the at least a cache object value second cache object minimum; will replace the second cache object saved in the buffer for the first cache object. The device comprises a receiving module, an acquisition module, a first determination module and a replacement module. Method and apparatus for replacing the cache object the embodiment of the invention, the weight of each cache object based on the value of the minimum weight value by replacing the cache object, can remove most cache objects may not be accessed, improve the hit rate of the cache, which can improve the system performance.

【技术实现步骤摘要】
【国外来华专利技术】

【技术保护点】

【技术特征摘要】
【国外来华专利技术】

【专利技术属性】
技术研发人员:郑辉
申请(专利权)人:华为技术有限公司
类型:
国别省市:

网友询问留言 已有0条评论
  • 还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。

1