View on GitHub

Computer Architecture and Operating Systems

Course taught at Faculty of Computer Science of Higher School of Economics

Final Test: Operating Systems

The grade formula is as follows:

Grade = 0.4 * Theory + 0.6 * Programming

Part 1. Theoretical Questions

Answer the theoretical questions in a few sentences (1-2 paragraphs for a question).

Use your own words. Copy-paste from external sources and other students will result in 100% penalty.

  1. Memory management.
    • What ways to allocate memory do you know?
    • How dynamic memory allocation is implemented in C?
    • How does memory mapping and shared memory work?
  2. Processes and threads.
    • Give definitions of process and thread.
    • What is the difference between them?
    • What inter-process communication mechanisms do you know?
    • What synchronization mechanisms do you now?
  3. Permissions.
    • What Linux files types to you know?
    • What access rights and permission groups do you know?
    • Study the output of the ls -li command below.
    • What can you say about file1, file2, and file3?

      acos@acos-vm:~/folder$ ls -li
      total 44
      268508 -rwsr-xr-x 2 myuser acos 16832 июн 17 14:04 file1
      262605 drwxr-xr-- 1 acos   acos  4096 июн 17 14:08 file2
      268508 -rwsr-xr-x 2 myuser acos 16832 июн 17 14:04 file3
      

Part 2. Programming Task

Write a program in C that does the following:

Requirements:

Hints

Variants

Choose your variant number according to your number in the list of students.

Note: the ^ symbol means “power”.


Variant

f0(a, b, c, d) = (a - b + c - d) / 2
f1(x) = 2*x^3 - 4*x^2 + 3*x + 1
f2(x) = sin(5*x)*4 + 3
f3(x) = 1 / (1 + e^(-7*x))
f4(x) = 2^x + 5