>>>>> "Osman" == Osman Çinar Eren <Cinar.Eren@isbank.com.tr> writes: Osman> i work on a real time streaming project and i have two seperate Osman> threads which have infinite loops in them. Osman> first of all, what should i do in order to make this application a real time Osman> process? I. Set some of the real-time scheduling policies for the threads - SCHED_FIFO SCHED_RR. II. If possible, use the preemptive kernel. III. Be careful with the synchronization primitives - watch for priority inversion (AFAIK, LinuxThreads do not implement neither priority inheritance nor priority ceiling). I. and II. are easy. If III. is a problem, frankly, I don't see how can you use the linux kernel for your task. Otherwise, with real-time scheduling and low-latency kernel you have good chances Osman> If i set the thread attributes of these two threads to Osman> SCHED_FIFO and if htey have different priorities, does it mean Osman> that the one with the higher priority will always use the CPU? Yes. Osman> and also what about all the other processes in the system that Osman> need CPU time? Threads with real-time scheduling policy are always higher priority than the time-sharing class threads. Osman> So should i use SCHED_RR ? Probably not, but depends upon your app. ~velco -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/