Professional Documents
Culture Documents
For this week’s material, you will be introduced to the memory system and different instruction set
o Performance considerations
o Virtual Memory
o Secondary storage
o Memory operation
o Addressing modes
o Assembly language
The main memory of the computer system is a set of storage locations and their associated addresses.
Data transfer between memory units is done using words known as bits (i.e. 8, 16, 32, 64 bits…etc.)
The table below is a summary of the main memory units ranging from the smallest unit of a bit to
some of the larger units, sizes which are typically not seen on consumer level computers.
Memory units
o Volatile memory where data or stored programs are lost if the computer is shut down
o Memory is kept while the system is on and does not require refreshing
o In order to keep data stored in memory, the memory cells need periodic refreshing due
o Data and programs that are written into memory but cannot be modified
o Non-volatile memory, data/stored programs are not lost if the computer is shut down
o Memory that is initially blank but data and programs can only be written on it once
o After the data or programs are written, PROM functions like regular RAM
o Memory can be erased and reprogramed with the EPROM being removed from the
o Similar to PROM but memory can be erased and reprogrammed without physically
removing it
Direct Memory access is a data transfer mechanism that can bypass the CPU for the data
transfer operations
DMA reduces the need for the CPU to carry out these data transfer operations
DMA primarily is used for transfer between memory and the input/output hardware
The memory hierarchy describes the cost-speed benefits of memory as illustrated in the diagram be-
low. The bottom of the pyramid contains the memory types that have the largest capacity, slow speeds
and are the most cost-effective, while at the top contains the memory types with the smallest capacity,
Cache Memory
Cache memory is the second fastest and smallest form of memory behind the central processing unit’s
registers as indicated in the memory hierarchy diagram on the previous page. The cache is located
between the central processing unit and the main memory of the system. The role of cache memory
is to keep a copy of part of the systems main memory for the central processing unit to access at any
given time.
o Small and slower memory that can be embedded on the CPU or on a separate
chip
L1 and L2 caches
In order for programs to run efficiently on the operating system there is a need to manage the use of
secondary memory within the computer system. Virtual memory provides the system the ability to
use secondary memory ‘virtually’ as if it were main memory. Through a system of demand paging
and segmentation, the operating system can temporarily move data and programs back and forth be-
tween secondary and main memory. This process is known as multiprogramming allows the user to
perform multiple tasks or run several applications simultaneously. A drawback of virtual memory is
that it does not offer the same benefits as secondary memory and can reduce system performance and
stability. The following section will describe in more depth the processes involved and the perfor-
mance considerations.
Virtual Memory
As computers have become smaller, more complex and require more space and memory for data and
running applications, the operating system needs to have a process of effectively managing memory
on a system. This process should be able to prevent associated performance bottlenecks of available
memory. There are a variety of techniques that the operating systems can use to address this issues in
Monoprogramming is a memory management technique that was primarily used in the early ages of
computers where only single tasks at a time were required to be executed by the computer. With this
technique, the majority of the available memory needed to run a program is used by that program.
While the program is being executed, all of it is stored in memory and must complete its tasks prior
to that space being used by a new program. Monoprogramming is a form of memory management is
not suitable for the current standards of computers. Modern computers require flexible multitasking
for users and the ability to handle of a large set of processes and programs at the same time, something
Types of multiprogramming
Partitioning
Paging
Demand paging
o Once the page is executed, the next page can follow the same process
Demand segmentation
o Once the segment is executed another module can follow the same process
The table below summarizes the different memory management techniques that were previously de-
scribed.
SECONDARY STORAGE
As opposed to primary storage, secondary storage is non-volatile storage for programs and data that
need to be preserved when the computer is shut down. The main categories of secondary storage for
modern computers are magnetic storage, optical storage, flash-based storage and network-based stor-
age.
Magnetic storage
Magnetic disk
o Data is stored to, written to and read from the magnetized surface of the disk
Magnetic tape
o Data is stored to, written to and read from the magnetized surface of the tape reel
Tape reel
Floppy disks
Zip drives
Magnetic storage devices are prone to forms of physical damage including damage to moving parts
Optical storage
CD – Compact Disk (with a storage capacity between 650 and 700 megabytes)
DVD – Digital Versatile Disk (with a storage capacity of 4.7 gigabytes (single-layer) and
Blu-Ray – (with a varied storage capacity dependent on disk standard, but typically 25 giga-
Flash storage
Examples of flash storage devices are flash drives such as Universal Serial Bus (USB) flash drives,
Secure Digital (SD), Secure Digital High Capacity (SDHC) and Secure Digital Extended Capacity
(SDXC) memory cards, Solid State Drives (SSD), Solid State Hybrid Drives (SSHD) and Non-vola-
tile Memory Express (NVMe) storage attached to a peripheral component interconnect express (PCIe)
via network cable or through the wireless connection of a router or an access point.
NAS devices are storage hardware (HDD, SSD…etc.) with networking capabilities
and can be configured to provide access to data over a local network and the internet.
Cloud storage
Cloud storage is simply additional storage that can be rented at a fee or provided free as a
service over the internet. This means that the infrastructure that houses the hardware stor-
age devices is located elsewhere and the user has to connect to the online service to access
their data. Typically, cloud storage makes use of physical hardware including HDDs and
The key components of the instruction sequencing are contained within the CPU, the Main Memory
and the Input/Output Module. The steps for the process and the definitions for each of the listed
Main Memory
CPU Instruction
Instruction
PC MAR
Instruction
MBR ………………………
IR
Data
I/O AR
Execution Data
Unit I/O BR
Data
………………………
I/O Module
……………
Buffers….
Key components
PC – Program Counter
o Stores the value of the address (location of the address value in memory for data
IR – Instruction Register
Execution Unit
o The address value of the instruction will be transferred to the memory address
register
o Memory buffer register then transfers the instruction to the instruction register
o Fetched instruction is decoded and split up into two the operand and the opera-
tion
Step 4 – Execution
ADDRESSING MODES
Absolute
PC-relative
Register-indirect
Register
Immediate
Implicit
Scaled
Register indirect
Memory indirect
PC-relative
ASSEMBLY LANGUAGE
An assembly language also known as ASM, is a low-level programming language for a type of pro-
cessor. The ASM is designed to meet the requirements of a particular instruction set architecture,
therefore there are a variety of assembler languages that exist. The assembler is the executable pro-
gram that carries out the task of converting the assembly program into machine. The code that is
written is in a human-readable format and as a low-level language, each instruction is precise and
handles only one machine instruction. This makes it ideal for the programmer as they have full control
over the functions of the computer. In addition, due to the level of abstraction in assembly language,
2015).
Complex Instruction Set Computer (CISC) vs Reduced Instruction Set Computer (RISC)
CISC based architecture describes that the central processing unit should be able to execute a large
set of complex machine instructions regardless of whether all of them are useful or relevant. This
approach to architecture design claims that a design as such would be able flexible enough to handle
on-going increases in complexity. RISC based architecture describes that the central processing unit
should be able to execute a small set of machine instructions. This approach to architecture design
claims that the CPU will run efficiently, faster and will be relatively cheap to produce (Brookshear &
Brylow, 2015).
General principles for CISC and RISC based computer architecture designs
REFERENCES
Abd-El-Barr, M., & El-Rewini, H. (2005). Fundamentals of Computer Organization and Architecture
Brookshear, J. G., & Brylow, D. (2015). Computer Science: An Overview (12th Edition). Pearson
Education.
Stair, R., & Reynolds, G. (2017). Fundamentals of Information Systems (9th ed.). Cengage Learning.