0% found this document useful (0 votes)
25 views

Main Memory

Uploaded by

Irvin Urmeneta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Main Memory

Uploaded by

Irvin Urmeneta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 28

Chapter 8: Main Memory

PRESENTED BY:
ECAL, GIO
URMENETA, IRVIN SPENCER
VIBAL, RYAN FRANCEL
Chapter 8: Main Memory

This new chapter delves into the world of main


memory, with a specific focus on the role of
swapping in mobile systems and an exploration of
Intel's 32- and 64-bit architectures.
Main memory, also known as RAM
(Random Access Memory), is a
volatile and temporary storage
location in a computer that holds
data and machine code currently
being used and processed by the
CPU. It plays a crucial role in the
execution of programs by providing
fast and direct access to the data
needed by the CPU.
BASIC
HARDWARE
The main memory and registers in
a CPU are the primary direct-
access storage devices, allowing
the CPU to execute instructions
and operate on data.

To ensure correct operation and


protect the operating system from
user processes, hardware
implements memory protection.
Memory protection is ensured by the CPU hardware, which compares each
address generated in user mode with base and limit registers.
ADDRESS BINDING
When a program is stored on disk as a
binary executable file, it needs to be loaded
into memory and placed within a process to
be executed. Memory management may
involve moving the process between disk
and memory during its execution.
1. Compile Time - Compile time
binding involves knowing the
memory location of a process
during compilation. Absolute code
is generated accordingly.

2. Load time - binding is used when


the process's memory location is
not known during compilation.

3. Execution time - binding occurs


when a process can be moved
between memory segments during
its execution.
Logical Versus Physical Address Space
A logical address, generated by the CPU, is also referred to as a virtual
address. The address seen by the memory unit is the physical address. Compile-
time and load-time address binding methods produce identical logical and
physical addresses.
DYNAMIC LOADING

Dynamic loading allows routines to be loaded into


memory only when they are called, improving
memory-space utilization. Routines are stored on
disk in a relocatable load format.
Dynamic Linking and Shared Libraries
Dynamic linking optimizes memory and disk space
usage by linking libraries at runtime, provides
efficient updates, and supports shared libraries for
multiple processes. The operating system plays a
crucial role in managing these dynamic linking
processes.
SWAPPING IN OPERATING SYSTEM

Swapping makes it possible for the total


physical address space of all processes to
exceed the real physical memory of the
system, thus increasing the degree of
multiprogramming in a system.
STANDARD SWAPPING
Standard swapping in
an operating system
involves temporarily
moving a process out of
main memory to a backing
store (often on disk) and
later bringing it back for
execution.
SWAPPING ON MOBILE
SYSTEM
Mobile operating systems, such as Apple's iOS and Android,
differ in their approach to memory management compared
to traditional PC and server operating systems.
SWAPPING ON MOBILE SYSTEM
No Swapping in Mobile Systems:
 Mobile systems typically do not support swapping due to
constraints associated with flash memory, which is used as
persistent storage.

Flash Memory Challenges:


 Flash memory has limited write endurance, making excessive
swapping impractical.
 Poor throughput between main memory and flash memory further
discourages the use of swapping in mobile systems.
SWAPPING ON MOBILE SYSTEM
iOS Memory Management:

• OS on Apple devices asks applications to voluntarily release


allocated memory when free memory falls below a threshold.
• Read-only data, such as code, may be removed and later
reloaded from flash memory if needed.
• Modified data, like the stack, is not removed. Applications
failing to free up sufficient memory may be terminated.
SWAPPING ON MOBILE SYSTEM
Android Memory Management:
• Android, similar to iOS, does not support swapping.
• It may terminate a process if there is insufficient free
memory.
• Before termination, Android writes the application
state to flash memory for quick restart.
SWAPPING ON MOBILE SYSTEM
Developer Responsibility

• Due to these limitations, mobile developers must


carefully manage memory, ensuring optimal
allocation and release to prevent excessive usage or
memory leaks.
SWAPPING ON MOBILE SYSTEM
SUPPORT FOR PAGING

• Both iOS and Android support paging, providing


some memory-management capabilities.
• Aging is a mechanism where data is transferred
between main memory and storage, allowing for
efficient memory usage.
INTEL 64-BIT ARCHITECHTURE

Intel's 64-bit architecture, often


referred to as x86-64 or AMD64,
processes data in 64-bit chunks,
enabling larger memory addressing.
INTEL 32-BIT ARCHITECHTURE

Intel's 32-bit architecture,


known as x86, processes data in 32-
bit chunks and addresses up to 4
gigabytes of memory.
Advantages and Disadvantages of Intel 32-bit
Architecture
Advantages Disadvantages
32-bit architecture provides compatibility with older It has limitations in addressing large memory sizes
software and efficient usage of memory resources. and may not fully utilize modern hardware
capabilities.
Discussion of Intel 64-bit Architecture
1 Increased Memory 2 Enhanced Security 3 Optimized
The 64-bit It offers Performance
architecture allows enhanced 64-bit architecture
for vastly increased security features delivers optimized
memory addressing and the ability to performance for
capability, making it handle complex modern computing
suitable for diverse computational demands, especially
applications and tasks efficiently. in resource-intensive
workloads. applications.
Importance of Swapping on Mobile
Systems
1 Resource Management
Swapping is vital for effective resource management, ensuring that mobile devices utilize
memory efficiently.

2 Performance Optimization
It contributes to performance optimization by allowing the system to maintain
responsiveness even with multiple applications running simultaneously.

3 Enhanced User Experience


By preventing memory exhaustion, swapping plays a crucial role in delivering a seamless
and enjoyable user experience on mobile devices.
Benefits and Drawbacks of Intel 64-bit
Architecture

Benefits Drawbacks
Enhanced memory addressing capability and Potential challenges in hardware compatibility and
optimized performance for resource-intensive backward integration with some legacy systems.
applications.
Comparison of Swapping on Mobile Systems
and Intel Architectures
Swapping on Mobile Systems Enables seamless multitasking and enhances user
experience by managing memory efficiently.

Intel 32-bit Architecture Provides backward compatibility but has limitations


in addressing large memory sizes.

Intel 64-bit Architecture Offers enhanced memory addressing capability and


high-performance computing for modern
applications.
Conclusion and Key Takeaways from Chapter
8

1 Enhanced Hardware Capabilities


The chapter emphasizes the significance of enhanced hardware capabilities in modern computing
environments.

2 Resource Optimization
It focuses on the critical role of memory management strategies in optimizing system resources.

3 User-Centric Design
Key takeaways revolve around the importance of user-centric design in mobile systems and
architectural developments.

You might also like