Hierarchical Storage structure
1.hierarchical storage structure
This notion of inserting a smaller, faster storage device (e.g., cache memory)
between the processor and a larger slower device (e.g., main memory) turns out
to be a general idea. In fact, the storage devices in every computer system are
organized as a memory hierarchy similar to Figure 1.9. As we move from the top
of the hierarchy to the bottom, the devices become slower, larger, and less costly
per byte. The register file occupies the top level in the hierarchy, which is known
as level 0, or L0. We show three levels of caching L1 to L3, occupying memory
hierarchy levels 1 to 3. Main memory occupies level 4, and so on.
The main idea of a memory hierarchy is that storage at one level serves as a
cache for storage at the next lower level. Thus, the register file is a cache for the L1 cache. Caches L1 and L2 are caches for L2 and L3, respectively. The L3 cache
is a cache for the main memory, which is a cache for the disk. On some networked
systems with distributed file systems, the local disk serves as a cache for data stored on the disks of other systems.
The same data may appear in different levels of the storage system.For instance, data transfer from cache to CPU and registers is usually a hardware function, with no operating-system intervention. In contrast, transfer of data from disk to memory is usually controlled by the operating system.
In a hierarchical storage structure, the same data may appear in different
levels of the storage system. For example, suppose that an integer A that is to
be incremented by 1 is located in file B, and file B resides on a magnetic disk.
The increment operation proceeds by first issuing an I/O operation to copy the
disk block on which A resides to main memory. This operation is followed by
copying A to the cache and to an internal register. Thus, the copy of A appears
in several places: on the magnetic disk, in main memory, in the cache, and in an
internal register (see Figure 1.12). Once the increment takes place in the internal
register, the value of A differs in the various storage systems. The value of A
becomes the same only after the new value of A is written from the internal
register back to the magnetic disk.
In a computing environment where only one process executes at a time,
this arrangement poses no difficulties, since an access to integer A will always
be to the copy at the highest level of the hierarchy. However, in a multitasking
environment, where the CPU is switched back and forth among various
processes, extreme care must be taken to ensure that, if several processes wish
to access A, then each of these processes will obtain the most recently updated
he situation becomes more complicated in a multiprocessor environment
, where, in addition to maintaining internal registers, each of the
CPUs also contains a local cache. In such an environment, a copy of A may
exist simultaneously in several caches. Since the various CPUs can all execute
concurrently, we must make sure that an update to the value of A in one cache
is immediately reflected in all other caches where A resides. This situation is
called cache coherency, and it is usually a hardware problem (handled below
the operating-system level).
In a distributed environment, the situation becomes even more complex.
In this environment, several copies (or replicas) of the same file can be kept
on different computers that are distributed in space. Since the various replicas
may be accessed and updated concurrently, some distributed systems ensure
that, when a replica is updated in one place, all other replicas are brought up
to date as soon as possible. There are various ways to achieve this guarantee,
as we discuss in later.
Hierarchical Storage structure的更多相关文章
- 专题实验 Storage structure 物理存储
物理存储结构主要是指: extent的分配, 以及datablock 存储相关, 置于tablespace, segment 都是逻辑结构. tablespace : 逻辑结构, 没有实际物理存储. ...
- some notions about os
1. Multiprogramming system provide an environment in which the various resources (like CPU,memory,an ...
- Hierarchical Tree Traversal in Graphics Pipeline Stages
BACKGROUND Many algorithms on a graphics processing unit (GPU) may benefit from doing a query in a h ...
- Method and Apparatus for Providing Highly-Scalable Network Storage for Well-Gridded Objects
An apparatus comprising a plurality of storage nodes comprising a plurality of corresponding storage ...
- CreateFile函数详解
CreateFile函数详解 CreateFile The CreateFile function creates or opens the following objects and returns ...
- Win32<CreatFile>
CreateFile函数详解 CreateFile The CreateFile function creates or opens the following objects and returns ...
- CreateFile函数详解(确实很详细)
CreateFile The CreateFile function creates or opens the following objects and returns a handle that ...
- CreateFile函数使用方法详细介绍
CreateFileThe CreateFile function creates or opens the following objects and returns a handle that c ...
- MongoDB十二种最有效的模式设计【转】
持续关注MongoDB博客(https://www.mongodb.com/blog)的同学一定会留意到,技术大牛Daniel Coupal 和 Ken W. Alger ,从 今年 2月17 号开始 ...
随机推荐
- BZOJ 3669: [Noi2014]魔法森林( LCT )
排序搞掉一维, 然后就用LCT维护加边MST. O(NlogN) ------------------------------------------------------------------- ...
- codeforces 535D. Tavas and Malekas KMP
题目链接 又复习了一遍kmp....之前都忘光了 #include<bits/stdc++.h> using namespace std; #define pb(x) push_back( ...
- Linux例行工作crontab
第一步编辑要定时执行的脚本: myScript.sh myScript.sh的内容为:touch /root/`date +%F' '%T`.txt 为myScript.sh增加可执行权限:chmod ...
- 转: when.js原理和核心实现
这篇文章可以看作是屈屈同学关于when.js的文章<异步编程:When.js快速上手>的续篇. 屈屈的文章中详细介绍了when.js,在这里关于when.js的使用我就不多复述了,大家可以 ...
- MockObject
http://www.mockobjects.com/ http://jmock.org/download.html https://jakarta.apache.org/cactus/mock_vs ...
- java 获取随机数的三种方法
方法1(数据类型)(最小值+Math.random()*(最大值-最小值+1))例:(int)(1+Math.random()*(10-1+1))从1到10的int型随数 方法2获得随机数for (i ...
- android播放html5视频,仅仅有声音没有图像视频
在AndroidManifest.xm中l增加 <activity .... android:hardwareAccelerated="true" />
- JavaScript 实现Map
var map=new Map(); map.put("a","A");map.put("b","B");map.put ...
- 某IT校招笔试
前言 博主明天上午9点还有面试,今天突然看到某大牌IT公司笔试题目,必须做一下了 题目 1.假设把整数关键码K散列到N个槽列表,以下哪些散列函数是好的散列函数 A: h(K)=K/N; B: h(K) ...
- pcre函数具体解释
PCRE是一个NFA正则引擎,不然不能提供全然与Perl一致的正则语法功能.但它同一时候也实现了DFA,仅仅是满足数学意义上的正则. PCRE提供了19个接口函数,为了简介,使用PCRE内带的測试程序 ...