You are on page 1of 1274

This lesson provides an

insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area


Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area


Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
an insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area


Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
an insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area


Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
an insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
an insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area


Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.
Figure illustrates the
various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1. D atab ase bu ff er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac
This lesson provides an
insight into

Overview of Oracle
Memory Structures

System Global Area

Programme Global
Area

Software Code Area


Introduction
The memory structures
of any database are used
to cacheapplication data,
data dictionary
information which
containsmetadata etc,
SQL commands,
PL/SQL and
Java programunits,
transaction
information, data
required for
execution of individual
database requests, and
other control
information.Memory
structures are allocated
to the Oracle instance
when theinstance is
started. The two major
memory structures
areknown as the System
Global Area (also called
the SharedGlobal Area)
and the Program Global
Area or the
ProcessGlobal Area.

Figure illustrates the


various memory
structures in Oracle.
System Global Area
The System Global
Area is a shared
memory area,
theinformation
of which is shared by
all the users of the
database.Oracle
instance is constituted
by the SGA and the
backgroundprocesses.
Oracle allocates memory
of the SGA when an
Oracleinstance is started
and de-allocates it when
the instance is
shutdown. The
information stored in
the SGA is divided
intomultiple memory
structures that are
allocated fixed space
whenthe instance is
started.The various
components of SGA are
as follows:
1 . D atab as e b u f f er
cache
The database buffer
cache caches the
database data,
holdingblocks from the
data files that have been
recently read.
Thedatabase buffer
cache is shared among
all the users connected
tothe database. There
are three types of
buffers:

Dirty buffers:
Dirty buffers need to
be written to the
datafile. The data in
these buffers has
changed and has not
yetbeen written to the
disk.

Free buffers:
Free buffers are the
buffer blocks that do
notcontain any data or
are free to be over-
written. When
Oraclereads data from
disk, free buffers are
used to hold this data.

Pinned buffers:
Pinned buffers
are the buffers that
arecurrently being
accessed or explicitly
retained for future
use.For example, the
KEEP buffer pool.To
manage the buffer
cache, two lists are
maintained by
Oracle:1.The write list
contains the buffers
that are modified
andneed to be written
to the disk (the dirty
buffers). It is alsocalled
as dirty buffer list.2.The
least recently used
(LRU) list contains free
buffers,pinned buffers,
and the dirty buffers
that have not yet
beenmoved to the write
list. Consider the LRU
list as a queue
of blocks, where the
most recently accessed
blocks are always inthe
front(known as the
most recently used , or
MRU, endof the list; the
other end, where
the least recently
accessedblocks are, is
the LRU end). However
the least used blocksare
thrown out of the list
when new blocks are
accessed andare added
to the list.When an
Oracle process accesses
a buffer, it is
moved to MRUend of
the list. So the most
frequently accessed data
is availablein the
buffers. When new
data buffers are moved
to the LRUlist, they are
copied to the MRU end
of the list, pushing
out thebuffers from the
LRU end. An exception
to this occurs when afull
table scan is done and
the blocks from a full
table scan arewritten to
the LRU end of the list.
When an Oracle
processrequests data, it
searches the data in the
buffer cache, and if
itfinds data, the result is
a cached hit. If it
cannot find the data,the
result is a cache miss,
and data then needs
to be copied fromdisk
to the buffer.Before
reading a data into
cached, the process
must first find afree
buffer. The server
process on behalf of
the processsearched
either until it finds a free
buffer or until it has
searchedthe threshold
limit of buffers. If the
server process finds a
dirtybuffer as it
searches the LRU list,
it moves that buffer
to thewrite list and
continues to search.
When the process finds
a freebuffer, it reads the
data block from the
disk into the buffer
andmoves the buffer to
the MRU end of the
LRU list. If an
Oracleserver process
searches the threshold
limit of buffer
withoutfinding a free
buffer, the process stops
searching and signals
theDBW
n

bac

You might also like