0% found this document useful (0 votes)
4 views6 pages

Assignment 1-1

The document discusses memory organization and structure in computer architecture, highlighting its importance for data storage, access, and management. It outlines advantages and disadvantages of memory organization, and describes two models: Segmented Memory Model and Linear Memory Model, including their features, benefits, and drawbacks. The document also provides examples of memory segments and their functions in programming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views6 pages

Assignment 1-1

The document discusses memory organization and structure in computer architecture, highlighting its importance for data storage, access, and management. It outlines advantages and disadvantages of memory organization, and describes two models: Segmented Memory Model and Linear Memory Model, including their features, benefits, and drawbacks. The document also provides examples of memory segments and their functions in programming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Memory Organization and Structure

ASSIGNMENT NO 1

NAME : MOMINA AKRAM


CLASS : BSIT
ROLL NO : 15
SEMESTER : 4th
COURSE TITLE : ASSEMBLY LANGUAGE

1
Memory Organization and Structure

MEMORY ORGANIZATION AND STRUCTURE:


Memory organization and structure are crucial concepts in
computer architecture and operating systems. Memory organization and
structure are crucial concepts in computer architecture and operating
systems. Memory organization and structure refer to the way data is
stored, accessed, and managed in a computer system.
Memory organization ensures:
1. Fast data access.
2. Efficient memory usage.
3. Process and program isolation.
4. Support for multitasking and protection .

Advantages:
1. Improved performance.
2. Better resource management.
3. Enhances multitasking.
4. Scalability.
5. Data protection and security.
Disadvantages:
1. Complexity in Management.
2. Cost.
3. Limited flexibility.
4. Hardware Dependency.

2
Memory Organization and Structure

Types of Memory organization and structure :


These two commonly used models for organizing memory are:
1. Segmented Memory Model.
2. Linear Memory Model.

Segmented Memory Model:


Segmented memory models propose that memory is
composed of distinct, separate components or systems, each with
unique functions, capacities, and structures. These models divide
memory into segments based on duration, content, processing type, or
neural systems.
A segmented memory model splits the system’s memory into different
logical segments. Each segment is a block of memory that holds a specific
type of data or instruction.
Main Segments in the Segmented Model:
1. Code Segment (CS):
Stores the instructions (code) to be executed.
2. Data Segment (DS):
Stores program variables and constants.
3. Stack Segment (SS):
Stores function call data like return addresses and local
variables.

3
Memory Organization and Structure

4. Extra Segment (ES):


An additional segment often used for string and data
manipulation.

Advantages of Segmented Model:


1. Supports modular programming by separating code, data, and stack.
2. Enables relocation of segments, aiding dynamic memory allocation.
3. Efficient memory use, especially in smaller systems.
4. Allows logical separation of program components.
Disadvantage of Segmented Model:
1. Complex addressing due to segment : offset calculation.
2. Can lead to overlapping segments, causing bugs.
3. Limited segment size (max 64KB each in real mode).
4. Harder to manage in modern large-scale applications.
Used in:
Intel 8086, 8088 processors
DOS-based systems
Early Windows (16-bit)
Example in Assembly (x86):
MOV AX, DATA_SEGMENT
MOV DS, AX ; Load the data segment
MOV AL, [1234h] ; Access memory at offset 1234h in DS.

4
Memory Organization and Structure

Linear Memory Model:

Linear memory model is a type of memory organization where the


entire memory is viewed as a single continuous (linear) block. Linear
memory model is also known as flat memory model, this model treats
the memory as one continuous block of addresses.

Key Features:
1. Single continuous address space.
2. No segmentation.
3. Simpler memory access.
4. Used in modern operating systems.

Advantages of Linear Memory Model:


1. Simple to implement and understand.
2. Easier to program for developers.
3. Efficient for modern processors and compilers.

Disadvantages of Linear Memory Model:


1. Less flexible in memory protection.
2. Cannot easily separate user and system memory for security.
3. Neends large memory address space (like 32-bit or 64-bit CPUs).
4. Difficult to manage in large programs.
5. Higher risks of bugs.

5
Memory Organization and Structure

Structure:

+-------------------------------+
| Code Segment |
+-------------------------------+
| Data Segment |

+-------------------------------+
| Stack Segment |
+-------------------------------+
| Heap (Dynamic Memory) |

+-------------------------------+

You might also like