Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Scheduling thread problem kernel 2.6
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-04-13 (07:53)
From: Christophe Raffalli <raffalli@u...>
Subject: [Caml-list] Scheduling thread problem kernel 2.6

Message posted to comp.os.linux.misc and caml-list.

I am having a scheduling problem with a Caml program that uses two threads:
- one CPU intensive thread
- one interface thread (using Glut + OpenGL) and often doing nothing

The problem is that the CPU intensive thread never gets more than 50% 
(near 100% expected) of the CPU (usually 20 to 30%). Moreover the thread 
only get less than 20% (near 50% expected) if another CPU intensive 
process is running.

I suspect that the scheduling algorithm uses the behaviour of the 
interface thread to predict (wrongly) that both threads need little CPU. 
This seems confirmed by the fact that call to Thread.yield in the 
interface thread slow down the CPU intensive thread !

The problem exists with all versions of kernel 2.6 I tried (from 2.6.3 
to 2.6.5 unpatched and the Mandrake 2.6.3). Everything is fine with a 
kernel 2.4.

changes nothing.

Any hint ?

Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
IMPORTANT: this mail is signed using PGP/MIME
At least Enigmail/Mozilla, mutt or evolution
can check this signature

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: