Memory: CCEA Computer Science Key Points | CCEA计算机科学:存储器 考点精讲

📚 Memory: CCEA Computer Science Key Points | CCEA计算机科学:存储器 考点精讲

In CCEA Computer Science, memory is a fundamental topic covering how data and instructions are stored, accessed and managed in a computer system. Understanding the different types of memory, their characteristics, and how they interact with the processor is crucial for both theoretical knowledge and practical problem-solving.

在CCEA计算机科学中,存储器是一个基础主题,涵盖了数据与指令在计算机系统中如何存储、访问与管理。理解不同类型存储器的特性及其与处理器的交互方式,对于理论知识和实际问题解决都至关重要。

1. Memory Classification: Primary vs Secondary | 存储器的分类:主存与辅存

Memory can be broadly divided into primary (main) memory and secondary (backing) storage. Primary memory, such as RAM and ROM, is directly accessible by the CPU and holds currently running programs and data. It is fast but relatively expensive and usually volatile. Secondary storage, like hard drives and SSDs, provides non-volatile, long-term storage for files and applications.

存储器可大致分为主存储器(内存)和辅助存储器(外存)。主存如RAM和ROM,CPU可直接访问,用于存放正在运行的程序和数据;它速度快但相对昂贵,且通常为易失性。辅助存储器如硬盘和固态硬盘,则提供非易失性的长期文件与应用程序存储。

Another distinction is between volatile and non-volatile memory. Volatile memory loses its content when power is removed, while non-volatile memory retains data permanently. This classification directly affects the role each memory type plays in the system.

另一种区分是易失性与非易失性存储器。易失性存储器在断电时丢失内容,而非易失性存储器能永久保存数据。这一分类直接决定了各类存储器在系统中的角色。


2. Random Access Memory (RAM) and Read-Only Memory (ROM) | 随机存取存储器(RAM)与只读存储器(ROM)

RAM is the main working area for the CPU. It is volatile and used to store the operating system, applications and data currently in use. RAM is typically implemented using DRAM (Dynamic RAM) technology, which needs constant refreshing, or faster SRAM (Static RAM) used in cache.

RAM是CPU的主要工作区域。它是易失性的,用于存储当前正在使用的操作系统、应用程序和数据。RAM通常采用DRAM(动态RAM)技术,需持续刷新,或更快速的SRAM(静态RAM)用于高速缓存。

ROM, on the other hand, is non-volatile and contains firmware or the BIOS/UEFI that boots the computer. Unlike RAM, data in ROM cannot be easily modified. Variants like EPROM and EEPROM allow erasing and reprogramming with special procedures.

另一方面,ROM是非易失性的,包含固件或引导计算机的BIOS/UEFI。与RAM不同,ROM中的数据不易修改。如EPROM和EEPROM等变体则允许通过特殊方式擦除和重编程。

Addressing in RAM is direct: each memory cell has a unique address. The total number of addresses is determined by the address bus width. For a system with n address lines, the CPU can directly address 2ⁿ memory locations.

RAM的寻址是直接的:每个存储单元有唯一的地址。地址总线宽度决定了地址总数。对于具有n条地址线的系统,CPU可直接寻址2ⁿ个存储位置。


3. Cache Memory | 高速缓冲存储器

Cache memory is a small, extremely fast memory located close to or inside the CPU. It stores frequently accessed data and instructions to reduce the average time needed to access the main memory. Cache operates on the principle of locality of reference: temporal locality (reusing recently accessed items) and spatial locality (using data near recently accessed locations).

高速缓存是位于CPU附近或内部的小容量、极快存储器。它存储频繁访问的数据和指令,以减少访问主存的平均时间。缓存基于引用局部性原理运行:时间局部性(重用最近访问的项目)和空间局部性(使用最近访问位置附近的数据)。

Modern processors use multiple levels of cache: Level 1 (L1) is split into instruction and data caches and is the fastest but smallest; Level 2 (L2) is larger and slightly slower; Level 3 (L3) is shared among cores and even larger. Cache hit rate and miss penalty are key performance metrics.

现代处理器使用多级缓存:一级缓存(L1)分为指令缓存与数据缓存,速度最快但容量最小;二级缓存(L2)容量更大,速度稍慢;三级缓存(L3)在多核间共享,容量更大。缓存命中率和缺失代价是关键性能指标。

The mapping between main memory blocks and cache lines can be direct-mapped, fully associative or set-associative. Set-associative provides a balance between flexibility and hardware complexity.

主存块与缓存行之间的映射方式可以是直接映射、全相联或组相联。组相联在灵活性与硬件复杂度之间取得了平衡。


4. Virtual Memory | 虚拟内存

Virtual memory is a technique that allows the execution of processes that may not be completely in physical memory. It uses

Published by TutorHao | IB Computer Science Revision Series | aleveler.com

更多咨询请联系16621398022(同微信)

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading