tags:

views:

24

answers:

2

Here: http://download.oracle.com/docs/html/A95907_01/diff_uni.htm#1077398 I found that on Windows Oracle is thread based, while on Unix this is process based. Why it is like that?

What's more, there are many Oracle processes http://www.adp-gmbh.ch/ora/concepts/processes/index.html regardless the system.

Why log writer and db writer are implemented as processes... and the query execution is done using threads (windows) or processes (unix).

+1  A: 

See this answer I posted earlier on in similar vein to this question 'What is process and thread?'. Windows makes extensive use of threads in this fashion. Unlike *nix/Linux based systems which are based on threads. And see here also, this link is a direct link(which is embedded in the first link I have given) to the explanation I gave on how Linux time divisions threads and processes.

Hope this helps, Best regards, Tom.

tommieb75
And that's why Oracle also has many processes per instance? I'll change the question for that
Simon
Yes. In Oracle on Windows, all the processes in Oracle on *nix(pmon, smon, lgwr, et.al.) are threads inside ORACLE.EXE.
Adam Musch
+2  A: 

Oracle makes use of a SGA shared memory area to store information that is (and has to be) accessible to all sessions/transactions. For example, when a row is locked, that lock is in memory (as an attribute of the row) and all the other transactions need to see it is locked.

In windows a thread cannot access another process's memory

threads cannot access memory that belongs to another process, which protects a process from being corrupted by another process.

As such, in Windows Oracle must be a single process with multiple threads. On OS's supporting the sharing of memory between processes then it is less work for Oracle to work as a multi-process architecture and leave the process management to the OS.

Oracle runs a number of background threads/processes to do work that is (or can be) asynchronous to the other processes. That way those can continue even when other processes/threads are blocked or busy.

Gary