View on GitHub

Computer Architecture and Operating Systems

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

Контрольная Работа: Операционные Системы (Модуль 4)

Ссылка на форму для отправки ответов здесь.

Формула оценки:

Оценка = 0.4 * Теория + 0.6 * Задача

Часть 1. Теоретические Вопросы

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.
    • Memory layout of a program: What memory segments do you know? What purposes do they serve?
    • What ways to allocate memory do you know?
    • How dynamic memory allocation via malloc/free is implemented (using what data structures)?
    • Give definitions of payload, fragmentation (internal and external), and placement strategies.
    • What is the purpose of the sbrk system call?
  2. Processes.
    • What is a process? What parts does it contains (its layout in memory)?
    • List the states of a process and describe how it changes states.
    • What is Process Control Block (PCB)? What information does it contain?
    • Describe the idea of process creation with system calls fork and exec. What is the role of system call wait?
    • How to see the list of running processes in Linux (what system utilities do you know)? What Linux system folder does contain information about running processes?
  3. Permissions.
    • What access rights do you know? What permission groups do you know?
    • How to view and how to change file permissions (what utility tools to use)? How to change file ownership?
    • Give definitions of hard and soft links, explain the differences between them. How to create links?
    • Explain the setuid/setguid permissions.
    • Study the text below. What can you say about file1, file2, file3, and file4?
    (base) andrewt@ThinkPad-T490s:~/Documents/src/hse/temp$ ls -li
    total 36
    35140286 drwxrwxr-x 2 acos   acos  4096 Jun 17 09:03 file1
    35140287 -rwxrwsr-x 2 myuser acos 15776 Jun 17 09:01 file2
    35140288 lrwxrwxrwx 1 acos   acos     5 Jun 17 09:03 file3 -> file1
    35140287 -rwxrwsr-x 2 myuser acos 15776 Jun 17 09:01 file4
    

Часть 2. Задача По Программированию

Write a program in C that does the following:

Example of Function (you need your variant, see below)

Note: the ^ symbol means “power”.

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

Requirements and Grades

Hints

Варианты

Выберите свой номер варианта согласно своему номеру в группе. Списки групп здесь:

Варианты для групп:

Замечание: символ ^ означает возведение в степень.