LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-20-2020, 10:38 AM   #1
marius09
Member
 
Registered: Mar 2019
Posts: 37

Rep: Reputation: Disabled
worker


hi,
in system v there are no worker process.why in systemd we have worker process?
a worker process is used by an user mode process when this process work in kernel mode?
during the process life a process can run in user mode or kernel mode.in kernel mode the process has elevated privileges.right?

Last edited by marius09; 06-20-2020 at 10:53 AM.
 
Old 06-20-2020, 05:38 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by marius09 View Post
hi,
in system v there are no worker process.why in systemd we have worker process?
I don't know which processes you mean, but the difference between System V initialization and systemd is that systemd does much more than just starting and stopping services.
Quote:
during the process life a process can run in user mode or kernel mode.in kernel mode the process has elevated privileges.right?
"Elevated privileges" is usually understood as "superuser privileges". The process doesn't change its ID to superuser when it enters the kernel. Instead, the CPU changes state so that it can execute privileged instructions and access protected memory areas.
 
Old 06-20-2020, 07:23 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,366
Blog Entries: 28

Rep: Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162Reputation: 6162
On Slackware with KDE, which most decidedly does not use SystemD but rather uses a BSD-style init system, there are "kworker" processes.

Also, I just fired up my VM of Devuan (which was due an update anyway); I'm using the KDE desktop and I found a number of "kworker" processes.

Consequently, I think it would help if you would provide a list of the "worker" processes to which you refer.

Last edited by frankbell; 06-20-2020 at 07:25 PM.
 
1 members found this post helpful.
Old 06-20-2020, 07:41 PM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by frankbell View Post
On Slackware with KDE, which most decidedly does not use SystemD but rather uses a BSD-style init system, there are "kworker" processes.
These are kernel processes, i.e. all their code resides in the kernel. They should be marked like this: [kworker]. I believe they perform various asynchronous tasks, perhaps garbage collection and the like, and indeed have nothing to do with systemd or any other service initialization or management framework.

Here is a (very technical and deep) description: https://www.kernel.org/doc/Documenta.../workqueue.rst. Google knows about much more documentation.

If this is what OP means by "worker", I can answer this question:
Quote:
Originally Posted by marius09 View Post
a worker process is used by an user mode process when this process work in kernel mode?
Only if you use "used" in a very very loose way. In the sense of "user mode processes use the kernel to accomplish tasks".

Last edited by berndbausch; 06-20-2020 at 07:47 PM.
 
Old 06-21-2020, 01:54 AM   #5
marius09
Member
 
Registered: Mar 2019
Posts: 37

Original Poster
Rep: Reputation: Disabled
hi,
i refer to kworker


ps -ef|more
UID PID PPID C STIME TTY TIME CMD
root 1 0 1 02:50 ? 00:00:01 /usr/lib/systemd/systemd --swi
tched-root --system --deserialize 22
root 2 0 0 02:50 ? 00:00:00 [kthreadd]
root 3 2 0 02:50 ? 00:00:00 [ksoftirqd/0]
root 4 2 0 02:50 ? 00:00:00 [kworker/0:0]
root 5 2 0 02:50 ? 00:00:00 [kworker/0:0H]
root 6 2 0 02:50 ? 00:00:00 [kworker/u256:0]

so a process run in user mode and when need kernel,it runs in kernel mode.right?
 
Old 06-21-2020, 01:59 AM   #6
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
A process switches to kernel mode when it makes a system call.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache tuning question: prefork.c vs worker.c BrianK Linux - Networking 10 02-09-2012 01:42 PM
[SOLVED] Warning worker http://192.168.1.5/ already used by another worker Apache problem tkmsr Linux - Server 2 06-30-2010 06:37 AM
Apache + Suse 9.3 + MPM worker Suinatsa Linux - Software 1 01-31-2006 02:22 PM
Apache2 worker works, prefork doesn't AlexH SUSE / openSUSE 1 10-18-2004 11:15 AM
what if I use worker and prefork on apache? gottin Linux - Software 1 10-15-2004 03:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration