Presentation is loading. Please wait.

Presentation is loading. Please wait.

Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.

Similar presentations


Presentation on theme: "Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some."— Presentation transcript:

1 Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some operating systems use the terms job or task An Oracle database server has: User processes Oracle processes *(basically the ability to run a series of steps)

2 User and Oracle Processes
User (Client)Processes Used to run the software code of an application program Manage communication with the server process through the program interface Two types: Connection Session Oracle Processes Used to run Oracle database server code Two Types: Server Processes Background Process

3 Connection- Definition
A physical path between your client process and the database instance. The connection is made between the client process and either a dedicated server or dispatcher.

4 Session- Definition A session is a logical entity that exists in the instance. It is a†collection of data structures in memory that represent a unique session. Sessions are where you execute SQL commands, commit transactions and run stored procedures.

5 Differentiating between Connection and Session
One or many Sessions may share the same physical connection to the database OR There could be a connection to the database with no associated sessions A physical connection could be drop leaving a session intact (idle) and would remain so until the connection was reestablished

6 Sever Process Handles requests of user processes connected to the instance Perform system functions: Run SQL statements Read data blocks from data file into the shared database buffers of the SGA Returns results in a readable format for the application Two configurations for Server Processes: Dedicated server configuration Shared server configuration

7 Dedicated Server Configuration
For each user the database application is run by a different user processes that one that runs the Oracle process

8 Dedicated Server Configuration- Diagram

9 Shared Server The database application is run by a different user process than the one that runs the Oracle database server code

10 Shared Server- Diagram

11 Dedicated Server vs. Shared Server
No waiting for long transactions Scalability (Provided sufficient CPU and RAM are available) Recommended configuration Shared Server Reduces the number of threads Reduces the memory needed Maximize concurrent users

12 Background Processes Database Writer (DBWn) Log Writer (LGWR)
Checkpoint (CKPT) System Monitor (SMON) Process Monitor (PMON) Archiver (ARCn) Recoverer (RECO) Dispatcher(Dnnn)

13 Background Processes - Diagram

14 Database Writer (DBWn)

15 Database Writer (DBWn)
Manages the buffer cache so that users processes can always find free buffers Writes dirty buffers from the data buffer cache to the database when: # of free buffers gets too low Directed by the checkpoint process Utilizes the Least Recently Used (LRU) algorithm for buffer management

16 Checkpoint (CKPT)

17 Checkpoint (CKPT) Coordinates the process of seeing that all transactions completed or rolled back prior to the checkpoint time have been written to back-up storage Writes a checkpoint number to the redo log file Writes a checkpoint number to the header of each tablespace and to the control file

18 Log Writer (LGWR)

19 Log Writer (LGWR) Clears the Redo Log Buffer by writing its contents to a Redo Log File LGWR initiates a checkpoint when redo log file is full and then switches to the next Redo Log File Switch occurs only if the prior checkpoint for the next Redo Log File is complete

20 Archiver (ARCn)

21 Archiver (ARCn) Copies redo log files to a designated storage device after a log switch occurs ARCn begins writing when a log file becomes inactive The system will hang if the ARCn has not completed writing before that redo log file is used again

22 System Monitor (SMON)

23 System Monitor (SMON) Performs recovery at start-up
Responsible for cleaning up temporary segments no loner in use Recovers terminated transactions skipped during start-up, once system is available SMON regularly checks if it is needed or can be called by other processes when needed

24 Process monitor (PMON)

25 Process monitor (PMON)
Performs automatic processes recovery when a user process fails Responsible for cleaning up the database buffer cache Reclaims memory and other resources allocated to the failed process Checks status or dispatcher and server, restarts if necessary PMON regularly checks if it is needed or can be called by other processes when needed

26 Recoverer (RECO)

27 Recoverer (RECO) Used to resolve failures involving distribute transactions Can automatically complete the Commit or Rollback Commands, locally Remove all related pending transactions, globally RECO fails to connect to remote serve it automatically tries again at timed interval

28 Dispatcher (Dnnn)

29 Dispatcher (Dnnn)

30 Dispatcher (Dnnn) Directs multiple incoming network session requests to a pool of shared server processes Places a single program interface call on to a common request queue Removes the result from its own response queue Returns completed request to appropriate user

31 References Oracle Database Concepts - Chapter 9 Process Architecture
Oracle Database Developer’s Guide- Chapter 4 Managing Oracle Database Processes Expert Oracle Database Architecture - Thomas Kyle


Download ppt "Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some."

Similar presentations


Ads by Google