micke wrote: > Been looking throu the code for a while now but I can't seem to find where > the "main" function for scheduling is. I'm interested in where the SCHD_FIFO > and SCHED_RR in the real-time class are done. That is where is the time > quantum for RR set/checked? where are threads picked from the real-time class > dispatch queue? where are the different FIFO queues of threads? etc etc ... > > > This message posted from opensolaris.org > _______________________________________________ > opensolaris-code mailing list > opensolaris-code@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/opensolaris-code > > If there is a "main" function, it would be disp() (usr/src/uts/common/disp/disp.c). SCHED_FIFO and SCHED_RR are posix user level scheduling classes. You need to look at the user level code in usr/src/lib/libc/port/threads/rtsched.c (and elsewhere). SCHED_FIFO and SCHED_RR use priocntl(2) to tell the system about real-time parameters. There are no separate dispatch queues for the different classes. Each CPU has a dispatch queue. cpus typically run threads on their own queue, but may "migrate" threads based on priority and for load balancing. You have a lot of reading to do. I recommend McDougall and Mauro's book (Solaris Internals), see www.solarisinternals.com. Or, take a course!
Hope this helps a little. max _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code