Performance - Multi-Threaded Algorithms


A basic requirement for good performance on a larger MP system is a multi-threaded kernel. Multi-threading the kernel permits the multiple CPUs that are in the system to work in parallel. The Sun engineers did an excellent job in providing a sound multi-thread design which they incorporated in many areas of the system. The A+Edition builds upon this design and extended it into areas which were not originally multi-threaded in Solaris 2.3.

An example of this is the poll system call. This call is extensively used by networking applications such as telnet and rlogin as well as by DBMS applications. In smaller systems, the fact that the call was single threaded was not a problem because the workload that could be supported by the system was the limiting factor. However, as one increased the number of telnet logins to the 150-200 range, this problem became apparent. Even though the system may have a number of CPUs available for work, only one of them could handle the processing of the poll system call. By multi-threading this particular choke point, significant improvements were seen in support for large numbers of telnet clients.

Solaris 2.4 and the A+Edition 1.1 share a common implementation of the multi-threaded poll. In addition, daemon processing for telnet and rlogin clients has been moved to kernel STREAMS modules to reduce context switch overhead.