컴퓨터 사이언스/컴퓨터 구조 & 운영체제

[혼공컴운] 운영체제 chapter 10

공대핫산 2024. 1. 28. 10:10

프로세스 개요

프로세스 직접 확인하기

더보기
F S UID          PID    PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD
4 S root           1       0  0  80   0 - 41681 -      04:08 ?        00:00:02 /sbin/init splash
1 S root           2       0  0  80   0 -     0 -      04:08 ?        00:00:00 [kthreadd]
1 I root           3       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [rcu_gp]
1 I root           4       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [rcu_par_gp]
1 I root           5       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [slub_flushwq]
1 I root           6       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [netns]
1 I root           8       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [kworker/0:0H-events_highpri]
1 I root          11       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [mm_percpu_wq]
1 I root          12       2  0  80   0 -     0 -      04:08 ?        00:00:00 [rcu_tasks_kthread]
1 I root          13       2  0  80   0 -     0 -      04:08 ?        00:00:00 [rcu_tasks_rude_kthread]
1 I root          14       2  0  80   0 -     0 -      04:08 ?        00:00:00 [rcu_tasks_trace_kthread]
1 S root          15       2  0  80   0 -     0 -      04:08 ?        00:00:00 [ksoftirqd/0]
1 I root          16       2  0  80   0 -     0 -      04:08 ?        00:00:26 [rcu_preempt]
1 S root          17       2  0 -40   - -     0 -      04:08 ?        00:00:00 [migration/0]
1 S root          18       2  0   9   - -     0 -      04:08 ?        00:00:00 [idle_inject/0]
1 S root          19       2  0  80   0 -     0 -      04:08 ?        00:00:00 [cpuhp/0]
5 S root          20       2  0  80   0 -     0 -      04:08 ?        00:00:00 [cpuhp/1]
1 S root          21       2  0   9   - -     0 -      04:08 ?        00:00:00 [idle_inject/1]
1 S root          22       2  0 -40   - -     0 -      04:08 ?        00:00:00 [migration/1]
1 S root          23       2  0  80   0 -     0 -      04:08 ?        00:00:00 [ksoftirqd/1]
1 I root          25       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [kworker/1:0H-events_highpri]
5 S root          26       2  0  80   0 -     0 -      04:08 ?        00:00:00 [cpuhp/2]
1 S root          27       2  0   9   - -     0 -      04:08 ?        00:00:00 [idle_inject/2]
1 S root          28       2  0 -40   - -     0 -      04:08 ?        00:00:00 [migration/2]
1 S root          29       2  0  80   0 -     0 -      04:08 ?        00:00:00 [ksoftirqd/2]
1 I root          31       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [kworker/2:0H-events_highpri]
5 S root          32       2  0  80   0 -     0 -      04:08 ?        00:00:00 [cpuhp/3]
1 S root          33       2  0   9   - -     0 -      04:08 ?        00:00:00 [idle_inject/3]
1 S root          34       2  0 -40   - -     0 -      04:08 ?        00:00:00 [migration/3]
1 S root          35       2  0  80   0 -     0 -      04:08 ?        00:00:00 [ksoftirqd/3]
1 I root          37       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [kworker/3:0H-events_highpri]
5 S root          38       2  0  80   0 -     0 -      04:08 ?        00:00:00 [cpuhp/4]
1 S root          39       2  0   9   - -     0 -      04:08 ?        00:00:00 [idle_inject/4]
1 S root          40       2  0 -40   - -     0 -      04:08 ?        00:00:00 [migration/4]
1 S root          41       2  0  80   0 -     0 -      04:08 ?        00:00:00 [ksoftirqd/4]
1 I root          43       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [kworker/4:0H-events_highpri]
5 S root          44       2  0  80   0 -     0 -      04:08 ?        00:00:00 [cpuhp/5]
1 S root          45       2  0   9   - -     0 -      04:08 ?        00:00:00 [idle_inject/5]
1 S root          46       2  0 -40   - -     0 -      04:08 ?        00:00:00 [migration/5]
1 S root          47       2  0  80   0 -     0 -      04:08 ?        00:00:30 [ksoftirqd/5]
1 I root          49       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [kworker/5:0H-events_highpri]
5 S root          50       2  0  80   0 -     0 -      04:08 ?        00:00:00 [cpuhp/6]
1 S root          51       2  0   9   - -     0 -      04:08 ?        00:00:00 [idle_inject/6]
1 S root          52       2  0 -40   - -     0 -      04:08 ?        00:00:00 [migration/6]
1 S root          53       2  0  80   0 -     0 -      04:08 ?        00:00:00 [ksoftirqd/6]
1 I root          55       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [kworker/6:0H-events_highpri]
5 S root          56       2  0  80   0 -     0 -      04:08 ?        00:00:00 [cpuhp/7]
1 S root          57       2  0   9   - -     0 -      04:08 ?        00:00:00 [idle_inject/7]
1 S root          58       2  0 -40   - -     0 -      04:08 ?        00:00:00 [migration/7]
1 S root          59       2  0  80   0 -     0 -      04:08 ?        00:00:00 [ksoftirqd/7]
1 I root          61       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [kworker/7:0H-events_highpri]
5 S root          62       2  0  80   0 -     0 -      04:08 ?        00:00:00 [kdevtmpfs]
1 I root          63       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [inet_frag_wq]
1 S root          65       2  0  80   0 -     0 -      04:08 ?        00:00:00 [kauditd]
1 S root          66       2  0  80   0 -     0 -      04:08 ?        00:00:00 [khungtaskd]
1 S root          67       2  0  80   0 -     0 -      04:08 ?        00:00:00 [oom_reaper]
1 I root          69       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [writeback]
1 S root          70       2  0  80   0 -     0 -      04:08 ?        00:00:12 [kcompactd0]
1 S root          71       2  0  85   5 -     0 -      04:08 ?        00:00:00 [ksmd]
1 S root          72       2  0  99  19 -     0 -      04:08 ?        00:00:00 [khugepaged]
1 I root          73       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [kintegrityd]
1 I root          74       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [kblockd]
1 I root          75       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [blkcg_punt_bio]
1 I root          77       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [tpm_dev_wq]
1 I root          78       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [ata_sff]
1 I root          79       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [md]
1 I root          80       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [md_bitmap]
1 I root          81       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [edac-poller]
1 I root          82       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [devfreq_wq]
1 S root          83       2  0   9   - -     0 -      04:08 ?        00:00:00 [watchdogd]
1 I root          85       2  0  60 -20 -     0 -      04:08 ?        00:00:02 [kworker/0:1H-events_highpri]
1 S root          86       2  0  80   0 -     0 -      04:08 ?        00:00:00 [kswapd0]
1 S root          87       2  0  80   0 -     0 -      04:08 ?        00:00:00 [ecryptfs-kthread]
1 I root          89       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [kthrotld]
1 S root          90       2  0   9   - -     0 -      04:08 ?        00:00:00 [irq/122-aerdrv]
1 S root          91       2  0   9   - -     0 -      04:08 ?        00:00:00 [irq/123-aerdrv]
1 I root          92       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [acpi_thermal_pm]
1 S root          94       2  0  80   0 -     0 -      04:08 ?        00:00:00 [hwrng]
1 I root          96       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [mld]
1 I root          97       2  0  60 -20 -     0 -      04:08 ?        00:00:02 [kworker/2:1H-events_highpri]
1 I root          98       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [ipv6_addrconf]
1 I root         105       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [kstrp]
1 I root         114       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [charger_manager]
1 I root         134       2  0  60 -20 -     0 -      04:08 ?        00:00:01 [kworker/3:1H-events_highpri]
1 I root         137       2  0  60 -20 -     0 -      04:08 ?        00:00:01 [kworker/1:1H-kblockd]
1 I root         150       2  0  60 -20 -     0 -      04:08 ?        00:00:03 [kworker/4:1H-kblockd]
1 I root         151       2  0  60 -20 -     0 -      04:08 ?        00:00:02 [kworker/7:1H-events_highpri]
1 I root         152       2  0  60 -20 -     0 -      04:08 ?        00:00:03 [kworker/5:1H-kblockd]
1 I root         153       2  0  60 -20 -     0 -      04:08 ?        00:00:03 [kworker/6:1H-events_highpri]
1 S root         172       2  0  80   0 -     0 -      04:08 ?        00:00:00 [scsi_eh_0]
1 I root         173       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [scsi_tmf_0]
1 S root         174       2  0  80   0 -     0 -      04:08 ?        00:00:00 [scsi_eh_1]
1 I root         175       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [scsi_tmf_1]
1 S root         176       2  0  80   0 -     0 -      04:08 ?        00:00:00 [scsi_eh_2]
1 I root         177       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [scsi_tmf_2]
1 S root         183       2  0   9   - -     0 -      04:08 ?        00:00:00 [irq/109-FTE1200:00]
1 I root         195       2  0  80   0 -     0 -      04:08 ?        00:00:05 [kworker/1:2-events]
1 S root         201       2  0  80   0 -     0 -      04:08 ?        00:00:00 [spi0]
1 S root         223       2  0  80   0 -     0 -      04:08 ?        00:00:06 [jbd2/sda3-8]
1 I root         224       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [ext4-rsv-conver]
4 S root         264       1  0  79  -1 - 14181 -      04:08 ?        00:00:01 /lib/systemd/systemd-journald
4 S root         299       1  0  80   0 -  6745 -      04:08 ?        00:00:00 /lib/systemd/systemd-udevd
1 I root         357       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [asus_wireless_w]
1 S root         366       2  0   9   - -     0 -      04:08 ?        00:00:00 [irq/126-mei_me]
1 I root         383       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [cfg80211]
1 S root         411       2  0   9   - -     0 -      04:08 ?        00:00:56 [irq/127-iwlwifi]
1 I root         422       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [led_workqueue]
1 I root         426       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [cryptd]
1 I root         512       2  0  60 -20 -     0 -      04:08 ?        00:00:00 [ttm]
1 S root         513       2  0  80   0 -     0 -      04:08 ?        00:00:00 [nv_queue]
1 S root         514       2  0  80   0 -     0 -      04:08 ?        00:00:00 [nv_queue]
1 S root         515       2  0   9   - -     0 -      04:08 ?        00:00:00 [card0-crtc0]
1 S root         516       2  0   9   - -     0 -      04:08 ?        00:00:00 [card0-crtc1]
1 S root         517       2  0   9   - -     0 -      04:08 ?        00:00:00 [card0-crtc2]
1 S root         563       2  0  80   0 -     0 -      04:08 ?        00:00:00 [nvidia-modeset/kthread_q]
1 S root         564       2  0  80   0 -     0 -      04:08 ?        00:00:00 [nvidia-modeset/deferred_close_kthread_q]
4 S systemd+     568       1  0  80   0 -  3708 -      04:08 ?        00:01:04 /lib/systemd/systemd-oomd
4 S systemd+     569       1  0  80   0 -  6483 -      04:08 ?        00:00:04 /lib/systemd/systemd-resolved
4 S systemd+     570       1  0  80   0 - 22346 -      04:08 ?        00:00:00 /lib/systemd/systemd-timesyncd
1 S root         628       2  0   9   - -     0 -      04:08 ?        00:00:31 [irq/130-nvidia]
1 S root         630       2  0  80   0 -     0 -      04:08 ?        00:00:00 [nvidia]
1 S root         631       2  0  80   0 -     0 -      04:08 ?        00:00:26 [nv_queue]
4 S root         723       1  0  80   0 - 60482 -      04:08 ?        00:00:00 /usr/libexec/accounts-daemon
4 S root         724       1  0  80   0 -   704 -      04:08 ?        00:00:03 /usr/sbin/acpid
4 S avahi        727       1  0  80   0 -  1907 -      04:08 ?        00:00:01 avahi-daemon: running [han-X510UQR.local]
4 S root         728       1  0  80   0 -  2650 -      04:08 ?        00:00:00 /usr/lib/bluetooth/bluetoothd
4 S root         729       1  0  80   0 -  2702 -      04:08 ?        00:00:00 /usr/sbin/cron -f -P
4 S message+     731       1  0  80   0 -  2772 -      04:08 ?        00:00:05 @dbus-daemon --system --address=systemd: --nofork --nopidfil
4 S root         733       1  0  80   0 - 65801 -      04:08 ?        00:00:05 /usr/sbin/NetworkManager --no-daemon
4 S root         740       1  0  80   0 - 20693 -      04:08 ?        00:00:04 /usr/sbin/irqbalance --foreground
4 S root         743       1  0  80   0 - 10581 -      04:08 ?        00:00:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-
4 S root         745       1  0  80   0 - 61230 -      04:08 ?        00:00:03 /usr/libexec/polkitd --no-debug
4 S root         747       1  0  80   0 - 60421 -      04:08 ?        00:00:00 /usr/libexec/power-profiles-daemon
4 S syslog       749       1  0  80   0 - 55601 -      04:08 ?        00:00:00 /usr/sbin/rsyslogd -n -iNONE
4 S root         752       1  0  80   0 - 459159 -     04:08 ?        00:00:06 /usr/lib/snapd/snapd
4 S root         754       1  0  80   0 - 59487 -      04:08 ?        00:00:00 /usr/libexec/switcheroo-control
4 S root         757       1  0  80   0 - 12067 -      04:08 ?        00:00:00 /lib/systemd/systemd-logind
4 S root         760       1  0  80   0 - 69373 -      04:08 ?        00:00:13 /usr/sbin/thermald --systemd --dbus-enable --adaptive
4 S root         761       1  0  80   0 - 98298 -      04:08 ?        00:00:03 /usr/libexec/udisks2/udisksd
4 S root         764       1  0  80   0 -  4425 -      04:08 ?        00:00:00 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant
1 S avahi        771     727  0  80   0 -  1861 -      04:08 ?        00:00:00 avahi-daemon: chroot helper
4 S root         849       1  0  80   0 - 79492 -      04:08 ?        00:00:00 /usr/sbin/ModemManager
4 S root         854       1  0  80   0 - 18451 -      04:08 ?        00:00:00 /usr/sbin/cupsd -l
4 S root         857       1  0  80   0 - 29867 -      04:08 ?        00:00:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-u
4 S root         883       1  0  80   0 - 60676 -      04:08 ?        00:00:00 /usr/sbin/gdm3
1 S root         906       2  0  80   0 -     0 -      04:08 ?        00:00:00 [UVM global queue]
1 S root         907       2  0  80   0 -     0 -      04:08 ?        00:00:00 [UVM deferred release queue]
1 S root         908       2  0  80   0 -     0 -      04:08 ?        00:00:00 [UVM Tools Event Queue]
5 S nvidia-+     923       1  0  80   0 -  1331 -      04:08 ?        00:00:00 /usr/bin/nvidia-persistenced --user nvidia-persistenced --no
4 S root         929     883  0  80   0 - 42981 -      04:08 ?        00:00:00 gdm-session-worker [pam/gdm-autologin]
4 S han          940       1  0  80   0 -  4500 ep_pol 04:08 ?        00:00:00 /lib/systemd/systemd --user
5 S han          941     940  0  80   0 - 42470 -      04:08 ?        00:00:00 (sd-pam)
0 S han          950     940  0  69 -11 - 10291 ep_pol 04:08 ?        00:00:00 /usr/bin/pipewire
0 S han          951     940  0  80   0 -  6232 ep_pol 04:08 ?        00:00:00 /usr/bin/pipewire-media-session
0 S han          952     940  0  69 -11 - 375041 do_pol 04:08 ?       00:03:32 /usr/bin/pulseaudio --daemonize=no --log-target=journal
0 S han          955     940  0  80   0 - 288302 futex_ 04:08 ?       00:00:00 /usr/bin/ubuntu-report service
1 S han          959       1  0  80   0 - 97547 do_pol 04:08 ?        00:00:01 /usr/bin/gnome-keyring-daemon --daemonize --login
4 S rtkit        968       1  0  81   1 - 38501 -      04:08 ?        00:00:00 /usr/libexec/rtkit-daemon
0 S han          998     940  0  80   0 -  2434 ep_pol 04:08 ?        00:00:05 /usr/bin/dbus-daemon --session --address=systemd: --nofork -
4 S han          999     929  0  80   0 - 40982 do_pol 04:08 tty2     00:00:00 /usr/libexec/gdm-x-session --run-script env GNOME_SHELL_SESS
4 S han         1001     999  4  80   0 - 2000636 ep_pol 04:08 tty2   00:19:45 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm
4 S root        1011       1  0  80   0 - 60982 -      04:08 ?        00:00:01 /usr/libexec/upowerd
0 S han         1015     940  0  80   0 - 60543 do_pol 04:08 ?        00:00:00 /usr/libexec/gvfsd
0 S han         1021     940  0  80   0 - 95223 futex_ 04:08 ?        00:00:00 /usr/libexec/gvfsd-fuse /run/user/1000/gvfs -f
5 S root        1080       2  0  70 -10 -     0 -      04:08 ?        00:00:00 [krfcommd]
0 S han         1126     940  0  80   0 - 153068 do_pol 04:08 ?       00:00:00 /usr/libexec/xdg-document-portal
0 S han         1130     940  0  99   - - 180513 do_pol 04:08 ?       00:00:03 /usr/libexec/tracker-miner-fs-3
0 S han         1131     940  0  80   0 - 59446 do_pol 04:08 ?        00:00:00 /usr/libexec/xdg-permission-store
4 S root        1137    1126  0  80   0 -   699 -      04:08 ?        00:00:00 fusermount3 -o rw,nosuid,nodev,fsname=portal,auto_unmount,su
0 S han         1148     940  0  80   0 - 79435 do_pol 04:08 ?        00:00:01 /usr/libexec/gvfs-udisks2-volume-monitor
0 S han         1165     940  0  80   0 - 59489 do_pol 04:08 ?        00:00:00 /usr/libexec/gvfs-mtp-volume-monitor
0 S han         1171     940  0  80   0 - 59761 do_pol 04:08 ?        00:00:00 /usr/libexec/gvfs-gphoto2-volume-monitor
0 S han         1175     940  0  80   0 - 59731 do_pol 04:08 ?        00:00:00 /usr/libexec/gvfs-goa-volume-monitor
0 S han         1179     940  0  80   0 - 163541 do_pol 04:08 ?       00:00:05 /usr/libexec/goa-daemon
0 S han         1190     940  0  80   0 - 85013 do_pol 04:08 ?        00:00:01 /usr/libexec/goa-identity-service
0 S han         1193     940  0  80   0 - 79183 do_pol 04:08 ?        00:00:01 /usr/libexec/gvfs-afc-volume-monitor
0 S han         1314     940  0  80   0 - 60531 do_pol 04:08 ?        00:00:00 /usr/bin/gnome-keyring-daemon --start --foreground --compone
0 S han         1323     999  0  80   0 - 56134 do_pol 04:08 tty2     00:00:00 /usr/libexec/gnome-session-binary --session=ubuntu
0 S han         1382     940  0  80   0 - 77442 do_pol 04:08 ?        00:00:00 /usr/libexec/at-spi-bus-launcher
0 S han         1392    1382  0  80   0 -  2141 ep_pol 04:08 ?        00:00:02 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-sp
0 S han         1402     940  0  80   0 - 40689 do_pol 04:08 ?        00:00:10 /usr/libexec/at-spi2-registryd --use-gnome-session
0 S han         1448     940  0  80   0 - 23305 do_pol 04:08 ?        00:00:00 /usr/libexec/gnome-session-ctl --monitor
0 S han         1459     940  0  80   0 - 111945 do_pol 04:08 ?       00:00:02 /usr/libexec/gnome-session-binary --systemd-service --sessio
0 S han         1485     940  4  80   0 - 1443111 do_pol 04:08 ?      00:21:06 /usr/bin/gnome-shell
4 S han         1542     940  0  80   0 - 19063 do_wai 04:08 ?        00:00:00 /snap/snapd-desktop-integration/83/usr/bin/snapd-desktop-int
1 S han         1615    1542  0  80   0 - 76060 do_pol 04:08 ?        00:00:00 /snap/snapd-desktop-integration/83/usr/bin/snapd-desktop-int
0 S han         1619     940  0  80   0 - 254664 do_pol 04:08 ?       00:00:01 /usr/libexec/xdg-desktop-portal
0 S han         1623     940  0  80   0 - 394679 do_pol 04:08 ?       00:00:06 /usr/libexec/xdg-desktop-portal-gnome
0 S han         1646     940  0  80   0 - 199029 do_pol 04:08 ?       00:00:00 /usr/libexec/gnome-shell-calendar-server
0 S han         1660     940  0  80   0 - 203925 do_pol 04:08 ?       00:00:00 /usr/libexec/evolution-source-registry
0 S han         1662     940  0  80   0 - 86110 do_pol 04:08 ?        00:00:01 /usr/libexec/xdg-desktop-portal-gtk
0 S han         1670     940  0  80   0 - 716846 do_pol 04:08 ?       00:00:00 /usr/bin/gjs /usr/share/gnome-shell/org.gnome.ScreenSaver
0 S han         1684     940  0  80   0 - 39274 do_pol 04:08 ?        00:00:00 /usr/libexec/dconf-service
0 S han         1688     940  0  80   0 - 41185 do_pol 04:08 ?        00:00:00 /usr/libexec/gvfsd-metadata
0 S han         1697     940  0  80   0 - 401948 do_pol 04:08 ?       00:00:03 /usr/libexec/evolution-calendar-factory
4 S root        1700       1  0  80   0 - 93664 -      04:08 ?        00:00:07 /usr/libexec/packagekitd
0 S han         1726     940  0  80   0 - 168506 do_pol 04:08 ?       00:00:00 /usr/libexec/evolution-addressbook-factory
4 S clamav      1739       1  0  80   0 - 14780 -      04:08 ?        00:00:00 /usr/bin/freshclam -d --foreground=true
4 S root        1742       1  0  80   0 - 43157 -      04:08 ?        00:00:00 /usr/sbin/cups-browsed
1 S kernoops    1747       1  0  80   0 -  3272 -      04:08 ?        00:00:00 /usr/sbin/kerneloops --test
1 S kernoops    1755       1  0  80   0 -  3272 -      04:08 ?        00:00:00 /usr/sbin/kerneloops
0 S han         1771     940  0  80   0 - 716824 do_pol 04:08 ?       00:00:00 /usr/bin/gjs /usr/share/gnome-shell/org.gnome.Shell.Notifica
0 S han         1773    1015  0  80   0 - 79104 do_pol 04:08 ?        00:00:00 /usr/libexec/gvfsd-trash --spawner :1.5 /org/gtk/gvfs/exec_s
0 S han         1806     940  0  80   0 -   723 do_wai 04:08 ?        00:00:00 sh -c /usr/bin/ibus-daemon --panel disable $([ "$XDG_SESSION
0 S han         1807     940  0  80   0 - 78039 do_pol 04:08 ?        00:00:00 /usr/libexec/gsd-a11y-settings
0 S han         1809    1806  0  80   0 - 79283 do_pol 04:08 ?        00:02:30 /usr/bin/ibus-daemon --panel disable --xim
0 S han         1810     940  0  80   0 - 188881 do_pol 04:08 ?       00:00:01 /usr/libexec/gsd-color
0 S han         1812     940  0  80   0 - 94295 do_pol 04:08 ?        00:00:00 /usr/libexec/gsd-datetime
0 S han         1813     940  0  80   0 - 78442 do_pol 04:08 ?        00:00:01 /usr/libexec/gsd-housekeeping
0 S han         1815     940  0  80   0 - 85778 do_pol 04:08 ?        00:00:00 /usr/libexec/gsd-keyboard
0 S han         1818     940  0  80   0 - 216824 do_pol 04:08 ?       00:00:02 /usr/libexec/gsd-media-keys
0 S han         1820     940  0  80   0 - 113325 do_pol 04:08 ?       00:00:01 /usr/libexec/gsd-power
0 S han         1822     940  0  80   0 - 62852 do_pol 04:08 ?        00:00:00 /usr/libexec/gsd-print-notifications
0 S han         1823     940  0  80   0 - 114852 do_pol 04:08 ?       00:00:00 /usr/libexec/gsd-rfkill
0 S han         1826     940  0  80   0 - 59460 do_pol 04:08 ?        00:00:00 /usr/libexec/gsd-screensaver-proxy
0 S han         1827     940  0  80   0 - 116913 do_pol 04:08 ?       00:00:02 /usr/libexec/gsd-sharing
0 S han         1829     940  0  80   0 - 96940 do_pol 04:08 ?        00:00:00 /usr/libexec/gsd-smartcard
0 S han         1830     940  0  80   0 - 80267 do_pol 04:08 ?        00:00:00 /usr/libexec/gsd-sound
0 S han         1831     940  0  80   0 - 85849 do_pol 04:08 ?        00:00:00 /usr/libexec/gsd-wacom
0 S han         1833     940  0  80   0 - 86266 do_pol 04:08 ?        00:00:01 /usr/libexec/gsd-xsettings
0 S han         1853    1459  0  80   0 - 249248 do_pol 04:08 ?       00:00:00 /usr/libexec/evolution-data-server/evolution-alarm-notify
0 S han         1867    1459  0  80   0 - 58067 do_pol 04:08 ?        00:00:00 /usr/libexec/gsd-disk-utility-notify
0 S han         1906    1809  0  80   0 - 41279 do_pol 04:08 ?        00:00:00 /usr/libexec/ibus-memconf
0 S han         1907    1809  0  80   0 - 68538 do_pol 04:08 ?        00:00:41 /usr/libexec/ibus-extension-gtk3
0 S han         1910     940  0  80   0 - 48935 do_pol 04:08 ?        00:00:00 /usr/libexec/ibus-x11 --kill-daemon
0 S han         1917     940  0  80   0 - 59717 do_pol 04:08 ?        00:00:00 /usr/libexec/ibus-portal
4 S han         1922     940  0  80   0 - 216172 do_pol 04:08 ?       00:00:07 /snap/snap-store/959/usr/bin/snap-store --gapplication-servi
4 S colord      1970       1  0  80   0 - 61755 -      04:08 ?        00:00:00 /usr/libexec/colord
0 S han         2006     940  0  80   0 - 85977 do_pol 04:08 ?        00:00:00 /usr/libexec/gsd-printer
0 S han         2098    1809  0  80   0 - 60053 do_pol 04:08 ?        00:00:37 /usr/libexec/ibus-engine-hangul --ibus
0 S han         2238    1485  0  80   0 - 790510 do_pol 04:08 ?       00:00:15 gjs /usr/share/gnome-shell/extensions/ding@rastersoft.com/di
4 S han         3846    1485  6  80   0 - 8627979 do_pol 04:09 ?      00:26:43 /opt/google/chrome/chrome
0 S han         3851    3846  0  80   0 -  2456 pipe_r 04:09 ?        00:00:00 cat
0 S han         3852    3846  0  80   0 -  2456 pipe_r 04:09 ?        00:00:00 cat
0 S han         3854     940  0  80   0 - 8394254 ep_pol 04:09 ?      00:00:00 /opt/google/chrome/chrome_crashpad_handler --monitor-self --
0 S han         3856     940  0  80   0 - 8391945 ep_pol 04:09 ?      00:00:00 /opt/google/chrome/chrome_crashpad_handler --no-periodic-tas
0 S han         3862    3846  0  80   0 - 8480858 do_pol 04:09 ?      00:00:00 /opt/google/chrome/chrome --type=zygote --no-zygote-sandbox 
4 S han         3863    3846  0  80   0 - 8480856 do_wai 04:09 ?      00:00:00 /opt/google/chrome/chrome --type=zygote --crashpad-handler-p
5 S han         3865    3863  0  80   0 - 8480863 do_pol 04:09 ?      00:00:03 /opt/google/chrome/chrome --type=zygote --crashpad-handler-p
1 S han         3896    3862  9  80   0 - 8613824 do_pol 04:09 ?      00:42:06 /opt/google/chrome/chrome --type=gpu-process --crashpad-hand
0 S han         3898    3846  1  80   0 - 8489612 futex_ 04:09 ?      00:07:02 /opt/google/chrome/chrome --type=utility --utility-sub-type=
1 S han         3908    3865  0  80   0 - 8495850 futex_ 04:09 ?      00:00:12 /opt/google/chrome/chrome --type=utility --utility-sub-type=
1 S han         4031    3865  0  80   0 - 296571865 futex_ 04:09 ?    00:02:01 /opt/google/chrome/chrome --type=renderer --crashpad-handler
1 S han         4082    3865  2  80   0 - 296599496 futex_ 04:09 ?    00:11:31 /opt/google/chrome/chrome --type=renderer --crashpad-handler
0 S han         4228    1459  0  80   0 - 133050 do_pol 04:09 ?       00:00:01 update-notifier
0 S han         5007    3846  0  80   0 - 8616047 futex_ 04:16 ?      00:01:16 /opt/google/chrome/chrome --type=utility --utility-sub-type=
1 S han        14701    3865  7  80   0 - 297144700 futex_ 07:56 ?    00:16:54 /opt/google/chrome/chrome --type=renderer --crashpad-handler
0 S han        15067     940  0  80   0 - 268548 do_pol 07:59 ?       00:00:37 /usr/bin/gedit --gapplication-service
1 I root       37071       2  0  60 -20 -     0 -      09:25 ?        00:00:05 [kworker/u17:3-rb_allocator]
1 I root       37503       2  0  80   0 -     0 -      09:31 ?        00:00:01 [kworker/4:1-events]
1 I root       37609       2  0  80   0 -     0 -      09:33 ?        00:00:00 [kworker/1:1-cgroup_destroy]
1 I root       39234       2  0  80   0 -     0 -      09:56 ?        00:00:00 [kworker/3:0-events]
1 I root       39342       2  0  80   0 -     0 -      09:59 ?        00:00:02 [kworker/u16:0-events_unbound]
1 I root       40240       2  0  80   0 -     0 -      10:17 ?        00:00:01 [kworker/7:1-events]
1 I root       40611       2  0  80   0 -     0 -      10:30 ?        00:00:01 [kworker/u16:1-flush-8:0]
1 D root       41326       2  0  60 -20 -     0 -      10:54 ?        00:00:05 [kworker/u17:1+i915_flip]
1 S han        41577    3865  0  80   0 - 296560896 futex_ 10:57 ?    00:00:00 /opt/google/chrome/chrome --type=renderer --crashpad-handler
1 I root       41693       2  0  80   0 -     0 -      10:57 ?        00:00:06 [kworker/5:2-i915-unordered]
1 I root       41861       2  0  80   0 -     0 -      11:04 ?        00:00:00 [kworker/3:1-i915-unordered]
1 S han        42236    3865  0  80   0 - 296593357 futex_ 11:11 ?    00:00:03 /opt/google/chrome/chrome --type=renderer --crashpad-handler
1 I root       42274       2  0  80   0 -     0 -      11:12 ?        00:00:00 [kworker/0:2-mm_percpu_wq]
1 S han        42342    3865  0  80   0 - 296560787 futex_ 11:15 ?    00:00:00 /opt/google/chrome/chrome --type=renderer --crashpad-handler
1 S han        42364    3865  3  80   0 - 296581842 futex_ 11:15 ?    00:00:39 /opt/google/chrome/chrome --type=renderer --crashpad-handler
1 I root       42476       2  0  80   0 -     0 -      11:17 ?        00:00:00 [kworker/4:2-events]
1 I root       42489       2  0  80   0 -     0 -      11:17 ?        00:00:00 [kworker/2:2-events]
1 I root       42534       2  0  80   0 -     0 -      11:18 ?        00:00:00 [kworker/6:1-events]
1 I root       42552       2  0  80   0 -     0 -      11:18 ?        00:00:00 [kworker/u16:3-events_unbound]
1 I root       42587       2  0  60 -20 -     0 -      11:20 ?        00:00:01 [kworker/u17:0-rb_allocator]
1 I root       42588       2  0  80   0 -     0 -      11:20 ?        00:00:00 [kworker/0:1]
1 S han        42615    3865  0  80   0 - 296572869 futex_ 11:21 ?    00:00:02 /opt/google/chrome/chrome --type=renderer --crashpad-handler
1 S han        42629    3865  0  80   0 - 296580620 futex_ 11:21 ?    00:00:03 /opt/google/chrome/chrome --type=renderer --crashpad-handler
1 S han        42642    3865  0  80   0 - 296584279 futex_ 11:21 ?    00:00:05 /opt/google/chrome/chrome --type=renderer --crashpad-handler
1 S han        42651    3865  0  80   0 - 296591330 futex_ 11:21 ?    00:00:02 /opt/google/chrome/chrome --type=renderer --crashpad-handler
1 S han        42664    3865  0  80   0 - 296560785 futex_ 11:21 ?    00:00:00 /opt/google/chrome/chrome --type=renderer --crashpad-handler
1 S han        42680    3865  0  80   0 - 296561187 futex_ 11:21 ?    00:00:00 /opt/google/chrome/chrome --type=renderer --crashpad-handler
1 S han        42689    3865  0  80   0 - 296575597 futex_ 11:21 ?    00:00:03 /opt/google/chrome/chrome --type=renderer --crashpad-handler
1 I root       42745       2  0  80   0 -     0 -      11:22 ?        00:00:00 [kworker/7:2-mm_percpu_wq]
1 I root       42757       2  0  80   0 -     0 -      11:22 ?        00:00:02 [kworker/5:1-i915-unordered]
1 I root       42772       2  0  80   0 -     0 -      11:24 ?        00:00:00 [kworker/2:0]
1 I root       42795       2  0  80   0 -     0 -      11:24 ?        00:00:00 [kworker/6:0-events]
1 I root       42868       2  0  80   0 -     0 -      11:29 ?        00:00:00 [kworker/u16:2-events_unbound]
1 I root       42893       2  0  80   0 -     0 -      11:30 ?        00:00:00 [kworker/5:0-i915-unordered]
1 S han        42906    3865  0  80   0 - 297096096 futex_ 11:30 ?    00:00:00 /opt/google/chrome/chrome --type=renderer --crashpad-handler
1 I root       42933       2  0  80   0 -     0 -      11:31 ?        00:00:00 [kworker/0:0]
1 I root       42972       2  0  80   0 -     0 -      11:31 ?        00:00:00 [kworker/7:0]
1 D root       42979       2  0  60 -20 -     0 -      11:32 ?        00:00:00 [kworker/u17:2+i915_flip]
4 R han        42981    1485  2  80   0 - 196481 -     11:32 ?        00:00:01 /usr/bin/python3 /usr/bin/terminator
0 S han        43014   42981  0  80   0 -  4342 do_wai 11:32 pts/0    00:00:00 /bin/bash
1 S han        43234    3865  0  80   0 - 10588616 futex_ 11:32 ?     00:00:00 /opt/google/chrome/chrome --type=utility --utility-sub-type=
1 I root       43266       2  0  80   0 -     0 -      11:32 ?        00:00:00 [kworker/1:0]
1 S han        43268    3865  7  80   0 - 296586386 futex_ 11:33 ?    00:00:02 /opt/google/chrome/chrome --type=renderer --crashpad-handler
1 S han        43296    3865 10  80   0 - 296589396 futex_ 11:33 ?    00:00:02 /opt/google/chrome/chrome --type=renderer --crashpad-handler
1 S han        43306    3865  0  80   0 - 296552589 futex_ 11:33 ?    00:00:00 /opt/google/chrome/chrome --type=renderer --crashpad-handler
4 R han        43325   43014  0  80   0 -  3516 -      11:33 pts/0    00:00:00 ps -efl

포그라운드 프로세스 : 사용자가 볼 수 있는 공간에서 실행되는 프로세스
백그라운드 프로세스 : 사용자가 볼 수 없는 공간에서 실행되는 프로세스

 

사용자와 상호작용하지 않고 그저 정해진 일만 수행하는 프로세스 : 데몬 , 서비스
    데몬 : 유닉스 체계의 운영체제에서 백그라운드 프로세스를 부르는 명칭.
    서비스 : 윈도우 운영체제에서 백그라운드 프로세스를 부르는 명칭.

 

프로세스 제어 블럭

한정된 CPU 자원을 사용하기 위해 프로세스들은 돌아가며 한정된 시간동안 CPU를 사용함

    자신의 차례에서 CPU 사용 ,

    타이머 인터럽트가 발생하면 자리 양보

    이러한 일련의 처리를 위한 자료 구조가 프로세스 제어 블록

프로세스 제어 블럭(PCB)

      프로세스와 관련된 정보를 저장하는 자료 구조

      마치 상품에 달린 태그와 같은 정보

      프로세스 생성시 커널 영역에 생성,종료 시 폐기

PCB에 담기는 대표적인 정보들

프로세스 ID  :  특정 프로세스를 식별하기 위해 부여하는 고유한 번호.
레지스터 값  :  자신의 실행상태가 돌아왔을 때 이전에 사용했던 레지스터 중간 값을 모두 복원 -->실행 재게
                      ex) 프로그램 카운터 ,스택 포인터
프로세스 상태  :  입출력 장치를 사용하기 위해 기다리는 상태

                          CPU를 사용하기 위해 기다리고 있는 상태

                          CPU를 이용중인 상태
CPU 스케줄링 정보  :  프로세스가 언제, 어떤 순서로 CPU를 할당받을지에 대한 정보.
메모리 관리 정보  :  프로세스가 어느 주소에 저장되어 있는지에 대한 정보.
                               ex) 페이지 테이블
