Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Kalinga University Department of Computer Science

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Kalinga University

Department of Computer Science

Course: MCA Sem-1st


Subject: Computer Organization Architecture
Subject Code: MCA105

Unit 4

Memory
Basic Concept & Heirarchy
• A computer is an electronic device that accepts data from the user, processes it, produces
results, displays them to the users, and stores the results for future usage.
• Data is a collection of unorganized facts & figures and does not provide any further
information regarding patterns, context, etc. Hence data means "unstructured facts and
figures".
• Information is a structured data i.e. organized meaningful and processed data. To process
the data and convert into information, a computer is used.

Functions of Computers

A computer performs the following functions −

 Receiving Input
Data is fed into computer through various input devices like keyboard, mouse, digital pens, etc.
Input can also be fed through devices like CD-ROM, pen drive, scanner, etc.
 Processing the information
Operations on the input data are carried out based on the instructions provided in the programs.
 Storing the information
After processing, the information gets stored in the primary or secondary storage area.
 Producing output
The processed information and other details are communicated to the outside world through
output devices like monitor, printer, etc.
Computer memory refers to storage area where data is stored. It is of two types −
1. Primary Memory
2. Secondary Memory

• A memory is just like a human brain. It is used to store data and instructions. Computer
memory is the storage space in the computer, where data is to be processed and instructions
required for processing are stored. The memory is divided into large number of small parts called
cells. Each location or cell has a unique address, which varies from zero to memory size minus
one. For example, if the computer has 64k words, then this memory unit has 64 * 1024 = 65536
memory locations. The address of these locations varies from 0 to 65535.
• Memory is primarily of three types −
1. Cache Memory
2. Primary Memory/Main Memory
3. Secondary Memory
Semiconductor RAM Memories

• Semiconductor memories are available in a wide range of speeds. Their cycle times range
from l00ns to less than 10 ns.
INTERNAL ORGANIZATION OF MEMORY CHIPS:
Memory cells are usually organized in the form of an array, in which each cell is capable of
storing one bit of information
• Each row of cells constitutes a memory word, and all cells of a row are connected to a
common line referred to as the word line, which is driven by the address decoder on the chip.
The cells in each column are connected to a Sense/Write circuit by two bit lines. The
Sense/Write circuits are connected to the data input/output lines of the chip. During a Read
operation, these circuits sense, or read, the information stored in the cells selected by a word line
and transmit this information to the output data lines. During a Write operation, the Sense/Write
circuits receive input information and store it in the cells of the selected word.
• It is an example of a very small memory chip consisting of 16 words of 8 bits each. This
is referred to as a 16 x 8 organization. The data input and the data output of each Sense/Write
circuit are connected to a single bidirectional data line that, can be connected to the data bus of a
computer. Two control lines, R/W and CS, are provided in addition to address and data lines.
The R/W (Read/Write ) input specifies the required operation, and the CS (Chip Select) input
selects a given chip in a multichip memory system.
• The memory circuit in Figure 4.2 stores 128 bits and requires 14 external connections for
address, data, and control lines. Of course, it also needs two lines for power supply and ground
connections. Consider now a slightly larger memory circuit, one that has l K (1024) memory
cells.
• This circuit can be organized as a 128 x 8 memory, requiring a total of 19 external
connections. Alternatively, the same number of cells can be organized into a l K x 1 format. In
this case, a 100bit address is needed, but there is only one data line, resulting in 15 external
connections
• The required 100bit address is divided into two groups of 5 bits each to form the row and
column addresses for the cell array. A row address selects a row of 32 cells, all of which are
accessed in parallel. However, according to the column address, only one of these cells is
connected to the external data line by the output multiplexer and input demultiplexer. For an
example, a 4M-bit chip may have a 512K x 8 organization, in which case 19 address and 8 data
input/output pins are needed.
2D & 1/2D memory organization

Internal structure of Memory either RAM or ROM is made of memory cells which contains a
memory bit. Basically group of 8 bits makes a word. Now the memory is formed in
multidimensional array of rows and columns. In which each cell stores a bit and a complete row
contains a word. A memory simply can be divided in this below form.

2n = N

where,n is the no. of address lines and N is the total memory in bytes.

There will be 2n words.


2D Memory organization –

Basically in 2D organization memory is divides in the form of rows and columns. Each row
contains a word now in this memory organization there is a decoder. A decoder is a
combinational circuit which contains n input lines and 2n output lines. One of the output line will
select the row which address is contained in the MAR. And the word which is represented by the
row that will get selected and either read or write through the data lines.

2.5D Memory organization –

