4

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).

Szymon Lipiński
  • 27,098
  • 17
  • 75
  • 77

2 Answers2

4

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 Myers
  • 34,963
  • 3
  • 49
  • 74
1

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.

Community
  • 1
  • 1
t0mm13b
  • 34,087
  • 8
  • 78
  • 110