ZEMRIS Hrvatski |
Laboratory exercises can be submitted only during the semester in the weeks indicated in the table.
Week |
Working with demonstrators (no registration for live demonstrations) |
Deadlines for submitting labs in A109 and A110 (registration through the Ferko system) |
Scoring (maximum possible points) |
|||
Exercise 1 |
Exercise 2 optional |
Exercise 3 | Exercise 4 |
|||
1. Week |
Monday, 24.3.2025.
10-11 in A102 |
Thursday,
27.3.2025. 8-18 Friday, 28.3.2025. 8-15 |
4 |
- |
- |
- |
2. Week |
Thursday, 3.4.2025. 9-9:45 in A110 |
Thursday,
3.4.2025. 8-18 Friday, 4.4.2025. 8-15 |
3 |
- |
- |
- |
3. Week |
Thursday, 10.4.2025 9-9:45 in A110 |
Thursday,
10.4.2025. 8-18 Friday, 11.4.2025. 8-15 |
2 |
4 |
- |
- |
4. Week |
Thursday, 17.4.2025 9-9:45 in A110 |
Thursday,
17.4.2025. 8-18 Friday, 18.4.2025. 8-15 |
- |
3 |
- |
- |
5. Week |
Thursday, 22.5.2025 9-9:45 in A110 |
Thursday, 22.5.2025.
8-18 |
- |
- |
8 |
- |
6. Week |
Wednesday, 28.5.2025 9-9:45 in A110 |
Wednesday,
28.5.2025. 8-18 Thursday, 29.5.2025. 8-15 |
- |
- |
6 |
4 |
7. Week |
Thursday, 5.6.2025 9-9:45 in A110 |
Thursday,
5.6.2025. 8-18 Friday, 6.6.2025. 8-15 |
- |
- |
4 |
3 |
8. Week |
- |
(RESERVE
PERIOD) |
0 |
- |
0 |
- |
|
Tasks from laboratory exercises are solved individually at home.
Application for submission of exercises. Every student must register for each exercise they want to submit in a given term.
Any failure to attend the scheduled lab appointment is penalized with a negative point.
Exercise submission and scoring. When submitting
a laboratory exercise, points will be awarded from -2 (negative points are possible) up to the maximum number of points indicated in the table above. The laboratory exercise cannot be submitted if it
has not previously been uploaded to Ferko system.
A maximum of two exercises can be submitted in a single term/week. During the reserve period, a maximum of one exercise can be submitted.
Exercises must be submitted in order.
Exercises must be uploaded to Ferko no later than
Wednesday by 9 a.m. in the week when the lab is submitted.
Students who completed the laboratory exercises in previous years but did not pass the course can contact the teacher within the first three weeks of classes to have their points from the previous year scaled.
Demonstrations. To work with the demonstrators, it is not necessary to register in advance in Ferko, but students can participate live in the meetings with the demonstrators at the times specified in the table.
Write the source code of the program according to the instructions (pay special attention to indentation, spacing, and breaking long lines!). Examples of correct styling are shown in the codes attached in the instructions (e.g., random_prime.c, sigaction.c).
Put all source code files that make up one exercise into an archive with an arbitrary name, for example, "exercise_x.zip" (where 'x' is the exercise number). The plagiarism detection system does not accept archives in formats other than zip (e.g., rar, gz, etc.).
If it's just a single source file, it doesn't need to be
archived.
Do not include any other files (except the original program source files) or directories in the archive. (The archive must not contain a directory, but only source code files (the archive must not contain, for example, a makefile)). !
After verifying that the correct file (zip archive) is uploaded to the web, it is mandatory to lock
the submission on the web. Failure to follow these instructions will be penalized with negative points. Frequent mistakes that result in penalties include: using an archive format other than zip,
submitting an exercise in the wrong place (e.g., exercise_x.zip is submitted as exercise_y.zip), including subdirectories or executable files in the archive.
Choosing the correct file to upload is a challenge and mistakes will be penalized with negative points.
All questions related to laboratory exercises should be sent to os@zemris.fer.hr.
Important note: Everything that is not explicitly given in the tasks can be solved in an arbitrary way!
Exercise 1: Signals
(4)
In an arbitrarily chosen programming language, simulate:
- an interrupt system with program support for priority interrupting -
software interrupt solution (students whose JMBAG ends with digits 0, 1, 2, 3
or 4)
- an interrupt system with hardware support (students whose
JMBAG ends with digits 5, 6, 7, 8, or 9)
with four interrupt levels (four priorities), where interrupts are simulated
either by arbitrarily selected signals generated with the keyboard or by another
program, or all interrupts are simulated by a single signal (e.g., SIGINT), after
which the interrupt priority is entered interactively.
The simulator should print the state of the system (whether the main program or
an interrupt subroutine is being executed and the values of all relevant data
structures) every time a change occurs in the system.
Examples of programs:
example_signals.c,
example_sleep.c
The name of the file containing the source code is not important, but it is recommended that the file be named
signals.c. The file extension should match the programming language used, so if the task is solved in C++, the file should be named signals.cpp. The same applies to
all other exercises, where suggested filenames are in brackets in red.
Examples of questions students may be asked when submitting the first and second exercises.
Exercise 2: Multitasking
(3) (This task is optional but carries 3 points). In a
UNIX/Linux-like environment using the C or C++ programming language (you are
welcome to use any standard of these languages), implement the following basic
shell functionalities: program execution in the foreground, multiple
programs executing in the background, and a history of shell commands (prompt
command: history). In the background, the shell should allow
printing of running processes and terminating a process using the
SIGKILL or SIGTERM signal. You may use all functions provided by the standard
C library (e.g., glibc, musl) except system.
Detailed instructions.
Exercise 3: Synchronization Mechanisms:
Semaphores and
Monitors
Using the C or C++ programming language, solve the following tasks:
(5) Task 3a: Solve the sandwich
makers problem using processes and semaphores (semaphores.c)
(5) Task 3b: Solve the problem of the
party-breakers threads using monitors (monitori.c)
Exercise 4: Memory Management by Paging (OPTIONAL - This task is not mandatory but carries points)
(4) Task 4: In an arbitrarily chosen programming language, simulate on-demand
paging for a computer with a random number of available frames and a random program size
using the clock algorithm for page replacement.
After each request for RAM access, print the contents of all algorithm data
structures.
An example of output
An example of a past task with a
description of the required data structures (which does not need to be
solved exactly as stated in that example) (paging.c)
Checklist for verifying that all actions have been completed during registration and submission of the exercise. Scoring chart.
Implementing labs on a remote computer
Linux on a computer with the MS Windows operating system installed
Consultations for lectures and exercises (with prior notification by email)
Group |
Lecturer, room |
P02 |
Marin Golub: D316 |
P04 |
Leonardo Jelenković: D342 |
P03 |
Marko Đurasević: D338 |
P01 |
Domagoj Jakobović: D329 |
P01E |
Nikolina Frid: D340 |
Exercise consultations (with mandatory announcement by email)
Assistant, room |
Ivan Grubišić: D307 |
The consultation time with the assistant or the teacher is arranged via email at name.surname@fer.hr.
Questions regarding laboratory exercises should be sent to os@zemris.fer.hr.
Last updated: 31.03.2025