Mwamba Cuthbert
Mwamba Cuthbert
Mwamba Cuthbert
Questions:
Memory is the most essential component of the normal functioning of any system. The
computer system for instance, categorizes the memory for different purposes and uses. In this
assignment we have discussed the memory in a little bit. Also, we have discussed special types
of memories and their applications.
What is memory?
Memory is any physical device, used to store data, information or instruction temporarily or
permanently. It is the collection of storage units that stores binary information in the form of
bits. The memory block is split into a small number of components, called cells. Each cell has
a unique address to store the data in memory, ranging from zero to memory size minus one.
For example, if the size of computer memory is 64k words, the memory units have 64 × 1024
= 65536 locations or cells. The address of the memory's cells varies from 0 to 65535.
In the any system, we need memory to store various types of data like text, images, video,
audio, documents. We can retrieve it when the data is required. For example, when we write
and execute any computer program, it is initially stored in primary memory. If the processor
does not need particular items for a longer time, the program or data is automatically saved
into the permanent or secondary memory. Then the data is called from secondary memory to
main memory and performs the execution of codes.
Features of Memory
Following are the different features of the memory system that includes:
a. Location:
It represents the internal or external location of the memory in a computer. The internal memory
is inbuilt in computer memory. It is also known as primary memory. the example of primary
memory are registers, cache and main memory. Whereas, external memory is the separate
storage device from the computer, such as disk, tape, USB pen drive.
b. Capacity:
It is the most important feature of computer memory. Storage capacity can vary in external and
internal memory. External devices' storage capacity is measured in terms of bytes, whereas the
internal memory is measured with bytes or words. The storage word length can vary in bits,
such as 8, 16 or 32 bits.
c. Access Methods:
i. DMA:
As the name specifies, Direct Memory Address (DMA) is a method that allows
input/output (I/O) devices to access or retrieve data directly or from the main
memory.
ii. Sequential Access Method:
The sequential access method is used in a data storage device to read stored data
sequentially from the computer memory. Whereas, the data received from random
access memory (RAM) can be in any order.
iii. Random Access Method:
It is a method used to randomly access data from memory. This method is the
opposite of SAM. For example, to go from A to Z in random access, we can directly
jump to any specified location. In the Sequential method, we have to follow all
intervening from A to Z to reach at the particular memory location.
iv. Associative Access Method:
It is a special type of memory that optimizes search performance through defined
data to directly access the stored information based on a memory address.
d. Unit of transfer:
As the name suggests, a unit of transfer measures the transfer rate of bits that can be read or
write in or out of the memory devices. The transfer rate of data can be different in external and
internal memory.
i. Internal memory:
The transfer rate of bits is mostly equal to the word size.
ii. External memory:
The transfer rate of bit or unit is not equal to the word length. It is always greater than
a word or may be referred to as blocks.
e. Performance:
i. Access Time:
In random access memory, it represents the total time taken by memory devices to
perform a read or write operation that an address is sent to memory.
ii. Memory Cycle Time:
Total time required to access memory block and additional required time before
starting second access.
iii. Transfer rate:
It describes the transfer rate of data used to transmit memory to or from an external
or internal memory device. Bit transfer can be different for different external and
internal devices.
f. Physical types:
It defines the physical type of memory used in a computer such as magnetic, semiconductor,
magneto-optical and optical.
g. Organization:
h. Physical characteristics:
It specifies the physical behavior of the memory like volatile, non-volatile or non-erasable
memory. Volatile memory is known as RAM, which requires power to retain stored
information, and if any power loss has occurred, stored data will be lost. Non-volatile memory
is a permanent storage memory that is used to obtain any stored information, even when the
power is off. Non-erasable memory is a type of memory that cannot be erased after the
manufactured like ROM because at the time of manufactured ROM are programmed.
Types of Special Memories
FIFO stands for First-In First-Out, in which we will enter the data elements into the data
structure; the data element added at last in any data structure will be removed out last and the
element added first will be removed first. Here, we treat the data elements with a fair chance;
the element which has entered first will get the opportunity to leave first. The other name we
call First Come First Serve is implemented using the data structure named a queue. Thus, FIFO
refers to the basic operation of this type of memory, in which the first data bit written into the
memory is the first to be read out.
This type of memory is formed by an arrangement of shift registers. One important difference
between conventional and FIFO shift register is this; in a conventional register, a data bit moves
through the register only as new data bits are entered but in a FIFO register, a data bit
immediately goes through the register to the right-most bit location that is empty.
Consider a block diagram of a FIFO serial memory below.
This particular memory has four serial 64-bit data registers and a 64-bit control register (marker
register). When data are entered by a shift-in pulse, they move automatically under control of
the marker register to the empty location closest to the output. Data cannot advance into
occupied positions. However, when a data bit is shifted out by a shift-out pulse, the data bits
remaining in the registers automatically move to the next position toward the output. In an
asynchronous FIFO, data are shifted out independent of data entry, with the use of two separate
clocks.
Advantages of FIFO
i. Predictable behavior:
FIFO guarantees that data is processed in the sequence in which it was received. This
predictability is critical in applications that require chronological order, such as real-
time systems and message queues.
ii. Fairness:
Because it handles all items equally, FIFO is naturally fair. It is appropriate for cases
where fairness is required, such as job scheduling in an operating system, because no
element is favored over another.
iii. Simplicity:
Because FIFO is very simple to implement, it is an excellent solution for applications
where data management must be as basic as possible.
iv. Cache performance:
In circumstances where cache performance is crucial, FIFO can perform well. When
data pieces are accessed sequentially, it can demonstrate good cache behavior.
Applications of FIFO
FIFO (First-In-First-Out) is a method used in computer systems for managing data structures,
scheduling processes, and handling various types of queues. The following are common
applications of FIFO in computer systems;
v. Memory Management:
In operating systems, FIFO is used in memory management algorithms such as page
replacement. When a page needs to be replaced in memory, the FIFO algorithm selects
the page that has been in memory the longest (i.e., the first page that was brought into
memory). This ensures fairness in accessing memory resources.
vi. Buffering:
FIFO is frequently used in buffering data, especially in networking and input/output
(I/O) operations. For example, in networking devices like routers and switches, FIFO
queues are often employed to manage incoming and outgoing data packets. In I/O
operations, FIFO buffers are used to temporarily store data until it can be processed.
vii. Task Scheduling:
FIFO scheduling is a simple scheduling algorithm where tasks are executed based on
their arrival time. In real-time systems or embedded systems, FIFO scheduling can be
useful for managing tasks with predictable behavior and fixed deadlines.
viii. Disk Scheduling:
In disk scheduling algorithms, FIFO can be applied to schedule disk accesses. Requests
for disk reads or writes are serviced in the order they arrive, regardless of their location
on the disk. While FIFO is simple to implement, it may not always provide optimal
performance compared to more sophisticated scheduling algorithms like Shortest Seek
Time First (SSTF) or SCAN.
ix. Cache Replacement:
FIFO is sometimes used as a cache replacement policy, especially in hardware caches.
When a cache is full and a new item needs to be stored, the item that has been in the
cache the longest (i.e., the first item that was cached) is replaced by the new item.
FIFO is a fundamental concept in computer systems and finds application in various areas
where data needs to be managed in the order of its arrival. Its simplicity and ease of
implementation make it a popular choice for certain use cases, although more complex
algorithms may be necessary for optimizing performance in specific scenarios.
The LIFO (last in–first out) memory is found in applications involving microprocessors and
other computing systems. It allows data to be stored and then recalled in reverse order; that is,
the last data byte to be stored is the first data byte to be retrieved. Here we enter the data
elements into the data structure, and then we will pop out the data elements which are recently
added, that’s the last element will be the first to be popped out.
The data structure, which is based on the LIFO principle, is a stack. We mainly perform two
operations on it, push and pop. Push operation is used to push the data element into the stack,
and pop operation is used to pop out the data elements from the stack.
i. Register Stacks
Notice that the new data byte is always loaded into the top register and the previously stored
bytes are pushed deeper into the stack. The name push-down stack comes from this
characteristic. Then Data bytes are retrieved in the reverse order. The last byte entered is always
at the top of the stack, so when it is pulled from the stack, the other bytes pop up into the next
higher locations. This process is demonstrated below;
ii. RAM Stack
As for a register stack the data move up or down from one location to the next. In a RAM stack,
the data do not move but the top-of-stack moves under control of a register called the stack
pointer. Consider a section of RAM set aside for use as a stack. A special separate register, the
stack pointer, contains the address of the top of the stack, as exemplified in figure below. A 4-
digit hexadecimal representation is used for the binary addresses. In the figure, the addresses
are chosen for purposes of illustration.
PUSH Operation
The stack pointer is initially at address FFEE16, which is the top of the stack as shown in figure
above.
The stack pointer is then decremented (decreased) by two to FFEC16. This moves the top of
the stack to a lower memory address, as shown above. Notice that the top of the stack is not
stationary as in the fixed register stack but moves downward (to lower addresses) in the RAM
as data words are stored. Figure above shows that two bytes (one data word) are then pushed
onto the stack. After the data word is stored, the top of the stack is at FFEC16.
POP Operation
The last data word stored in the stack is read first. The stack pointer that is at FFEC is
incremented (increased) by two to address FFEE16 and a POP operation is performed as shown
below. Keep in mind that RAMs are nondestructive when read, so the data word still remains
in the memory after a POP operation. A data word is destroyed only when a new word is written
over it.
Applications of LIFO
The CCD (charge-coupled device) memory stores data as charges on capacitors and has the
ability to convert optical images to electrical signals. Unlike the DRAM, however, the storage
cell does not include a transistor. High density is the main advantage of CCDs, and these
devices are widely used in digital imaging.
The CCD memory consists of long rows of semiconductor capacitors, called channels. Data
are entered into a channel serially by depositing a small charge for a 0 and a large charge for a
1 on the capacitors. These charge packets are then shifted along the channel by clock signals
as more data are entered.
As with the DRAM, the charges must be refreshed periodically. This process is done by shifting
the charge packets serially through a refresh circuit. Figure below shows the basic concept of
a CCD channel. Because data are shifted serially through the channels, the CCD memory has
a relatively long access time. CCD arrays are used in many modern cameras to capture video
images in the form of light-induced charge.
Advantages of CCD
i. High Sensitivity:
CCDs (Charge-Coupled Devices) are highly sensitive to light, making them ideal for
capturing clear images even in low-light conditions. They can convert photons into
electrical charges with high efficiency, allowing for the detection of faint signals.
ii. Large Dynamic Range:
CCDs have a large dynamic range, which means they can accurately capture both bright
and dark areas in an image without losing detail. This feature is essential for
applications where a wide range of light intensities need to be recorded.
iii. Linearity:
CCDs offer a linear response to light intensity, meaning that the output signal is directly
proportional to the amount of light hitting the sensor. This linearity makes it easier to
calibrate and interpret the data captured by the CCD.
iv. Low Noise:
CCDs produce images with low noise levels, resulting in high-quality and clear pictures.
The low noise characteristics of CCDs make them suitable for applications where image
fidelity is crucial.
v. Quantum Efficiency:
CCDs have a high quantum efficiency, typically around 80%. This means that they can
efficiently convert incoming photons into electrical signals, maximizing the sensor’s
sensitivity to light.
References: