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

Processes and Memory

The document discusses the importance of processes and memory in Oracle database management, detailing the types of processes including user, server, and background processes. It also explains the memory architecture, highlighting the System Global Area (SGA) and Program Global Area (PGA), along with their components. Additionally, it describes the interaction between processes and memory during data retrieval and modification operations.

Uploaded by

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

Processes and Memory

The document discusses the importance of processes and memory in Oracle database management, detailing the types of processes including user, server, and background processes. It also explains the memory architecture, highlighting the System Global Area (SGA) and Program Global Area (PGA), along with their components. Additionally, it describes the interaction between processes and memory during data retrieval and modification operations.

Uploaded by

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

Processes and Memory in

Oracle

U N D E RS TA ND ING O RA CLE'S A RCH I TECTU RE

E N G . O S A MA A L AT HWARI
Introduction
• Oracle processes and memory play a crucial role in database
management.
• This lecture covers:
• Types of Oracle processes.
• How memory is structured in Oracle.
• The interaction between processes and memory.

DATABASE ADMINISTRATION | ENG. OSAMA ALATHWARI 2


What are Processes in Oracle?

• A process is a series of steps executed sequentially in memory.


• In a multi-user environment, multiple processes run concurrently.
• Oracle processes can be classified into:
• User processes
• Server processes
• Background processes

DATABASE ADMINISTRATION | ENG. OSAMA ALATHWARI 3


DATABASE ADMINISTRATION | ENG. OSAMA ALATHWARI 4
User and Server Processes
• User Process:
• Initiated when a user runs an application that interacts with Oracle.
• Establishes a connection to the Oracle instance.

• Server Process:
• Handles requests from the user process.
• Performs data retrieval and modifications in the database.
• Works in conjunction with User Process
• Responsible for executing SQL statements

DATABASE ADMINISTRATION | ENG. OSAMA ALATHWARI 5


DATABASE ADMINISTRATION | ENG. OSAMA ALATHWARI 6
Background Processes
Key background processes that run silently:
1. Database Writer (DBWn)
• Writes modified data blocks from memory to data files
• Multiple writers can operate simultaneously
• Helps prevent I/O bottlenecks

2. Log Writer (LGWR)


• Records transaction data from memory to redo logs
• Writes when:
• Every 3 seconds
• Commit issued
• Log buffer 1/3 full
• Critical for database recovery

DATABASE ADMINISTRATION | ENG. OSAMA ALATHWARI 7


Background Processes
3. Checkpoint Process (CKPT)
• Updates control files and data file headers
• Tracks System Change Numbers (SCN)
• Triggers based on log switches

4. Archiver Process (ARCH)


• Creates backup copies of redo logs
• Activated in ARCHIVE LOG mode
• Essential for backup and recovery

DATABASE ADMINISTRATION | ENG. OSAMA ALATHWARI 8


DATABASE ADMINISTRATION | ENG. OSAMA ALATHWARI 9
Monitoring Processes
1. System Monitor (SMON)
• Handles instance recovery at start up
• Cleans up temporary segments
• Coalesces free space
• Runs instance recovery if needed

2. Process Monitor (PMON)


• Cleans up after failed user processes
• Recovers user transactions
• Releases locks and resources
• Resets database connections

DATABASE ADMINISTRATION | ENG. OSAMA ALATHWARI 10


Memory Architecture in Oracle

• Memory in Oracle is divided into:

1. System Global Area (SGA) – Shared memory structure for


database operations.
2. Program Global Area (PGA) – Memory allocated to each server
process.

DATABASE ADMINISTRATION | ENG. OSAMA ALATHWARI 11


System Global Area (SGA)
1. Database Buffer Cache
• Stores database blocks in memory
• Uses LRU algorithm for block management
• Managed by Database Writer process

2. Redo Log Buffer


• Temporary storage for redo information
• Managed by Log Writer process
• Size controlled by LOG_BUFFER parameter

DATABASE ADMINISTRATION | ENG. OSAMA ALATHWARI 12


System Global Area (SGA)
3.Shared Pool
• Stores shared SQL and PL/SQL code
• Contains data dictionary cache
• Critical for system performance
• Size impacts overall system efficiency

4.Java Pool
• Stores Java code and data
• Used for Java Virtual Machine (JVM)
• Size set by JAVA_POOL_SIZE parameter

DATABASE ADMINISTRATION | ENG. OSAMA ALATHWARI 13


DATABASE ADMINISTRATION | ENG. OSAMA ALATHWARI 14
DATABASE ADMINISTRATION | ENG. OSAMA ALATHWARI 15
Program Global Area (PGA)
1.Stack Space
• Stores session variables
• Handles connection information
• Contains arrays and runtime data

2.Private SQL Area


• Holds binding variables
• Manages runtime buffers
• Session-specific SQL information

DATABASE ADMINISTRATION | ENG. OSAMA ALATHWARI 16


Interaction Between
Processes and Memory
• Data Retrieval Process:
• User sends a query.
• Server process fetches data and places it in the buffer cache.
• Data is retrieved from memory if already available (reducing disk
I/O).

• Data Modification Process:


• User updates data.
• Changes are written to the redo log buffer.
• DBWR writes modified blocks to disk periodically.

DATABASE ADMINISTRATION | ENG. OSAMA ALATHWARI 17

You might also like