Exam theory questions

Development tools

  1. Describe principles of compiler and link editor for C language.
  2. Explain the principles of make utility and write sample Makefile for compilation and linking of a program in C.
  3. 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).
  4. 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

  1. Explain the meaning of main() parameters and the environ variable. How are the command line arguments processed with getopt() ?
  2. Explain the meaning of terms like process, thread, program. What is the difference between process and thread ?
  3. Explain the terms library function and system call. Describe the convention/semantics of return values of library calls and system calls.
  4. 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 ?
  5. 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

  1. What objects in UNIX are accessible via file system interface ? What is the difference between character and block device ?
  2. Describe structure of S5 volume and its extensions (ufs).
  3. 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>.
  4. What are access rights for files ? What is set UID ?
  5. How do processes access open files ? What is the difference between descriptor and opening of a file ?
  6. What is virtual file system ? What is it for and what are its principles ?
  7. 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

  1. Describe address space of a process in user mode and kernel mode.
  2. Draw and describe state diagram of a process.
  3. Describe basics of mechanism of process planning. What priority classes ?
  4. 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 ?


  1. What are signals ? How can be signal generated for a process ? What is the difference between sending signal to process and to a thread.
  2. What are the options for handling a signal ? How is it (blocking, handling) set up for process and for threads ?
  3. What are the rules for writing signal handlers ? How can one cope with restrictions for their implementation ?


  1. 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 ?
  2. Describe the process for creating and destroying a thread ? How do the desctructors of keyed values and exit handlers work ?
  3. 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.
  4. What are the ways of solving synchronization arithmetic operation (adding and subtraction) between threads and list their advantages and disadvantages.
  5. What happens if one thread calls fork() ? What problem this could lead to and how to solve it ?

Synchronization and locking

  1. Explain locking conflict when accessing shared data ? What is a deadlock ? Describe locking of files by using fcntl().
  2. Explain locking by using lock files.


  1. Describe semaphores implemented in UNIX System V IPC. What commands can be used to list their state ?


  1. Describe workings of server and client (in terms of sequence of system calls) for connected network services.
  2. Describe workings of server and client (in terms of sequence of system calls) for datagram network services.
  3. 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 ?
  4. 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 ?
  5. Describe possibilities of sequential and parallel handling of clients of TCP server.
  6. How does inetd work ? How does parallel handling of UDP clients look like ?
  7. 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: