执行程序的整个内存周期

Whole memory cycle in executing a program

我一直在思考在执行任何程序或查询时如何传递全部信息(data)。

我使用的下图扩展了我的假设:

你觉得我遗漏了什么吗?关于内存管理如何工作,我的假设是否正确?将不胜感激任何有用的评论。谢谢

我觉得你把太多东西混在一起了。

All data are stored in a disk storage.

在大多数基于磁盘的操作系统中,所有用户数据(有时是内核数据)都存储在磁盘(某处)并映射到内存。

The whole platter of the disk is divided into many sectors, and sectors are divided into blocks. Blocks are divided into pages, and pages are contain in a page table and sequence id.

没有

如今大多数磁盘都使用逻辑 I/O,因此软件只能看到块,而看不到磁道、扇区和盘片(就像过去那样)。

块只存在于磁盘上。页面只存在于内存中。块被分成页。

The most frequently used data are stored in cache for faster access.

有两种常见的缓存。我不知道你指的是哪个。一种是 CPU 缓存(硬件),另一种是由操作系统维护的软件缓存。

If data is not found in cache then program goes to check Main Memory and if page fault occurs, then it goes into disk storage.

没有

这听起来像是您指的是 CPU 缓存。读取页面 table.

时触发页面错误

Virtual Memory is used as a address mapping from RAM to Disk Storage.

逻辑内存映射用于将逻辑页映射到物理页框。虚拟内存用于将逻辑页面映射到磁盘存储。