Introduction to Operating Systems
|TU1: Installing, configuring
and exploiting a computer system
|Practical Exercise 8:
Managing services. Basic power management.
Exercise 8: Managing services. Basic power
1- Deadline: 26-2-2023.
2- Send your report as a PDF file attached to an e-mail with the following
cf(at)collados.org or jordi.binefa(at)fje.edu depending on who is your
b.1) ASIX1 (English): asix1_surname_name_m01tu01pr08.pdf
b2.) DAW1 (English): daw1_surname_name_m01tu01pr08.pdf and daw1_surname_name_m01tu01pr08.odt
c.1) ASIX1 (Engish): asix1_surname_name_m01tu01pr08
c.2) DAW1 (English): daw1_surname_name_m01tu01pr08
3- Make this report individually.
4- Left, right, top and bottom margins: 2cm.
5- Character format: a) Font: Arial, b) Size:
10, c) Questions typeface: Bold, d) Answers typeface: Regular
What is a server (or daemon)?
a) A server (or daemon)
is a process that provides services to other computer
programs, the clients, running in the same
computer or in other computers connected through the network.
b) A service provides some functionality to
clients such as access to files stored in a remote computer,
access to web pages, access to databases, send or receive mails,
run commands in remote computers, store files in remote
computers, print documents on local and remote printers and so
c) The usual state of a server is
interruptible sleeping (S) because is a program that awaits a
request from a client program. When a request is received from
a client, the server program wakes up, fulfill the task
requested by the client (so it change to the R state) and goes
back to the interruptible sleeping state (S).
d) A server is a process that is run in
* A background process works independently
of the shell, leaving the terminal free for other work.
* A background process is not
attached to your keyboard and screen and it runs without user
* Users are not aware of the fact that background processes run on
their systems altough these processes are extremely
important to the normal working of an operating system.
* Users (and root) do not interact
directly with a background process but a signal can be
sent to a background process by users (or root).
f) Usually a server is an orphan process or a
process started by init and therefore, a server parent
process is usually init.
g) The most of the times a server starts during
the system startup (or boot) process
and it is terminated during the system shutdown
process. If you want to start a server when the system is
running then you need special command to start the server in
the proper way. If you want to terminate a server when
the system is running then you need another special command
to terminate the server in the proper way.
h) A server runs in the user space memory area.
i) Servers are owned:
* Usually by the root user and
their default group is root.
* Sometimes, servers can be owned by
specials users called system users. System users
are not real people but they have a UID, a name. permissions
and so on.
j) Typical nice value for most servers
is 0 (normal priority)
k) Servers are processes so root (and sometime some
* Send signals to servers with kill
* Change nice value with nice
* Show servers with the help of ps
* Send signals, change nice values
or show server with MATE Monitor System.
k) Servers are processes so they
* % CPU time
* % RAM memory
* Access to resources such as hard
drive, network, printer, files,.....
Linux provides to the system administrator with a set of tools
(commands) to easily:
* Start a server in the proper way
* Send a signal to terminate a server.
* Send the signal SIGHUP to a server
* Configure Linux to start (or not) a
server during the boot process
Information about a service shown by typical service
* LOAD: Whether or not the
service configuration was loaded in memory (LOAD).
(configuration accepted and stored in memory)
(prevents activation until unmasked
error (configuration errors)
* ACTIVE: It
shows the high-level service state.
Typicial values: active, reloading,
inactive, failed, activating,
--> Generally speaking, it
means that service has started
- inactive -->
failed in some
- It shows the
set of typical
failed in some
- exited ->
is running and
and it is not