In 2.5D Organization the scenario is the same but we have two different decoders one is column
decoder and another is row decoder. Column decoder used to select the column and row decoder
is used to select the row. Address from the MAR will go in decoders’ input. Decoders will select
the respective cell. Through the bit outline, the data from that location will be read or through the
bit in line data will be written at that memory location.
ROM Memories
ROM stands for Read Only Memory. The memory from which we can only read but cannot
write on it. This type of memory is non-volatile. The information is stored permanently in such
memories during manufacture. A ROM stores such instructions that are required to start a
computer. This operation is referred to as bootstrap. ROM chips are not only used in the
computer but also in other electronic items like washing machine and microwave oven.
MROM (Masked ROM)
The very first ROMs were hard-wired devices that contained a pre-programmed set of data or
instructions. These kind of ROMs are known as masked ROMs, which are inexpensive.
PROM (Programmable Read Only Memory)
PROM is read-only memory that can be modified only once by a user. The user buys a blank
PROM and enters the desired contents using a PROM program. Inside the PROM chip, there are
small fuses which are burnt open during programming. It can be programmed only once and is
not erasable.
EPROM (Erasable and Programmable Read Only Memory)
EPROM can be erased by exposing it to ultra-violet light for a duration of up to 40 minutes.
Usually, an EPROM eraser achieves this function. During programming, an electrical charge is
trapped in an insulated gate region. The charge is retained for more than 10 years because the
charge has no leakage path. For erasing this charge, ultra-violet light is passed through a quartz
crystal window (lid). This exposure to ultra-violet light dissipates the charge. During normal use,
the quartz lid is sealed with a sticker.
EEPROM (Electrically Erasable and Programmable Read Only Memory)
EEPROM is programmed and erased electrically. It can be erased and reprogrammed about ten
thousand times. Both erasing and programming take about 4 to 10 ms (millisecond). In
EEPROM, any location can be selectively erased and programmed. EEPROMs can be erased one
byte at a time, rather than erasing the entire chip. Hence, the process of reprogramming is
flexible but slow.

Advantages of ROM
• The advantages of ROM are as follows −
• Non-volatile in nature
• Cannot be accidentally changed
• Cheaper than RAMs
• Easy to test
• More reliable than RAMs
• Static and do not require refreshing
• Contents are always known and can be verified

Cache Memory
Concept & Design Issues & Performance
Computer Design is the structure in which components relate to each other. The designer deals
with a particular level of system at a time and there are different types of issues at different
levels. At each level, the designer is concerned with the structure and function. Structure is the
skeleton of the various components related with each other for the communication. Function is
the activities involved in the system.
Following are the issues in computer design:
1. Assumption of infinite speed:
It can’t be assumed infinite speed of computer as it is not practical to assume the infinite speed.
It creates problem in designer’s thinking as well.
2. Assumption of infinite Memory:
Like speed of the computer, memory also can’t be assumed infinite. Storage is always finite and
this is a issue in computer design.
3. Speed mismatch between memory and processor:
Sometimes it is possible that the speed of memory and processor does not match. It may be
memory speed is faster or processor speed is faster. Mismatch between memory and processor
leads to create problem in designing.
4. Handling of bugs and errors:
Handling of bugs and errors are huge responsibility of any computer designer. Bugs and errors
lead to the failure of computer system. Sometimes these errors may be more dangerous.
5. Multiple processors:
Designing a computer system with multiple processors leads to the huge task of management and
programming. It is big issue in computer designing.
6. Multiple threads:
A computer system with multiple threads are always threats to the designer. A computer with
several threads should be able for multi-tasking and multi-processing.
7. Shared memory:
If there are several processes to be executed at a time then all the processes share the same
memory space. It should be managed in specific way so that collision does not happen.
8. Disk access:
Disk management is the key for computer design. There are several issues in disk accessing. It
may be possible that system does not support multiple disk accessing.
9. Better performance:
It is always a issue. Designer always tries to simplify the system for better performance in
reduces power and less cost.
Address mapping & Replacement
The transformation of data from main memory to cache memory is called mapping. There are 3
main types of mapping:
• Associative Mapping
• Direct Mapping
• Set Associative Mapping
Associative Mapping
The associative memory stores both address and data. The address value of 15 bits is 5 digit octal
numbers and data is of 12 bits word in 4 digit octal number. A CPU address of 15 bits is placed
in argument register and the associative memory is searched for matching address.

Direct Mapping
The CPU address of 15 bits is divided into 2 fields. In this the 9 least significant bits constitute
the index field and the remaining 6 bits constitute the tag field. The number of bits in index field
is equal to the number of address bits required to access cache memory.

Set Associative Mapping


• The disadvantage of direct mapping is that two words with same index address can't
reside in cache memory at the same time. This problem can be overcome by set associative
mapping.
• In this we can store two or more words of memory under the same index address. Each
data word is stored together with its tag and this forms a set.

