Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1755341
  • 博文数量: 335
  • 博客积分: 4690
  • 博客等级: 上校
  • 技术积分: 4341
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-08 21:38
个人简介

无聊之人--除了技术,还是技术,你懂得

文章分类

全部博文(335)

文章存档

2016年(29)

2015年(18)

2014年(7)

2013年(86)

2012年(90)

2011年(105)

分类: DB2/Informix

2013-06-21 15:34:58

博客写了一大半,结果一不小心全丢失了,悲剧了,只能重新理思路,重新开始。
说到cache,大家肯定感到很是熟悉,但是这里讨论的是CF的cache。
cache作为CF structure主要结构,其作用自是很重要。cache,单从字面理解,还是很好理解的,但是,当DSG引入以后,cache的功能就略微发生了变化,
主要的功能如下:
提供数据的高速访问,这也是cache的本意
提供数据的一致性(consistency)
现在就让我们慢慢揭开CF cache的神秘面纱^_^~^_^
一个cache system的组成;

点击(此处)折叠或打开

  1. Cache structure (CF)
  2. Permanent storage (DASD)
  3. Local cache buffers( DBM1 )
  4. Local cache vector (HSA )
上述4个组件之间的关系:(1 2 3,之间共同的I/O单位 1 data item = 1 page = 4kb

上述4个组件中,local buffer pool,我们在前面的博客中介绍过。permanent storage 相对必要简单,不在介绍,local vector其实就是一个标志位,1 bit map to 1 data item 
介绍了cache system,现在介绍cache  structure,其实说白了,更简单了,主要包含 directory entry,data entry

但是看似简单,其实未必简单,需要自己好好的咀嚼哟
directory (entry) : 就是一个entry,它包含了控制信息,这些控制信息包含cache user所共享的 data item的信息

点击(此处)折叠或打开

  1. Directory — The directory is a directory for the cache structure where the
  2. system keeps control information about data items shared among cache users.
directory与 data  item之间 是1:1 的关系,也就是一个一个directory管理一个page,
一个cache structure中一旦存在一个directory对应一个 data item,我们就说 system assigned one directory to  one data item
一旦 data item 可以被 cache structure  ‘identified’ ,每一个cache user在自己的local vector 都会收到通知,该通知标识着cache user  data item 是否valid。
需要说明是,cache所对应的 data item 不一定在cache  structure。

点击(此处)折叠或打开

  1. When a data item is identified to the cache structure, each user
  2. receives notification through the local cache vector about the validity of the data
  3. item. The data item does not need to reside in the cache structure for the system
  4. to indicate through the local cache vector whether the data item has been
  5. changed. As long as the data item is identified by a directory entry, the system
  6. can indicate to users that the data item associated with the directory entry has
  7. been changed and is therefore no longer valid. A cache structure that contains
  8. directory entries but no data items is referred to as a “directory-only” cache.
data entry: 所谓的data entry就是cache structure中的一段连续内存,用来存储cache user 写入的 data item。
针对cache structure中的data item,针对不同的CF LEVEL,一个多个data entry可以若干个data elements
我们知道一个 data item 包含多个 data element,根据上面可以推知, data element =4096 kb
 data item = 1 data element

点击(此处)折叠或打开

  1. The fixed size of each data element is defined when the structure is allocated and cannot be changed for the life of the structure.
  2. When a user writes a data item to the structure for the first time, the user
  3. specifies the number of data elements that are associated with the data entry.
此致,关于CF cache structure 的结构就已经介绍完了,下面开始介绍相关的运行机制涉及的相关概念。
cast out/casting out : 就是讲cache structure 中的 changed data item写入local buffer pool,然后写入permanent storage的过程。
cast-out  class :每一个data item都会被assigned 一个cast out class。cast-out class的目的是将具有相同特征的 data item group到一起,简化 castout process。(使用与 stored-in  directory)
cast out lock ,data item在cast out的过程中,需要只有 cast out lock,cache user只有在拿到 cast out lock后才能 cast out 对应的data item

点击(此处)折叠或打开

  1. Any user can still make updates to the data item even when the data item is locked for cast out.
changed data item: 一旦数据被updated后,对应的data item的状态就变成了changed data item。所谓数据是否为 changed item,主要是数据是否同permanent storage version 一致,一致则为unchanged   data item,否则为changed item。
deregister/deregistering interest :一种用来表示cache user 中的数据是否 valid的方式。

点击(此处)折叠或打开

  1. Users
  2. with registered interest in a data item can have their interest deregistered if
  3. the data item has changed and the local copy of the data is no longer valid.
  4. When a shared data item is updated, the system indicates to interested users,
  5. through the users' associated local cache vector entry, that the data item has
  6. been changed. The copy of the data item in users' local cache buffer is then
  7. considered not valid. This process is also referred to as invalidation of local
  8. cache copies of data items
reclaim : 其实说白就是空间的重复利用

点击(此处)折叠或打开

  1. The management of resources in the cache structure. When a user writes a data
  2. item to the cache structure and a resource like a directory entry or data entry is
  3. unavailable, the system attempts to reclaim an existing directory entry or data
  4. entry to satisfy the request. Not all resources are available for reclaim. For
  5. example, a data entry containing changed data cannot be reclaimed. Reclaim is
  6. implemented through the association of data items with storage classes. Users
  7. can define a reclaim vector and use IXLCACHE to control reclaim processing.
  8. Otherwise, a system default for reclaim is in effect.
registration/registering interest 该定义同deregister 的定义类似,也是cache user用来表示 
休息一下,有点累了。
TO BE CONTINUED 
REF:
mvs  sysplex  services guide








阅读(2160) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~