当前位置: 首页 > news >正文

河北建设工程招标网官方网站绵阳市建设工程监督网站

河北建设工程招标网官方网站,绵阳市建设工程监督网站,东莞网络公司网站建设,怎样制作自己的网站由于嵌入式处理器的性能不够#xff0c;希望尽量能减少不必要的启动进程。对处理器启动进程进行了学习#xff0c;了解哪些相关介绍判断哪些必须保留的线程。 当前我使用的LINUX 系统启动后的线程 # ps PID USER COMMAND1 root init //启动部分的和GRUB相关2 ro…由于嵌入式处理器的性能不够希望尽量能减少不必要的启动进程。对处理器启动进程进行了学习了解哪些相关介绍判断哪些必须保留的线程。· 当前我使用的LINUX 系统启动后的线程 # ps PID USER COMMAND1 root init //启动部分的和GRUB相关2 root [kthreadd]内核线程主节点用于生成进程主要用于管理硬件。3 root [rcu_gp]//读取复制跟新管理间后续接收4 root [rcu_par_gp]//读取复制跟新管理间后续接收5 root [kworker/0:0-mm_]//内核0工作线程占位符语法间后面介绍6 root [kworker/0:0H]//内核0工作线程占位符7 root [kworker/u4:0-ev]//和前面类似不过未绑定cpu8 root [mm_percpu_wq]//关于每个 CPU 工作队列线程的内存管理真内核维护者列表中的神秘消息9 root [ksoftirqd/0]//一种在常规处理程序之外处理硬件中断请求的方法 CPU010 root [rcu_sched]//读取复制更新计划程序用于在写入器和读取器之间同步数据。这是有关 RCU 的最新信息11 root [rcu_bh]//作为上述rcu_sched的表亲它在 RCU 子系统中提供了宽限期。12 root [migration/0]//跨内核分配进程。每个内核一个这样的进程。13 root [cpuhp/0]//支持在系统中物理添加和删除 CPU 的进程 内核0。14 root [cpuhp/1]//支持在系统中物理添加和删除 CPU 的进程 内核1。15 root [migration/1]//和前面类似只是内核为1 16 root [ksoftirqd/1]//和前面类似只是内核为1 17 root [kworker/1:0-rcu]//和前面类似只是内核为1 18 root [kworker/1:0H]//和前面类似只是内核为1 19 root [kdevtmpfs]//此线程填充并维护设备节点树20 root [oom_reaper]//在内存分配路径上当内存不足的时候会触发kswapd、或者内存规整极端情况会触发OOM来获取更多内存。21 root [writeback]//处理对块设备的缓慢写入22 root [kcompactd0]//kcompactd是一个内核规整的后台进程内存压缩23 root [crypto]//为内核加密模块提供 API 接口24 root [kblockd]//检查 I/O 管道中的拥塞25 root [watchdogd]//看门狗26 root [kworker/1:1-mm_]//和前面类似只是内核为1 27 root [kworker/0:1-eve]//和前面类似只是内核为1 28 root [kswapd0]//页面回收kswapd内核线程29 root [kworker/u5:0]//和前面类似不过未绑定cpu55 root [spi0]//SPI0 接口进程56 root [spi2]//SPI2 接口进程72 root /sbin/syslogd -n //远程系统日志守护进程。76 root /sbin/klogd -n //内核日志守护进程87 root -/bin/sh //脚本进程89 root [kworker/u4:1]一些定义介绍 GRUB GRUB 是一个用于加载和管理系统启动的完整程序。它是 Linux 发行版中最常见的引导程序(bootloader)。引导程序是计算机启动时运行的第一个软件。它加载 操作系统的内核然后再由内核初始化操作系统的其他部分包括 Shell、显示管理器、桌面环境 等等。 OOM 原文连接 Linux内核为了提高内存的使用效率采用过度分配内存(over-commit memory)的办法造成物理内存过度紧张进而触发OOM机制来杀死一些进程回收内存。 Syslog系统日志 Syslog设备依据两个重要的文件/etc/syslogd守护进程和/etc/syslog.conf配置文件习惯上多数syslog信息被写到/var/adm或/var/log目录下的信息文件中messages.*。一个典型的syslog纪录包括生成程序的名字和一个文本信息。它还包括一个设备和一个优先级范围但不在日之中出现。 syslogd不仅仅是记录kernel log的服务还能记录user space中的日志。 syslogd是Linux下的一个记录日志文件服务。新版本叫做rsyslogd。 syslogd有一系列的子服务例如mail、auth、cron、kern等等这些子服务提供日志记录的功能,。当程序要记录log时,可以直接调用这些子服务将日志记录到设定的地方。 特殊进程 一文了解Linux下2号进程的kthreadd Linux下有3个特殊的进程idle进程(PID 0), init进程(PID 1)和kthreadd(PID 2) idle进程由系统自动创建, 运行在内核态 idle进程其pid0其前身是系统创建的第一个进程也是唯一一个没有通过fork或者kernel_thread产生的进程。完成加载系统后演变为进程调度、交换 init进程由idle通过kernel_thread创建在内核空间完成初始化后, 加载init程序, 并最终用户空间 由0进程创建完成系统的初始化. 是系统中所有其它用户进程的祖先进程 Linux中的所有进程都是有init进程创建并运行的。首先Linux内核启动然后在用户空间中启动init进程再启动其他系统进程。在系统启动完成完成后init将变为守护进程监视系统其他进程。 kthreadd进程由idle通过kernel_thread创建并始终运行在内核空间, 负责所有内核线程的调度和管理 它的任务就是管理和调度其他内核线程kernel_thread, 会循环执行一个kthreadd的函数该函数的作用就是运行kthread_create_list全局链表中维护的kthread, 当我们调用kernel_thread创建的内核线程会被加入到此链表中因此所有的内核线程都是直接或者间接的以kthreadd为父进程 RCU 相关知识 什么是RCU是ReadCopy-Update的缩写意指读-复制更新。是一种同步机制。其将同步开销的非对称分布发挥到逻辑极限我简单理解位线程进程中的数据同步控制机制。是在2002年引入在Linux内核中的。大家应该都知道内核同步机制中的像各种锁机制、信号量、内存屏障啥的但为啥会引入一个叫读复制更新这么个同步机制呢它有啥优点或者说它的应用场景是什么 考虑一个问题我们知道在路由器上会有很多线程去查找路由表数据但是更新路由表数据的情况却不多。像这种情况下我们如何做多同步上面说的几种同步机制都不是很好的选择这时RCU就派上用场了具体原因下文会解释。所以RCU主要应用在那种读线程多而写线程唯一的情况同时需要保证数据一致性。搞明白了这个道理我们来分析一下RCU。 在RCU的实现过程中我们主要解决以下问题 1在读取过程中另外一个线程删除了一个节点。删除线程可以把这个节点从链表中移除但它不能直接销毁这个节点必须等到所有的读取线程读取完成以后才进行销毁操作。RCU中把这个过程称为宽限期Grace period。 2在读取过程中另外一个线程插入了一个新节点而读线程读到了这个节点那么需要保证读到的这个节点是完整的。这里涉及到了发布-订阅机制Publish-Subscribe Mechanism。 3 保证读取链表的完整性。新增或者删除一个节点不至于导致遍历一个链表从中间断开。但是RCU并不保证一定能读到新增的节点或者不读到要被删除的节点。 KWORKER进程 什么是 kworker 进程 “kworker” 是 Linux 内核的工作线程用于异步处理工作队列中的任务。这些任务包括处理硬件中断、文件系统事件、管理系统内存等。你可能会看到多个 kworker 进程每个进程的名称后面都有一个数字如 “kworker/0:1”、“kworker/1:2” 等。这个数字表示了 kworker 是在哪个 CPU 核心上运行的以及任务的顺序。 kworker 进程为什么会占用大量 CPU 正常情况下kworker 进程的 CPU 占用率应该是相对较低的。但是在一些情况下你可能会发现 kworker 进程占用了大量的 CPU。这可能是因为系统中有大量的底层任务需要处理这些任务可能包括硬件中断、文件系统操作、内存管理等。 可能的原因包括 硬件问题 有时某些硬件设备会产生大量的中断导致 kworker 线程的 CPU 占用率提高。这可能是硬件故障或者驱动程序错误导致的。 I/O 等待 如果系统中有大量的磁盘 I/O 操作kworker 线程可能会被频繁唤醒来处理这些操作从而导致高 CPU 占用。 内存压力 如果系统内存使用率高可能会导致频繁的内存回收操作这也会导致 kworker 线程的 CPU 占用率提高。 我们需要找出是什么导致 kworker 高 CPU 占用。我们可以使用一些系统诊断工具如 perf、iostat、vmstat 等来找出问题的根源。根据问题的具体原因我们可以采取相应的措施来解决问题。 深入理解 Linux 中的 kworker 进程 According to kernel.org, the syntax is kworker/%u:%d%s (cpu, id, priority). The u designates a special CPU, the unbound cpu, meaning that the kthread is currently unbound. The workqueue workers which have negative nice value have ‘H’ postfixed to their names. 根据 kernel.org语法是 kworker/%u%d%s cpu id priority。u 表示一个特殊的 CPU即未绑定的 cpu这意味着 kthread 当前处于未绑定状态。如果该worker的nice小于0说明它的优先级很高所以就加了H属性。 源介绍 一个比较详细的进程说明 ditto同上的意思 All Processes All Processes These are the processes running on a default install of Ubuntu Server 18.04.4. The only non-default I took was to run sshd so I could log in and get this list.ps -ef /sbin/init maybe-ubiquity the one true process to start them all the maybe-ubiquity part is from GRUB [kthreadd] kernel thread master for spawning off processes largely to manage hardware. Kthread processes are shown in [square brackets]. [kworker/0:0H] a kernel worker thread placeholder [mm_percpu_wq] wow! really not a lot about the memory management per cpu work queue thread, other than cryptic messages in the kernel maintainers list [ksoftirqd/0] a way of handling hardware interrupt requests outside a regular handler [rcu_sched] the Read Copy Update scheduler that synchronizes data across writer and readers. Here’s the latest on RCU [rcu_bh] a cousin of the rcu_sched above, it provides grace periods in the RCU subsystem. [migration/0] Distributes processes across cores. One such process per core. [watchdog/0] Checks to ensure the system’s still running, and reboots if hung, hopefully. [cpuhp/0] Process that supports physically adding and removing CPUs from the system. [cpuhp/1] lscpu says this machine has 4 cores, so these one-per-core kernel threads are repeated with different /n suffixes [watchdog/1] ditto [migration/1] ditto [ksoftirqd/1] ditto [kworker/1:0H] ditto [cpuhp/2] ditto [watchdog/2] ditto [migration/2] ditto [ksoftirqd/2] ditto [kworker/2:0H] ditto [cpuhp/3] ditto [watchdog/3] ditto [migration/3] ditto [ksoftirqd/3] ditto [kworker/3:0H] ditto [kdevtmpfs] this thread populates and maintains a device node tree [netns] this maintains the network namespace [rcu_tasks_kthre] clearly a part of the Read Copy Update subsystem, but I’ll be hanged if I can find ANYTHING about this thread on the web. [kauditd] the kernel thread responsible for auditing security events [kworker/1:1] another kernel thread placeholder, see above [khungtaskd] looks for hung tasks every two minutes [oom_reaper] cleans up processes that are Out Of Memory. [writeback] handles slow writes to block devices [kcompactd0] handles background memory compaction [ksmd] kernel samepage merging daemon, used by the KVM hypervisor. [khugepaged] keeps track of huge virtual memory pages efficiently [crypto] provides an API interface to the kernel crypto module [kintegrityd] checks the integrity of block devices by writing/reading data to and from them. [kblockd] checks for congestion in I/O pipes [kworker/3:1] another generic kernel thread, see above. [kworker/2:1] ditto [ata_sff] handles ATA Small Form Factor interfaces [md] handles multiple device interfaces, e.g. RAID arrays [edac-poller] handles memory error detection and correction [devfreq_wq] apparently allows for the reuse of frequently-used kernel workqueues [watchdogd] probably has something to do with the watchdog thread. This is another one with almost no documentation. [kswapd0] The manager of virtual memory. An ancient and venerable subsystem. [kworker/u33:0] Another generic kernel thread ready to be used. See above. [ecryptfs-kthrea] This encrypts and decrypts data passing out to the filesystem. [kthrotld] Controls bandwidth on a request queue by throttling requests [acpi_thermal_pm] Provides an API interface to the ACPI to provider thermal management [ipv6_addrconf] handles the IPv6 configuration workqueue [kstrp] the Kernel Stream Processor [kworker/2:2] another worker thread placeholder, see the first one above [charger_manager] about what you’d expect: a battery charger manager [scsi_eh_0] Linux boxes almost never have SCSI disks anymore. This is the handles errors from other types of disks that appear as SCSI [scsi_tmf_0] handles disk Task Mangement Functions [scsi_eh_1] same as above for the next disk [scsi_tmf_1] ditto [scsi_eh_2] ditto [scsi_tmf_2] ditto [scsi_eh_3] ditto [scsi_tmf_3] ditto [scsi_eh_4] ditto [scsi_tmf_4] ditto [scsi_eh_5] ditto [scsi_tmf_5] ditto [e1000e] Handles the Intel Gigabit Ethernet devices [i915/signal:0] Handles the Intel i915 Graphics drivers [i915/signal:1] ditto [i915/signal:2] ditto [kworker/3:1H] another placeholder thread [raid5wq] Probably a RAID5 driver, can’t find any info on it. [jbd2/sda2-8] Updates the filesystem journal [ext4-rsv-conver] Handles writeback conversion work from the ext4 filesystem. [kworker/0:1H] another placeholder thread [kworker/1:1H] another placeholder thread [kworker/2:1H] another placeholder thread /lib/systemd/systemd-journald and into userland! this is the process that collects logging data [iscsi_eh] Can’t find much info on this one either, probably the iSCSI error handler /sbin/lvmetad -f The Logical Volume Manager metadata caching process [ib-comp-wq] Found one reference to it in the kernel mailing list. It has to do with the InfiniBand driver, and it’s now cpu-bound [ib-comp-unb-wq] Dealing with the InfiniBand WorkQueue [ib_mcast] Handling InfiniBand Multicast groups [ib_nl_sa_wq] No info on this one, either. Some InfiniBand WorkQueue [rdma_cm] Remote Direct Memory Access, usually part of InfiniBand /lib/systemd/systemd-udevd The part of systemd that handles devices coming and going /lib/systemd/systemd-timesyncd The systemd way of synchronizing the system clock to an external timekeeper. The supposedly better replacement for ntpd. [irq/27-mei_me] One of the daemons that handles IRQ interrupts /lib/systemd/systemd-networkd The part of the systemd juggernaut that handles networking /lib/systemd/systemd-resolved The systemd Domain Name Service resolution manager /usr/sbin/atd -f One of the few old-timers left: The at daemon that handles one-time delayed job execution /usr/bin/lxcfs /var/lib/lxcfs/ Manages filesystems for fuse containers /usr/sbin/rsyslogd -n The remote system logger daemon. /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers Handles changes to the systemd-networkd /usr/bin/dbus-daemon --system --addresssystemd: --nofork --nopidfile --systemd-activation --syslog-only The Dbus message bus daemon without which there would be no systemd functionality /usr/sbin/cron -f An old subsystem I’ve used for decades: the cron daemon for regularly scheduled tasks /usr/lib/accountsservice/accounts-daemon Provides Dbus interface to modifiying account information /usr/sbin/thermald --no-daemon --dbus-enable The user-land deamon to monitor the system’s heat /lib/systemd/systemd-logind About what it appears it handles the login process. Gone are the gettys. /usr/sbin/irqbalance --foreground Distributes IRQs among the processors /usr/lib/policykit-1/polkitd --no-debug Facilitates letting unprivileged processes talk to privileged ones. /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal Keeps the system from shutting down while software is being updated /bin/login -p -- The actual login process that manages a user login [loop0] Not much information about this either. Possibly a loopback filesystem thread? [kworker/0:6] another placeholder thread [kworker/0:7] ditto /usr/lib/snapd/snapd The runner for the Snap packages /lib/systemd/systemd --user The user-land heart of systemd (sd-pam) a helper process for the Pluggable Authentication Module system -bash What I’m using now, the Bourne-again Shell /usr/sbin/sshd -D The Secure Shell server process [kworker/1:2] another placeholder thread [kworker/3:2] ditto [kworker/u32:0] ditto [kworker/u32:2] ditto [kworker/u32:1] ditto [kworker/1:0] ditto [kworker/3:0] ditto ps -ef List the status of all processes
http://www.zqtcl.cn/news/989328/

相关文章:

  • 如何开办网站微信公众平台号申请注册
  • 网站建设找哪个平台浦东区建设工程监督网站
  • 如何创业做网站设计公司工作室
  • 游戏网站建设多少中国煤炭建设协网站
  • 动态图表网站宁津做网站
  • 黑龙江生产建设兵团各连网站成功网站建设案例
  • 一级a做爰精免费网站肇庆网站制作软件
  • wordpress加分页北京优化生育
  • 乐至建设局网站工程项目管理软件哪个好
  • 太原公司网站建立wordpress插件直播
  • 比较有名的diy制作网站做照片视频的网站
  • 河北石家庄建设网站wordpress nginx apache
  • 上海免费网站建设品牌wordpress主题安装失败下载失败
  • 买公司的网站商城系统开发
  • 网页设计国外设计欣赏网站深夜视频在线免费
  • 做网站怎么租用服务器杭州网站建设hzyze
  • .asp 网站北京最新防疫信息
  • 网站上传用什么软件做视频教程114查询
  • 网站小图标素材网站开发需要提供哪些东西
  • 阿里巴巴国际站买家入口百度建网站多少钱
  • 为网站网站做代理怎么判wordpress 调用当前分类名称
  • 多用户网站管理系统定制网站建设与运营案例
  • 毕业设计做的网站抄袭网站开发执行文档
  • 自己做网站都要什么软件网址你懂我意思正能量不用下载
  • 网站内容的创新wordpress美食主题
  • 程序员做游戏还是做网站好雅安移动网站建设
  • wordpress伪静态大学seo诊断网站免费诊断平台
  • 企业网站模板下载软件商务网站规划与建设心得
  • 做网站的像素是多少钱郑州公司网页
  • 北京游戏网站建设特殊符号网站