[Nemeth00] 28.4. System daemons

来源:百度文库 编辑:神马文学网 时间:2024/04/29 06:58:21

28.4. System daemons

[注]:system daemons 这里指的是内核进程(kernel processes),telnetd、ftpd 等进程不属此类。本节列出了 HP-UX、Solaris、Linux 和 FreeBSD 下的内核进程,如果你想了解 AIX 下的内核进程,可参考 Overview of AIX page replacement(David Hepkin, AIX Kernel Architect, IBM Developerworks, January 2008)一文。

Afew system tasks, such as managing virtual memory and synchronizing thedisk cache, are managed by daemons rather than by the kernel itself.The daemons that perform these functions cannot be manipulated by thesystem administrator and should generally be left alone.

The paging daemon

The implementation of this daemon and its exact function vary widely across systems. It is named pageout on Solaris, vhand on HP-UX, kpiod under Red Hat, and pagedaemon under FreeBSD.

Thisdaemon is part of the virtual memory system. When a page of virtualmemory is accessed, the system’s hardware consults a table to determinewhether the page is currently in physical memory. If not, a faultoccurs and the paging daemon is called to bring the page into memoryfrom the swap area. If no physical pages are available, the pagingdaemon makes room by writing out some other page to the swap device and updating the appropriate page table entries.

See page 760 for more information about virtual memory.


The swapping daemon

This daemon is called swapper on FreeBSD and HP-UX, and kswapd on Linux.

Whenmany processes are running simultaneously, the system begins to spend alot of time processing page faults because each process has a certainnumber of pages that it accesses regularly. This condition is calledthrashing, and it can seriously degrade performance.

Theswapping daemon monitors the number of page faults that occur inproportion to the number of memory references. If too many faultsoccur, the swapping daemon starts to move entire processes out to theswap space. Swapped processes are completely removed from physicalmemory and are prevented from running for a comparatively long time(seconds). The swapping daemon continues to eliminate processes untilthe page fault rate falls to an acceptable level.

Swappingwas designed for an era in which physical memory was very expensive,and the need for it in today’s computing landscape is questionable.Nevertheless, most systems still provide this capability.

The filesystem synchronization daemon

The filesystem synchronization daemon executes the sync system call every 30 seconds. sync causes all “dirty” disk blocks to be written out, including filesystem superblocks, inode tables, and buffered data blocks.[4] This housekeeping minimizes the filesystem damage that can occur during a crash.

[4] Actually, sync simply schedules these blocks to be written out; it doesn’t guarantee that writing has completed by the time it returns.

See page 133 for more information about filesystem superblocks.


On most systems this daemon is called update, but HP-UX calls it syncer and Solaris calls it fsflush.

  • Create Bookmark (Key: b)Create Bookmark
  • Create Note or Tag (Key: t)Create Note or Tag
  • Download (Key: d)Download
  • Email This Page (Key: e)Email This Page
  • PrintPrint
  • Html View (Key: h)Html View
  • Zoom Out (Key: -)Zoom Out
  • Zoom In (Key: +)Zoom In
  • Toggle to Full Screen (Key: f)
  • Previous (Key: p)Previous
  • Next (Key: n)Next

Related Content

Daemons
From: IBM AIX 5L Reference for HP-UX System Administrators

OROUTED daemon
From: z/OS Version 1 Release 7 Implementation

Start options for daemons
From: ABCs of z/OS System Programming Volume 9

MANAGING DAEMONS
From: Linux Appliance Design, 1st Edition

Daemons
From: Linux® Desk Reference, Second Edition

Daemon Processes
From: Sun Certified System Administrator for Solaris™ 8 Study Guide

Daemons
From: Linux® Administration Handbook, Second Edition

Using the inetd Daemon
From: Linux Socket Programming by Example

The inetd Daemon
From: IBM Certification Study Guide AIX V4.3 System Administration

The inetd daemon
From: IBM eServer Certification Study Guide - pSeries AIX System Administration