Re: Processes vs Threads

From: Mahesh Vallampati <m0v5533_at_tamsun.tamu.edu>
Date: 1 Nov 1994 22:06:11 -0600
Message-ID: <39737j$81_at_tamsun.tamu.edu>


In article <3962g6$8c0_at_news.inbe.net>, Nick Price <nick_at_falstaff> wrote:
>The Oracle architecture is highly process centric, in that a typical
>instance architecture utiises (at least on UNIX) seperate processes to
>accomplish discrete tasks.
>
>The lightweight process/thread execution model (ie Pthreads) where
>therads execute within the address space of the parent process would seem
>to offer scope for considerable parallelism. How if at all could this
>model be used for a DBMS system such as Oracle ?
>
>Nick
>--

The main advantage of multi-threading is the increased speed of computation due to parallelism . This is because context switching required to execute a different thread is considerably less than the context switching overhead to execute a different process.(BTW A context switch is the process by which a CPU which is running one process save the status of the process in its memory loads another process from memory and starts running it.) This makes a lot of sense where Oracle is used as a server in a client-server application. Instead of forking new Oracle server processes to service clients now only one Server process with multiple threads needs to be available. This saves a lot of context switching time on the server thereby increasing throughput. Consider this example : There are two Oracle clients requesting services from a server. Instead of spawning two server process to service this two clients we use one server with two threads to service these clients. The thread model which u described is the threads in user space. Current generation operating systems like Solaris provide kernel multi-threading wherein the O/S takes control of threads. But User Space threads is the way to go.
A big "thread" on this issue-multi-threading is/was going on comp.os.research. Oracle is server multi-threaded. The SQLDBA menu has some parameters which can be used to configure the Oracle multi-threaded server. RTFM should give u some interesting Information on threads. If u have futher questions e-mail me.
Thanks



Mahesh Vallampati
M.S. In EE
Dept.of Electrical Engineering,
Texas A & M University.
Ph:(409)862-1070
// The only standard thing about Unix system is the message of the day asking users to clean up their files. Received on Wed Nov 02 1994 - 05:06:11 CET

Original text of this message