사용한 파일과 입출력장치 목록  :  할당된 입출력 장치 ,사용중인 파일 정보

 

문맥 교환

문맥: 기존의 작업 중이던 프로세스 의 중간 정보

문맥 교환  :  기존 프로세스의 문맥을 PCB에 백업하고, 새로운 프로세스를 실행하기 위해 문맥을 PCB로부터 복구하는 과정
                   여러 프로세스가 끊임없이 번갈아 가며 실행되는 원리

※문맥 교환이 매우 빠르게 이루어져 사람의 눈에는 여러 프로세스들이 동시에 실행되는 것 처럼 보임
※문맥 교환이 너무 자주 일어나면 오버헤드 시간이 길어지는(혹은 메모리) 문제 발생
오버헤드  :  어떤 처리를 하기 위해 들어가는 간접적인 처리 시간 혹은 메모리

 

프로세스의 메모리 영역

코드 영역  : 실행할 수 있는 코드, 기계어로 이루어진 명령어가 저장됨

                  데이터가 아닌 CPU가 실행할 명령어가 담기기에 쓰기 금지공간. (Read-only 공간)
데이터 영역  : 잠깐 썻다가 없앨 데이터가 아닌 프로그램이 실행되는 동안 유지할 데이터가 저장되는 공간. 
                      ex 전역변수
힙 영역  : 프로그래머가 직접 할당할 수 있는 저장 공간. 
               ※ 직접 할당할 시에 메모리 누수 주의! --- 요즘엔 가비지컬랙션이 메모리를 정리해줌
스택 영역  : 데이터를 일시적으로 저장하는 공간

                  매개 변수,지역 변수 등이 저장

 

힙영역과 스택영역의 크기는 가변적

힙의 영역 -- 낮은 주소 --> 높은 주소 순서로 할당

스택의 영역 -- 높은 주소 --> 낮은 주소 순서로 할당

프로세스 상태와 계층 구조

프로세스 상태

생성 상태

       이제 막 메모리에 적재되어 PCB에 할당 받은 상태
       준비가 완료되었다면 준비상태로

준비 상태

       당장 CPU를 할당받아 실행할 수 있지만

       자신의 차례가 아니기에 기다리고 있는 상태

       자신의 차례가 된다면 실행 상태로(=디스패치)

실행 상태

       CPU를 할당받아 실행 중인 상태

       할당된 시간 모두 사용시(타이머 인터럽트 발생시) 준비 상태로

       실행 도중 입출력장치를 사용하면 입출력 작업이 끝날때까지 대기 상태로

대기 상태

       프로세스가 실행 도중 입출력장치를 사용하는 경우

       입출력 작업은 CPU에 비해 느리기에 이 경우 대기 상태로 접어듬
       입출력 작업이 끝나면(입출력 인터럽트를 받으면) 준비 상태로

