From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,862ea009fde373e2 X-Google-Attributes: gidfee84,public From: denham@denham.zk3.dec.com (Jeffrey M. Denham) Subject: Re: Scheduling of threads vs processes Date: 1995/08/14 Message-ID: <1995Aug14.140453.28397@decvax.dec.com>#1/1 X-Deja-AN: 108139364 sender: usenet@decvax.dec.com (Usenet News System) references: organization: Digital Equipment Corporation keywords: threads processes osf1 reply-to: denham@zk3.dec.com (Jeffrey M. Denham) newsgroups: comp.unix.osf.osf1 In article , byrappag@cs.iastate.edu (Anand Byrappagari) writes: |>Hi all, |> |> I need some help regarding scheduling of threads (light |>weight |> processes). |> |> When a system supports kernel level threads how is the |>scheduling |> of threads done. Is the time allocated to the parent process |> divided into smaller parts for each of its threads or is each |> thread considered to be equivalent to a process when the CPU |> is scheduled. This is important because if each thread is |> considered equivalent to a process when scheduling the CPU |>then |> a process with N threads will get N times more CPU time then |>a |> unthreaded process with the same priority. |> |> I am especially interested in how this problem is handled in |> decthreads package available on osf1. |> |>Thanks, |>Anand |> |> Current on Digital UNIX (DEC OSF/1), all threads are scheduled with a global scope. In other words, threads of the same priority compete equally for the CPU, regardless of which process they belong to. The DECthreads package is currently complete uninvolved in scheduling decisions; that is all left to the kernel's scheduler. On an upcoming version, however, this will change. The kernel's scheduling won't change, but DECthreads (POSIX 1003.1c pthreads) will become much more involved in scheduling. Without going into details, I can say that the effect will much more that of the kernel scheduling the process and DECthreads scheduling the threads within the process. -- ----------------------------------------------------------------------------- Jeff Denham, Unix Software Group, Digital Equipment Corporation email: denham@zk3.dec.com, voice: (603) 881-0057