1 / 15

Process Management

Process Management. Version B.02 H4262S Module 4 Slides. The HP-UX Operating System. User Level. ( Gateway ). Kernel Level. System Call Interface. Interprocess. File Subsystem. Process. Communication. Scheduler. Control. Buffer Cache. Subsystem.

jess
Download Presentation

Process Management

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Process Management Version B.02 H4262S Module 4 Slides

  2. The HP-UX Operating System User Level ( Gateway ) Kernel Level System Call Interface Interprocess File Subsystem Process Communication Scheduler Control Buffer Cache Subsystem Memory Management Character Block I/O Subsystem Device Drivers Hardware Control Interface Kernel Level Hardware Level Hardware Devices

  3. 32-bit Text Data Shared Objects Shared Objects Virtual Address Process Space 64-bit Shared Objects Text (1GB/quadrant) (4TB/quadrant) Data Shared Objects

  4. Physical Process Components Kernel Proc Table Entry OS Tables Text MemMap Data LibTxt Stack ShMem UArea Memory

  5. filesys filesys C C End P P Cache Process U U Starts C P U Main CPU Stop Memory Disk Queue Swap The Life Cycle of a Process

  6. USER STOP MODE ZOMBIE SRUN SSTOP SZOMB Go to Go to user mode kernel Exit Debugger or Job mode Control Stop fork SLEEP RUNNABLE IDLE completes KERNEL (IN (IN MODE MEMORY) MEMORY) SIDL SRUN SSLEEP SRUN Context Wait on an event Switch SLEEP Wakeup, event completed (SWAP RUNNABLE (SWAP DEVICE) Wakeup, current completed DEVICE) SSLEEP SRUN Process States

  7. CPU Scheduler • The CPU scheduler handles: • Context switches • Interrupts CPU Scheduler Kernel CPU OS Tables Proc A pri=156 Proc B pri=220 Proc C pri=172 Proc D pri=186 Memory

  8. Context Switching A context switch occurs when • A timeslice expires (a thread accumulates 10 clock ticks)(Forced) • A preemption occurs (a stronger priority thread is runnable)(Forced)- if the stronger thread is RT, immediate preemption- if the stronger thread is not RT, at next convenient time • A thread becomes non-computable, i.e. - it goes to sleep- it is stopped- it exits(Voluntary)

  9. Priority Queues 128 - 152 - 172 - 176 - 180 - 252 - -32 -1 0 1 2 127 131 155 175 179 183 255 . . . . . . . . . . . . . . . PSWP PZERO PUSER (128) (153) (178) Real Time Priority Queues (1 priority wide) Time-shared Priority Queues (4 priorities wide) POSIX Real Time (rtsched) HP-UX Real Time (rtprio) System Level Priorities User Level Priorities Signalable Priorities Nonsignalable Signalable Priorities

  10. Time Share Priority 128 255 nice = 20 ProcB ProcA nice = 39 (ProcA nice=20) (ProcB nice=39) ProcA ProcA ProcA ProcA ProcA Running Sleeping Running Sleeping Running ProcB ProcB ProcB ProcB ProcB Running Sleeping Sleeping Sleeping Running

  11. Parent-Child Process Relationship Kernel OS Tables ksh sam ksh su csh sh glance sh Memory

  12. glance – Process List B3692A GlancePlus B.10.12 14:52:27 e2403roc 9000/856 Current Avg High -------------------------------------------------------------------------------- CPU Util S SN NU | 22% 29% 51% Disk Util F | 1% 7% 13% Mem Util S SU UB B | 91% 91% 91% Swap Util U UR R | 25% 24% 35% -------------------------------------------------------------------------------- PROCESS LIST Users= 11 User CPU Util Cum Disk Block Process Name PID PPID Pri Name ( 100 max) CPU IO Rate RSS On -------------------------------------------------------------------------------- netscape 16013 12988 154 sohrab 12.9/14.0 64.9 0.0/ 0.6 14.7mb SLEEP supsched 18 0 100 root 2.9/ 2.1 942.6 0.0/ 0.0 16kb IPC lmx.srv 1219 1121 154 root 1.6/ 0.9 389.4 0.5/ 0.0 2.7mb SLEEP glance 15726 15396 156 root 0.6/ 0.9 2.0 0.0/ 0.2 4.0mb TERM statdaemon 3 0 128 root 0.6/ 0.7 302.1 0.0/ 0.0 16kb SLEEP midaemon 1051 1050 50 root 0.4/ 0.4 201.4 0.0/ 0.0 1.3mb SYSTM ttisr 7 0 -32 root 0.4/ 0.3 121.0 0.0/ 0.0 16kb TERM dtterm 15559 15558 154 roc 0.4/ 0.4 1.6 0.0/ 0.0 6.2mb SLEEP rep_server 1098 1084 154 root 0.2/ 0.1 23.7 0.0/ 0.0 2.0mb SOCKT syncer 325 1 154 root 0.2/ 0.0 20.2 0.1/ 0.0 1.0mb SLEEP xload 13569 13531 154 al 0.2/ 0.0 2.4 0.0/ 0.0 2.6mb SLEEP Page 1 of 13

  13. glance – Individual Process B3692A GlancePlus B.10.12 15:17:52 e2403roc 9000/856 Current Avg High -------------------------------------------------------------------------------- CPU Util S SN NU | 22% 29% 51% Disk Util F | 1% 7% 13% Mem Util S SU UB B | 91% 91% 91% Swap Util U UR R | 25% 24% 35% -------------------------------------------------------------------------------- Resource Usage for PID: 16013, netscape PPID: 12988 euid: 520 User:sohrab -------------------------------------------------------------------------------- CPU Usage (sec) : 3.38 Log Reads : 166 Rem Log Rds/Wts: 0/ 0 User/Nice/RT CPU: 2.43 Log Writes: 75 Rem Phy Rds/Wts: 0/ 0 System CPU : 0.73 Phy Reads : 4 Interrupt CPU : 0.14 Phy Writes: 61 Total RSS/VSS : 22.4mb/ 28.3mb Cont Switch CPU : 0.08 FS Reads : 4 Traps / Vfaults: 414/ 8 Scheduler : HPUX FS Writes : 29 Faults Mem/Disk: 0/ 0 Priority : 154 VM Reads : 0 Deactivations : 0 Nice Value : 24 VM Writes : 0 Forks & Vforks : 0 Dispatches : 1307 Sys Reads : 0 Signals Recd : 339 Forced CSwitch : 460 Sys Writes: 32 Mesg Sent/Recd : 775/ 1358 VoluntaryCSwitch: 814 Raw Reads : 0 Other Log Rd/Wt: 3924/ 957 Running CPU : 0 Raw Writes: 0 Other Phy Rd/Wt: 0/ 0 CPU Switches : 0 Bytes Xfer: 410kb Proc Start Time Wait Reason : SLEEP Fri Feb 6 15:14:45 1998

  14. glance – Process Memory Regions B3692A GlancePlus B.10.12 10:17:41 e2403roc 9000/856 Current Avg High -------------------------------------------------------------------------------- CPU Util S SN NU | 22% 29% 51% Disk Util F | 1% 7% 13% Mem Util S SU UB B | 91% 91% 91% Swap Util U UR R | 25% 24% 35% -------------------------------------------------------------------------------- Memory Regions for PID: 16013, netscape PPID: 14061 euid: 520 User:sohrab Type RefCt RSS VSS Locked Virtual Address File Name -------------------------------------------------------------------------------- NULLDR/S 64 4kb 4kb 0kb 0x00004f15.0x00000000 <nulldref> TEXT /S 3 4.3mb 9.5mb 0kb 0x00004f15.0x00001000 <reg,vxfs,inode:16841, DATA /P 1 5.8mb 8.6mb 0kb 0x00004955.0x40001000 <reg,vxfs,inode:16841, MEMMAP/P 1 4kb 20kb 0kb 0x00004955.0x7af70000 <reg,vxfs,inode:836... MEMMAP/P 1 36kb 36kb 0kb 0x00004955.0x7afa8000 <reg,vxfs,inode:336... MEMMAP/P 1 12kb 12kb 0kb 0x00004955.0x7b037000 <reg,vxfs,inode:816... STACK /P 1 28kb 28kb 0kb 0x00004955.0x7b03a000 <stack> UAREA /P 1 16kb 16kb 0kb 0x000010e4.0x7ffe6000 <uarea> LIBTXT/S 85 56kb 60kb 0kb 0x00000000.0xc0002000 <reg,vxfs,inode:816... Text RSS/VSS:4.3mb/9.5mb Data RSS/VSS:5.8mb/8.6mb Stack RSS/VSS: 28kb/ 28kb Shmem RSS/VSS: 0kb/ 0kb Other RSS/VSS:4.1mb/5.7mb

  15. glance – Process Wait States B3692A GlancePlus B.10.12 10:23:03 e2403roc 9000/856 Current Avg High -------------------------------------------------------------------------------- CPU Util S SN NU | 22% 29% 51% Disk Util F | 1% 7% 13% Mem Util S SU UB B | 91% 91% 91% Swap Util U UR R | 25% 24% 35% -------------------------------------------------------------------------------- Wait States for PID: 14205, netscape PPID: 14061 euid: 520 User:sohrab Event % Blocked On % -------------------------------------------------------------------------------- IPC : 0.0 Cache : 0.0 CPU Util : 13.7 Job Control: 0.0 CDROM IO : 0.0 Wait Reason: SLEEP Message : 0.0 Disk IO : 0.0 Pipe : 0.0 Graphics : 0.0 Semaphore : 0.0 Inode : 0.0 Sleep : 77.2 IO : 0.0 Socket : 0.0 LAN : 0.0 Terminal : 0.0 NFS : 0.0 Other : 0.0 Priority : 9.1 RPC : 0.0 System : 0.0 Virtual Mem: 0.0 C - cum/interval toggle % - pct/absolute toggle Page 1 of 1

More Related