【正文】
ask using find_task_by_pid() ? Walk tasks using for_each_task() ? Modifications protected by a readwrite spinlock. SMU SM Process States ? TASK_RUNNING: means the task is in the run queue. ? TASK_INTERRUPTIBLE: means the task is sleeping but can be woken up by a signal or by expiry of a timer. ? TASK_UNINTERRUPTIBLE: same as previous, except it cannot be woken up. ? TASK_ZOMBIE: task has terminated but has not had its status collected (wait()ed for) by the parent (natural or by adoption). ? TASK_STOPPED: task was stopped, either due to job control signals or due to ptrace(). ? TASK_EXCLUSIVE: this is not a separate state but can be ORed to either one of TASK_INTERRUPTIBLE or TASK_UNINTERRUPTIBLE. Prevents “thundering herd”. ? A process’ state may be modified asynchronously. SMU SM Atomic Operations ? Two types – Bitmap – atomic_t ? Wrapped by bus locking on SMP ? Bitmap operations – for free/allocated bitmaps – set_bit(), clear_bit(), change_bit(), test_and_set_bit() etc. ? atomic_t operations – for numeric counts – atomic_read(), atomic_set(), atomic_add(), atomic_inc() etc. SMU SM References ? The SGI Origin software environment and application performance , Whitney, S.。 McCalpin, J.。 Bitar, N.。 Richardson, .。 Stevens, L., Compcon 39。97. Proceedings, IEEE , 1997, Page(s): 165 170 ? An Integrated Kernel and UserLevel Paradigm for Efficient Multiprogramming, Master’s Thesis, D. Craig, CSRD Technical Report No. 1533, University of Illinois at UrbanaChampaign, 1999. ? Integrated scheduling of multimedia and hard realtime tasks, Kaneko, H.。 Stankovic, .。 Sen, S.。 Ramamritham, K., RealTime Systems Symposium, 1996., 17th IEEE , 1996, Page(s): 206 217 ? An Efficient Kernellevel Scheduling Methodology for Multiprogrammed Shared Memory Multiprocessors, Proc. of the First Merged IPPS/SPDP Conference, pp. 392397, Orlando, FL, 1998. 18 ? Topics in IRIX Programming, Chapter 2, Interprocess Communication, Silicon Graphics, Inc., 2022 ? Topics in IRIX Programming, Chapter 3, Sharing Memory Between Processes, Silicon Graphics, Inc., 2022 SMU SM References ? Phyllis E. Crandall, Eranti V. Sumithasri, and Mark A. Clement. Performance parison of desktop multiprocessing and workstation cluster puting. In Proceedings of the Fifth International Symposium on High Performance Distributed Computing, August 1996. ? ? Kotz, David and Nils Nieuwajaar, Flexibility and Performance of Parallel File Systems, ACM Operating Systems Review 30(2), ACM Press, April 1996, pp. 6373