Pages

Search

Sunday, November 16, 2008

Oracle - Background processes

There are many back ground running process all the time running.
There are of 3 types.
1) Background.
2) Server.
3) Network.

The most imperative back ground process is Server Process.
This issues data from disk to the buffer cache where user can manipulate.
DBA can configure this server process in 2 ways.

1) Dedicated server (One genie, one master).
2) Shared server (One genie, Many Masters).

Dedicated server:

In this set up every single user connecting to Oracle will have a personal genie handling data retrieval from disk.
So where there are 10 users accessing to a dedicated serve there will be 10 genie’s to perform data retrieval from disk and put in buffer cache.

Shared server:

In this set up there exists a small pool of server processes running in Oracle that support data retrieval requests for a large number of users.
Several users are processed by one server process. Oracle manages this utilization by means of network process called dispatcher.

Dispatcher puts user request for data in queue and server process shall fulfill the requests one at a time. There can be multiple dispatchers and multiple server processes which are configurable after installing oracle.
These parameters help in reducing memory, CPU burden, and limits server process idle time.

In dedicated when user request is made for data retrieval a dedicated process had to be creates for each connection. In shared server this is not the case; the request is placed by the existing dispatcher and executed by exiting server process.


This shared server accessibility is also called as Multithreaded Server (MTS) which is encouraged when there are large number of users connect and disconnect database.

Earlier in under Memory Structure of Oracle it is said that Session layer is optional.

Memory Structure -- System Global Area (SGA) -- Shared Pool – Session layer

This session layer which holds the user process connected to Oracle is considered or configured by DBA in this Shared server environment to handle user data retrieval.
But it is not required in dedicated server as there will be separate genie for each connection, where session information is housed in PGA (Program Global Area).


Structure that connect users to Oracle Servers.

Oracle Listener:

Oracle listener listens (ear) when user tries to connect to Oracle Database via network. If it detects such instant it handles the request based upon type of the server process.

This process is called as Listener process.

a) Dedicated Server:
If the server process is dedicated it updates oracle database to generate new dedicated process and assigns the request to it.

b) Shared Server:
If the server process is shared, then listener assigns the request to dispatcher process.

After forwarding user request to specific (a) or (b) listener is no way in the picture.

The queue where this dispatcher places the request for server process to execute is called request queue. This request queue is allocated in SGA.
This request queue is shared by all dispatcher processes of an instance.

Also once the request is executed the relevant response is placed in response queue which too available in SGA.
Each dispatcher has its own response queue inside SGA. Then dispatcher sends the response from response queue to specific user who has sent the request.


This is the back ground process when user requests or hits oracle database.

No comments:

Post a Comment