종료 상태

       프로세스가 종료된 상태

       PCB,프로세스의 메모리 영역 정리

 

프로세스 상태 다이어그램

프로세스 계층 구조

프로세스 실행 도중 (시스템 호출을 통해) 다른 프로세스 생성 가능
새 프로세스를 생성한 프로세스 : 부모 프로세스 
부모 프로세스에 의해 생성된 프로세스 : 자식 프로세스 

※ 부모 프로세스 ,자식 프로세스 모두 각각 다른 프로세스 이므로 각기 다른 PID를 가짐
※자식 프로세스에는 부모 프로세스의 PID인 PPID가 기록되기도 함.

프로세스 계층 구조의 예


※최초의 프로세스
유닉스 운영체제: init
리눅스 운영체제: systemed
mac OS: launchd

우분투 운영체제 최초의 프로세스 : systemd

 

프로세스 생성 기법

fork( )  :  부모 프로세스가 자신의 복사본을 자식 프로세스로 생성하는 시스템 호출.

               복사본(자식 프로세스) 생성

               부모 프로세스의 자원 상속


exec( )  : 자식 프로세스가 자신의 메모리 공간을 다른 프로그램으로 교체하는 시스템 호출.

               메모리 공간을 새로운 프로그램으로 덮어쓰기

               코드/데이터 영역은 실행할 프로그램 내용으로 바뀌고 나머지 영역은 초기화됨

 