Replacement Algorithms
• Data is continuously replaced with new data in the cache memory using replacement
algorithms. Following are the 2 replacement algorithms used:
1. FIFO - First in First out. Oldest item is replaced with the latest item.
2. LRU - Least Recently Used. Item which is least recently used by CPU is
removed.
LRU - Least Recently Used
In Least Recently Used (LRU) algorithm is a Greedy algorithm where the page to be replaced is
least recently used. The idea is based on locality of reference, the least recently used page is not
likely
Let say the page reference string 7 0 1 2 0 3 0 4 2 3 0 3 2 . Initially we have 4 page slots empty.
Initially all slots are empty, so when 7 0 1 2 are allocated to the empty slots —> 4 Page faults
0 is already their so —> 0 Page fault.
when 3 came it will take the place of 7 because it is least recently used —>1 Page fault
0 is already in memory so —> 0 Page fault.
4 will takes place of 1 —> 1 Page Fault
Now for the further page reference string —> 0 Page fault because they are already available in
the memory.

First In First Out (FIFO) –


This is the simplest page replacement algorithm. In this algorithm, the operating system keeps
track of all pages in the memory in a queue, the oldest page is in the front of the queue. When a
page needs to be replaced page in the front of the queue is selected for removal.

Auxillary Memories
Magnetic Disk
• Magnetic Disk is type of secondary memory which is a flat disc covered with magnetic
coating to hold information. It is used to store various programs and files. The polarized
information in one direction is represented by 1, and vice versa. The direction is indicated by 0.
• Magnetic disk are less expensive than RAM and can store large amounts of data, but data
access rate is slower than main memory because of secondary memory. Data can be modified or
can be deleted easily in the magnetic disk memory. It also allows random access of data.
Advantages :-
• These are economical memory
• The easy and direct access of data possible.
• It can store large amounts of data.
• It has better data transfer rate than magnetic tapes.
• It has less prone to corruption of data as compared to tapes.
Disadvantages :-
• These are less less expensive than RAM but more expensive than magnetic tape
memories.
• It need clean and dust free environment to store.
• These are not suitable for sequential access.
Magnetic Tape & Optical Disk

Magnetic Tape

Magnetic tape is flexible plastic tape coated with magnetic material. It is widely used when large
amount of data is to be processed sequentially. An advantage of magnetic tape is that it is very
cheap and economical storage. Its major disadvantage is that it is very slow and it is only
sequential.

Optical Disk
• Optical disk uses laser technology to read and write data. The LASER stands for Light
Amplification through Stimulated Emission of Radiation. Laser beam writes on the surface by
creating small pits (hole) in the disk.
• Optical drive reads data by focusing laser beam on the surface of the disk. A laser detects
the presence of a pit. The presence of pit indicates 1 and absence of pit indicates 0. Laser beams
converts these pits into digital data.
• The amount of space required to record an optical bit is much less than magnetic bit.
• Optical disk storage capacity is from 650 MB to several GB.

Virtual Memory

Concept Implementation
An implementation concept is an important building block for successful implementation of
Gender Mainstreaming (GM). In particular, the sustained success of associated qualification
measures, events, pilot projects, etc., depends crucially on the extent to which they are integrated
into an overall strategic concept. An implementation concept must define the necessary
framework conditions for making it possible for the instruction, “Everybody will as of today
integrate gender equality into their specialist work”, to be operable and fulfillable by all
employees. The advantages of overall strategic planning by means of an implementation
concept are:
• that the continued strategic procedure is defined,
• that the implementation of GM is concretised by means of individual working stages and
• that it has the effect of being a binding internal plan.
If you are involved in developing an implementation concept, you should be orienting yourself to
the building blocks for successful implementation. You can find a comprehensive list of these
building blocks with detailed explanations here. These are, however, merely aids to orientation.
An implementation concept consists in fact in selecting the building blocks needed by the
organisation and adapting them to the organisation’s existing framework conditions. Thus, there
is no generally-applicable concept suitable for all organisations equally. The success of an
implementation concept depends on too many different factors which can vary greatly from one
organisation to the next, and can include different organisational cultures, different working
processes, the existence or non-existence of support by the political leadership, the commitment
of the employees and the present situation with regard to gender equality. So every building
block should be considered in developing a concept for implementing GM, but does not have to
be used in an implementation concept.

This is made clear using an example. Piloting can be a useful building block and/or the right
measure for introducing GM, since it can be tried out, mostly with the help of external support,
how GM functions. The organisation can profit from this if GM is subsequently to be
implemented equally for all. There is, however, the risk that pilot projects can stay as isolated
measures, as “extras”, and have no effect on day-to-day working life and its routines. If you are
faced with the task of writing the implementation concept, you should consider the pros and cons
of piloting. This will enable you to decide against the backdrop of your knowledge of your
organisation whether this building block is right for you or not. If not, there will nothing more
about the piloting building block in your implementation concept. But experience with
implementation thus far shows that certain implementation building blocks should be included
as a minimum requirement in all implementation concepts.

You might also like