Buffer overflow Exploitation tutorial - CPU Memory Management - Memory System - Part 2

Posted by Suraj Singh on December 01, 2017 · 5 mins read
hii Hackers,

As I already said in previous post,  "I am writing this tutorial series to teach you how you can write exploits on your own" and to write exploits on your own you need sharp knowledge of memory management. So, Let's Start Our Today's Tutorials.

Well, In Computer architecture, There are various types of Memories responsible for doing many types of different works. but here, i am going to describe only some important point because i don't want to make you confuse.

So, let's Start

Types Of Storage Locations In Computer System

1. Primary Storage. (check previous part for detailed Information)
2. Secondary Storage. (check previous part for detailed Information)
3. CPU Registers.

Primary Storage.

                                Primary Storage is also known as Internal Storage. These Types Of Storage is Needed all the time so they are located inside the CPU (Connected With Motherboard Directly). Examples are RAM and ROM.

Secondary Storage.

                                    Secondary Storage is also known as External Storage. These types of storage is located outside the CPU but connected to CPU. Example : Hard disk.

CPU Registers : 
                               For processing and performing any functions in CPU (Central Processing Unit). CPU also need memories. Hence, CPU has its own local memories to store instruction and data. these local memories are known as CPU Registers. In simple words,  CPU also have its own local memory in the form of CPU Registers.

Cache Memory : 
                                Cache Memory is a very high speed memory located between the CPU and Main memory. In simple words, Cache memories are very high speed memories which is placed between the processor and main memory. Now, a question arise in our mind why? why cache memories play a role of intermediate between processor and main memory.
Well the reason is, CPU registers are very high speed compared to main memory. So, moving instruction or data between CPU registers and main memory directly effects on CPU performance. To solving this problem, a very high speed memory called cache memory is placed between processor and main memory.

Storage Capacity System.

In Computer architecture, Storage Capacity is the amount of data that can be stored in storage units. these storage units can be referred as bytes. hmm, let's dirty our handy with storage capacity systems details.

Bit (Binary Digits) :
                                 A binary digit (possible values 0 or 1) representing a passive or an active state of a component in computer circuit board.

Nibble  :
                       A Group of Four bit is called nibble.

Byte :
                       A group of eight bit is called bytes. (Smallest Unit Represent any Character Or Data)

Kilobytes :
                       A group of 1024 Bytes is called One KiloByte.

Megabytes :
                      1024 kilobytes refer as One megabytes.

Three Parameters for Performances In Computer Architecture.

Access Time :
                       Access time is referred as the time required to locate and retrieve record from Devices.

Memory Cycle Time : 
                      Access Time + Gap of time in accessing another intruction.

Access Rate :
                        Time required to access any particular storage unit block in drive.

Memory Hierarchy

As The hirarchy going down, the following occur
1. Increasing Access Time
2. Increasing Capacity
3. Decreasing Cost Per Bit

So, readers This Tutorial Ends Here.
I Hope You Enjoyed it.

Click Here For Next Part