fork와 exec 시스템 호출

 

스레드

프로세스와 스레드

스레드 : 프로세스를 구성하는 실행의 흐름 단위
단일 스레드 프로세스 : 실행 흐름이 하나인 프로세스
멀티 스레드 프로세스 : 실행 흐름이 여러 개인 프로세스 --> 프로세스를 이루는 여러 명령어 동시 실행 가능
※스레드는 실행에 필요한 최소한의 정보만을 유지한 채 프로세스 자원을 공유하며 실행된다. <--- 중요 

 

스레드의 구성 요소

스레드 ID, 프로그램 카운터를 비롯한 레지스터 값, 스택 등

실행에 필요한 최소한의 정보

※ 리눅스 운영체제에서는 프로세스와 스레드를 별개의 것으로 구분하지 않고 그냥 실행의 문맥일 뿐이다.

 

멀티프로세스와 멀티스레드

멀티프로세스 : 여러 프로세스를 동시에 실행하는 것
멀티스레드 : 여러 스레드로 프로세스를 동시에 실행하는 것


멀티프로세스와 멀티스레드의 차이점
        프로세스끼리는 자원을 공유하지 않지만 스레드끼리는 같은 프로세스 내 자원을 공유함

 

멀티 프로세스 : 

          프로세스를 fork하면 코드/데이터/힙 영역 모든 자원이 복제되어 저장됨

          저장된 메모리 주소를 제외하면 모든것이 동일한 프로세스 2개가 통째로 메모리에 적재

           ork를 세번 네번하면 메모리에 같은 프로세스가 통쨰로 적재됨

멀티쓰레드 :

         스레드들은 각기 다른 스레드 ID,(별도의 실행을 위해 꼭 필요한)

         프로그램 카운터 값을 포함한 레지스터 값, 스택을 가질뿐

         프로세스가 가지는 자원을 공유함

멀티프로세스 쓰레드 비교

문제점 :
※같은 작업을 하기 위해 메모리에 동일한 프로세스 두 개 적재됨  --> 메모리 낭비!

※같은 작업을 하기 위해 동일한 스레드 두 개
--> 프로세스가 가지고 있는 자원 공유. 여러 프로세스를 병행하는 것 보다 메모리를 효율적으로 사용 가능.
하지만, 독립적인 멀티 프로세스와 달리 하나의 스레드에 문제가 생기면 프로세스 전체에 문제 발생!

 


※프로세스는 기본적으로 자원을 공유하지 않지만 프로세스 간의 자원을 공유하고 데이터를 주고 받을 수 있음

-->프로세스 간 통신(IPC) -- 파일을 통한 프로세스간 통신, 공유 메모리를 통한 프로세스간 통신