Exam theory questions
Development tools
-
Describe principles of compiler and link editor for C language.
-
Explain the principles of make utility and write sample Makefile
for compilation and linking of a program in C.
-
What are the advantages and disadvantages ofr using dynamic libraries ?
Write a sequence of commands for producing dynamic library and program which will
depend on it (ideally on both Linux and Solaris).
-
What is affected by LD_PRELOAD and LD_LIBRARY_PATH environment variables ?
Why it is not good idea to use LD_LIBRARY_PATH environment variable for anything
else other than debugging purposes ?
Kernel and UNIX C API
-
Explain the meaning of main() parameters and the environ variable.
How are the command line arguments processed with getopt() ?
-
Explain the meaning of terms like process, thread, program.
What is the difference between process and thread ?
-
Explain the terms library function and system call.
Describe the convention/semantics of return values of library calls and
system calls.
-
What do the contents of files /etc/passwd and /etc/group look like ?
When and how are the data stored in these files used in the UNIX system ?
-
How is the identification of owner and group used for permissions testing ?
What is the difference between real and effective owner of a process ?
File systems
-
What objects in UNIX are accessible via file system interface ?
What is the difference between character and block device ?
-
Describe structure of S5 volume and its extensions (ufs).
-
Explain the principle of navigating the directory structure, i.e. how does kernel
find data blocks of given file using its path ?
Explain the difference between hardlink and symlink>.
-
What are access rights for files ? What is set UID ?
-
How do processes access open files ? What is the difference between descriptor and
opening of a file ?
-
What is virtual file system ? What is it for and what are its principles ?
-
What is the difference between disk paritition and volume ?
What does the process of creation, consistency check, mount and unmount of a volume look like ?
Processes and pipes
-
Describe address space of a process in user mode and kernel mode.
-
Draw and describe state diagram of a process.
-
Describe basics of mechanism of process planning. What priority classes ?
-
Describe the mechanism of maping files into memory. Describe how a process
can access variables and functions in shared library during runtime.
How are these 2 things related together ?
Signals
-
What are signals ? How can be signal generated for a process ?
What is the difference between sending signal to process and to a thread.
-
What are the options for handling a signal ? How is it (blocking, handling) set up for
process and for threads ?
-
What are the rules for writing signal handlers ? How can one cope with restrictions
for their implementation ?
Threads
-
What is a theead and how does it differ from a process ? What attributes are
common for process and which are private for a thread ? How can one create
global variable for a thread ?
-
Describe the process for creating and destroying a thread ? How do the desctructors
of keyed values and exit handlers work ?
-
List synchronization primitives for threads. Describe the way of using
condition variables, reasons for using them in certain way (w.r.t. order of locking)
and what could happen if this was not abided.
-
What are the ways of solving synchronization arithmetic operation (adding and subtraction)
between threads and list their advantages and disadvantages.
-
What happens if one thread calls fork() ? What problem this could lead to
and how to solve it ?
Synchronization and locking
-
Explain locking conflict when accessing shared data ? What is a deadlock ?
Describe locking of files by using fcntl().
-
Explain locking by using lock files.
IPC
-
Describe semaphores implemented in UNIX System V IPC. What commands can be
used to list their state ?
Networking
-
Describe workings of server and client (in terms of sequence of system calls)
for connected network services.
-
Describe workings of server and client (in terms of sequence of system calls)
for datagram network services.
-
What is a socket ? What are the variants of addressing sockets (within single system
and over the network). What functions can be used for conversion from numeric
and string representation (and vice versa) of protocols, ports and IP addresses ?
Why do the functions for converting from local and network byte order have to be used ?
-
Describe standard functions for conversion from hostname to address and back,
their use for client and server. What advantages do they have compared to
non-standard functins ?
-
Describe possibilities of sequential and parallel handling of clients of TCP server.
-
How does inetd work ? How does parallel handling of UDP clients look like ?
-
What are the ways of expecting/handling data from multiple descriptors ?
How are the functions used when implementing network server which handles multiple clients
from one process without the use of threads. What are the differences between
functions which make this possible ?
Last change: