Page102
CISC and RISC
CISC (Complex Instruction Set Computer) and RISC (Reduced Instruction Set Computer) are two forms of CPU design. CISC uses a large set of complex machine language instructions, while RISC uses a reduced set of simpler instructions.
The “best” way to design a CPU has been a subject of debate: should the low-level commands be longer and more powerful, using fewer individual instructions to perform a complex task (CISC), or should the commands be shorter and simpler, requiring more individual instructions to perform a complex task (RISC), but allowing fewer cycles per instruction and more efficient code? There is no “correct” answer: both approaches have pros and cons. x86 CPUs (among many others) are CISC; ARM (used in many cell phones and PDAs), PowerPC, Sparc, and others are RISC.
Memory Addressing
Values may be stored in multiple locations in memory, including CPU registers and in general RAM. These values may be addressed directly (“add the value stored here”) or indirectly (“add the value stored in memory location referenced here”). Indirect addressing is like a pointer. Addressing modes are CPU-dependent; commonly supported modes include direct, indirect, register direct, and register indirect.
- Direct mode says “Add X to the value stored in memory location #YYYY.” That location stores the number 7, so the CPU adds X + 7.
- Indirect starts the same way: “Add X to the value stored in memory location #YYYY.” The difference is #YYYY stores another memory location (#ZZZZ). The CPU follows the pointer to #ZZZZ, which holds the value 7, and adds X + 7.
- Register direct addressing is the same as direct addressing, except it references a CPU cache register, such as Register 1.
- Register indirect is also the same as indirect, except the pointer is stored in a register.
Memory addressing summary.
Memory Protection
Memory protection prevents one process from affecting the confidentiality, integrity, or availability of another. This is a requirement for secure multiuser (more than one user logged in simultaneously) and multitasking (more than one process running simultaneously) systems.