diff --git a/104/404.html b/104/404.html index 2770998241..8618eb62e6 100644 --- a/104/404.html +++ b/104/404.html @@ -4,13 +4,13 @@ Page Not Found | Operating Systems - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/104/Assignments/Asynchronous Web Server/index.html b/104/Assignments/Asynchronous Web Server/index.html index 03172eacf9..ff60599651 100644 --- a/104/Assignments/Asynchronous Web Server/index.html +++ b/104/Assignments/Asynchronous Web Server/index.html @@ -4,7 +4,7 @@ Asynchronous Web Server | Operating Systems - + @@ -28,7 +28,7 @@ These folders are created and removed using the init and cleanup arguments to _test/run_test.sh.

Behind the Scenes

Tests are basically unit tests.

Each test function follows the unit test patter: initialization, action, evaluation.

Each test starts the server, creates a given context, checks for validity and then terminates the server process.

Debugging

Logs are collected in test.log and wget.log files.

Resources

- + \ No newline at end of file diff --git a/104/Assignments/Asynchronous Web Server/src/http-parser/index.html b/104/Assignments/Asynchronous Web Server/src/http-parser/index.html index d1e99333b8..92e5b9a6b6 100644 --- a/104/Assignments/Asynchronous Web Server/src/http-parser/index.html +++ b/104/Assignments/Asynchronous Web Server/src/http-parser/index.html @@ -4,7 +4,7 @@ HTTP Parser | Operating Systems - + @@ -48,7 +48,7 @@ buffer to avoid copying memory around if this fits your application.

Reading headers may be a tricky task if you read/parse headers partially. Basically, you need to remember whether last header callback was field or value and apply following logic:

(on_header_field and on_header_value shortened to on_h_*)
------------------------ ------------ --------------------------------------------
| State (prev. callback) | Callback | Description/action |
------------------------ ------------ --------------------------------------------
| nothing (first call) | on_h_field | Allocate new buffer and copy callback data |
| | | into it |
------------------------ ------------ --------------------------------------------
| value | on_h_field | New header started. |
| | | Copy current name,value buffers to headers |
| | | list and allocate new buffer for new name |
------------------------ ------------ --------------------------------------------
| field | on_h_field | Previous name continues. Reallocate name |
| | | buffer and append callback data to it |
------------------------ ------------ --------------------------------------------
| field | on_h_value | Value for current header started. Allocate |
| | | new buffer and copy callback data to it |
------------------------ ------------ --------------------------------------------
| value | on_h_value | Value continues. Reallocate value buffer |
| | | and append callback data to it |
------------------------ ------------ --------------------------------------------

See examples of reading in headers:

- + \ No newline at end of file diff --git a/104/Assignments/Memory Allocator/index.html b/104/Assignments/Memory Allocator/index.html index 85bffb242c..427bef2040 100644 --- a/104/Assignments/Memory Allocator/index.html +++ b/104/Assignments/Memory Allocator/index.html @@ -4,7 +4,7 @@ Memory Allocator | Operating Systems - + @@ -52,7 +52,7 @@ Every other address is displayed as <label> + offset, where the label is the closest mapped address.

run_tests.py supports three modes:

If you want to run a single test, you give its name or its path as arguments to run_tests.py:

student@os:~/.../mem-alloc/tests$ python3 run_tests.py test-all
OR
student@os:~/.../mem-alloc/tests$ python3 run_tests.py snippets/test-all

Debugging in VSCode

If you are using Visual Studio Code, you can use the launch.json configurations to run tests.

Setup the breakpoints in the source files or the tests and go to Run and Debug (F5). Select Run test script and press F5. This will enter a dialogue where you can choose which test to run.

You can find more on this in the official documentation: Debugging with VSCode.

If VSCode complains about MAP_ANON argument for mmap() change C_Cpp.default.cStandard option to gnu11.

Resources

- + \ No newline at end of file diff --git a/104/Assignments/Mini Libc/index.html b/104/Assignments/Mini Libc/index.html index c0f054532a..8bd0a0a5aa 100644 --- a/104/Assignments/Mini Libc/index.html +++ b/104/Assignments/Mini Libc/index.html @@ -4,7 +4,7 @@ Mini-libc | Operating Systems - + @@ -27,7 +27,7 @@ Some tests don't fail because the missing implementation equates to the bad behavior being tested not happening.

Each test is worth a number of points. The total number of points is 900. The maximum grade is obtained by dividing the number of points to 10, for a maximum grade of 90.

A successful run will show the output:

student@so:~/.../assignments/mini-libc/tests$ make check
[...]
test_strcpy ........................ passed ... 9
test_strcpy_append ........................ passed ... 9
test_strncpy ........................ passed ... 9
test_strncpy_cut ........................ passed ... 9
test_strcat ........................ passed ... 9
test_strcat_from_zero ........................ passed ... 9
test_strcat_multiple ........................ passed ... 9
test_strncat ........................ passed ... 9
test_strncat_cut ........................ passed ... 9
test_strcmp_equal ........................ passed ... 9
test_strcmp_same_size_less ........................ passed ... 1
test_strcmp_same_size_greater ........................ passed ... 9
test_strcmp_diff_size_less ........................ passed ... 1
test_strcmp_diff_size_greater ........................ passed ... 9
test_strncmp_equal_size_equal ........................ passed ... 9
test_strncmp_diff_contents_equal ........................ passed ... 9
test_strncmp_diff_size_equal ........................ passed ... 9
test_strchr_exists ........................ passed ... 11
test_strchr_exists_twice ........................ passed ... 9
test_strchr_not_exists ........................ passed ... 1
test_strrchr_exists ........................ passed ... 11
test_strrchr_exists_twice ........................ passed ... 9
test_strrchr_not_exists ........................ passed ... 1
test_strstr_exists ........................ passed ... 11
test_strstr_exists_twice ........................ passed ... 9
test_strstr_not_exists ........................ passed ... 1
test_strrstr_exists ........................ passed ... 11
test_strrstr_exists_twice ........................ passed ... 9
test_strrstr_not_exists ........................ passed ... 1
test_memcpy ........................ passed ... 11
test_memcpy_part ........................ passed ... 9
test_memcmp_equal_size_equal ........................ passed ... 9
test_memcmp_diff_contents_equal ........................ passed ... 9
test_memcmp_diff_size_equal ........................ passed ... 9
test_memset ........................ passed ... 9
test_memset_part ........................ passed ... 9
test_memmove_apart ........................ passed ... 9
test_memmove_src_before_dst ........................ passed ... 9
test_memmove_src_after_dst ........................ passed ... 9
test_open_non_existent_file ........................ passed ... 8
test_open_invalid_access_mode ........................ passed ... 8
test_open_file_as_directory ........................ passed ... 8
test_open_directory_for_writing ........................ passed ... 8
test_open_force_invalid_creation ........................ passed ... 8
test_open_close_existent_file ........................ passed ... 8
test_open_close_create_file ........................ passed ... 8
test_open_read_write_only_mode ........................ passed ... 8
test_open_write_read_only_mode ........................ passed ... 8
test_lseek_invalid_fd ........................ passed ... 8
test_lseek_invalid_whence ........................ passed ... 8
test_lseek_invalid_offset ........................ passed ... 8
test_lseek_set ........................ passed ... 8
test_lseek_cur ........................ passed ... 8
test_lseek_end ........................ passed ... 8
test_lseek_combined ........................ passed ... 8
test_truncate_read_only_file ........................ passed ... 8
test_truncate_invalid_size ........................ passed ... 8
test_truncate_directory ........................ passed ... 8
test_truncate_non_existent_file ........................ passed ... 8
test_truncate_file ........................ passed ... 8
test_ftruncate_read_only_file ........................ passed ... 8
test_ftruncate_invalid_size ........................ passed ... 8
test_ftruncate_directory ........................ passed ... 8
test_ftruncate_bad_fd ........................ passed ... 8
test_ftruncate_file ........................ passed ... 8
test_stat_non_existent_file ........................ passed ... 8
test_stat_regular_file ........................ passed ... 8
test_fstat_bad_fd ........................ passed ... 8
test_fstat_regular_file ........................ passed ... 8
test_puts ........................ passed ... 15
test_open_close_create_file ........................ passed ... 10
test_open_close_read_byte ........................ passed ... 10
test_ftruncate ........................ passed ... 10
test_truncate ........................ passed ... 10
test_fstat ........................ passed ... 10
test_stat ........................ passed ... 10
test_sleep ........................ passed ... 20
test_nanosleep ........................ passed ... 20
test_mmap ........................ passed ... 8
test_mmap_bad_fd ........................ passed ... 8
test_mmap_bad_flags ........................ passed ... 8
test_mremap ........................ passed ... 8
test_malloc ........................ passed ... 8
test_malloc_two ........................ passed ... 8
test_malloc_access ........................ passed ... 8
test_malloc_memset ........................ passed ... 8
test_malloc_memcpy ........................ passed ... 8
test_calloc ........................ passed ... 8
test_realloc ........................ passed ... 8
test_realloc_access ........................ passed ... 8
test_realloc_memset ........................ passed ... 8
test_realloc_array ........................ passed ... 8
test_malloc ........................ passed ... 10
test_multiple_malloc ........................ passed ... 10
test_malloc_free ........................ passed ... 10
test_multiple_malloc_free ........................ passed ... 10
test_malloc_free_sequence ........................ passed ... 10
test_malloc_perm_ok ........................ passed ... 10
test_malloc_perm_notok ........................ passed ... 10
test_mmap ........................ passed ... 10
test_mmap_munmap ........................ passed ... 10
test_mmap_perm_ok ........................ passed ... 10
test_mmap_perm_notok ........................ passed ... 10
test_mmap_perm_none ........................ passed ... 10

Total: 90/100

Behind the Scenes

For a fine grained approach, build tests and ignore errors (due to missing source code and header files) by using:

student@so:~/.../assignments/mini-libc/tests$ make -i

Then run the tests, either individually via executable files and scripts:

student@so:~/.../assignments/mini-libc/tests$ ./test_lseek.sh
test_lseek ........................ passed ... 10

student@so:~/.../assignments/mini-libc/tests$ ./test_memory
test_mmap ........................ passed ... 8
test_mmap_bad_fd ........................ passed ... 8
[...]

Or run them all via the run_all_tests.sh script:

student@so:~/.../assignments/mini-libc/tests$ ./run_all_tests.sh
test_strcpy ........................ passed ... 9
test_strcpy_append ........................ passed ... 9
test_strncpy ........................ passed ... 9
[...]

Resources

- + \ No newline at end of file diff --git a/104/Assignments/Mini Shell/index.html b/104/Assignments/Mini Shell/index.html index b58799c8c2..bd02a4d301 100644 --- a/104/Assignments/Mini Shell/index.html +++ b/104/Assignments/Mini Shell/index.html @@ -4,7 +4,7 @@ Minishell | Operating Systems - + @@ -38,7 +38,7 @@ To see the results of the tests, you can check tests/_test/outputs/ directory.

Memory leaks

To inspect the unreleased resources (memory leaks, file descriptors) set USE_VALGRIND=yes and DO_CLEANUP=no in tests/_test/run_test.sh. You can modify both the path to the Valgrind log file and the command parameters. To see the results of the tests, you can check tests/_test/outputs/ directory.

- + \ No newline at end of file diff --git a/104/Assignments/Mini Shell/util/parser/index.html b/104/Assignments/Mini Shell/util/parser/index.html index 32a394f01d..6dd04d2d1e 100644 --- a/104/Assignments/Mini Shell/util/parser/index.html +++ b/104/Assignments/Mini Shell/util/parser/index.html @@ -4,7 +4,7 @@ Parser | Operating Systems - + @@ -14,7 +14,7 @@ To use the parser, you need to link the object files parser.yy.o and parser.tab.o with your program.

Example

Tests

More tests can be found in the tests directory:

student@os:/.../minishell/util/parser$ cd tests

student@os:/.../minishell/util/parser/tests$ ../DisplayStructure &>small_tests.out <small_tests.txt

student@os:/.../minishell/util/parser/tests$ cat small_tests.out
> mkdir tmp
Command successfully read!
command_t (
scmd (
simple_command_t (
verb (
'mkdir'
)
params (
'tmp'
)
)
)
)

> cd tmp
Command successfully read!
command_t (
scmd (

...
student@os:/.../minishell/util/parser/tests$ ../DisplayStructure &>ugly_tests.out <ugly_tests.txt

student@os:/.../minishell/util/parser/tests$ ../DisplayStructure &>negative_tests.out <negative_tests.txt

Note

The parser will fail with an error of unknown character if you use the Linux parser (which considers the end of line as \n) on Windows files (end of line as \r\n) because at the end of the lines (returned by getline()) there will be a \r followed by \n. The opposite works (Windows parser with Linux files). The test files use the Linux convention (\n).

Other information

More information about the parser can be found in the file parser.h.

- + \ No newline at end of file diff --git a/104/Assignments/Parallel Graph/index.html b/104/Assignments/Parallel Graph/index.html index 33385d21c4..ad11b0a193 100644 --- a/104/Assignments/Parallel Graph/index.html +++ b/104/Assignments/Parallel Graph/index.html @@ -4,7 +4,7 @@ Parallel Graph | Operating Systems - + @@ -46,7 +46,7 @@ They also need to have certain configuration options. It's easiest to run them in a Docker-based setup with everything configured.

Fine-Grained Testing

Input tests cases are located in tests/in/. If you want to run a single test, use commands such as below while in the src/ directory:

$./parallel ../tests/in/test5.in
-38

$ ./serial ../tests/in/test5.in
-38

Results provided by the serial and parallel implementation must be the same for the test to successfully pass.

- + \ No newline at end of file diff --git a/104/Assignments/index.html b/104/Assignments/index.html index 99391a7667..27e1899cae 100644 --- a/104/Assignments/index.html +++ b/104/Assignments/index.html @@ -4,13 +4,13 @@ Assignments | Operating Systems - +
Skip to main content
- + \ No newline at end of file diff --git a/104/Data/Questions/bypass-canary/index.html b/104/Data/Questions/bypass-canary/index.html index a39384c854..6949d2326a 100644 --- a/104/Data/Questions/bypass-canary/index.html +++ b/104/Data/Questions/bypass-canary/index.html @@ -4,13 +4,13 @@ Bypass Canary | Operating Systems - +
Skip to main content

Bypass Canary

Question

If we enable ASLR, can we still exploit the stack_protector program?

  • no, because the address of pawned is going to be different for every run.

  • yes, because ASLR cannot work well when the canary is activated.

  • yes, because ASLR randomizes the start address of a section, but the offsets remain the same.
  • no, because the address to which addr points to is going to be random
- + \ No newline at end of file diff --git a/104/Data/Questions/half-page/index.html b/104/Data/Questions/half-page/index.html index 2586e3c768..a9d65927db 100644 --- a/104/Data/Questions/half-page/index.html +++ b/104/Data/Questions/half-page/index.html @@ -4,7 +4,7 @@ Half Page | Operating Systems - + @@ -12,7 +12,7 @@
Skip to main content

Half Page

Question Text

char *p = malloc(2 * 1024);

What is a potential problem when allocating half a page?

Question Answers

  • It will fragment the virtual memory because users should always request at least one page

  • Asking for less than a page might place the memory on two different pages

  • Writing to the other half may be allowed
  • Allocations smaller than one page should use the stack

Feedback

The OS allocates memory in chunks of 4 KB (the page size). If the memory we allocate happens to be placed at the beginning of a page, we have permission to update the second half of this page despite not requesting it. This might be a problem because buffer overflows can pass unnoticed.

- + \ No newline at end of file diff --git a/104/Data/Questions/index.html b/104/Data/Questions/index.html index 0b8120b6b4..4ff8e813c0 100644 --- a/104/Data/Questions/index.html +++ b/104/Data/Questions/index.html @@ -4,13 +4,13 @@ Questions | Operating Systems - +
Skip to main content
- + \ No newline at end of file diff --git a/104/Data/Questions/malloc-brk/index.html b/104/Data/Questions/malloc-brk/index.html index aa0affc797..3c4298e666 100644 --- a/104/Data/Questions/malloc-brk/index.html +++ b/104/Data/Questions/malloc-brk/index.html @@ -4,14 +4,14 @@ malloc()` and `brk() | Operating Systems - +
Skip to main content

malloc() and brk()

Question Text

When does malloc() use brk()?

Question Answers

  • brk() is outdated, malloc() always uses mmap()
  • When it allocates a small chunk of memory
  • When it allocates an array

  • When it's working with dynamic libraries

Feedback

malloc() uses both brk() and mmap(), but prefers brk() for small chunks of memory to keep granular allocations in a contiguous area. This way, free() does not necessarily return the memory to the OS as it might only mark the zone as "free" within libc's allocator and reuse it for later allocations.

- + \ No newline at end of file diff --git a/104/Data/Questions/malloc-mmap/index.html b/104/Data/Questions/malloc-mmap/index.html index b7a4e1fe83..69706eb2f9 100644 --- a/104/Data/Questions/malloc-mmap/index.html +++ b/104/Data/Questions/malloc-mmap/index.html @@ -4,7 +4,7 @@ malloc()` and `mmap() | Operating Systems - + @@ -12,7 +12,7 @@
Skip to main content

malloc() and mmap()

Question Text

When does malloc() use mmap()?

Question Answers

  • When it allocates read-only memory

  • When it allocates zeroed memory

  • When it allocates chunks of memory bigger than an internal threshold
  • When the heap is full

Feedback

malloc uses both brk() and mmap(), but prefers mmap() for big chunks of memory (by default larger than 128 KB). This value can be altered using mallopt() with the param argument set to M_MMAP_THRESHOLD. These memory blocks are unlikely to be reused so they are not placed on heap to avoid memory fragmentation.

- + \ No newline at end of file diff --git a/104/Data/Questions/memory-access/index.html b/104/Data/Questions/memory-access/index.html index a818ef08b2..3007453204 100644 --- a/104/Data/Questions/memory-access/index.html +++ b/104/Data/Questions/memory-access/index.html @@ -4,7 +4,7 @@ Modify String | Operating Systems - + @@ -13,7 +13,7 @@ One stores a constant pointer, cp, whereas the other stores the actual string. The compiler thinks that cp is able to modify the memory location that it points therefore it passes compilation. But at runtime a segmentation fault is issued because we are accessing data that is stored in read-only memory.

- + \ No newline at end of file diff --git a/104/Data/Questions/memory-aslr/index.html b/104/Data/Questions/memory-aslr/index.html index 1a95c58bae..924e5be1fd 100644 --- a/104/Data/Questions/memory-aslr/index.html +++ b/104/Data/Questions/memory-aslr/index.html @@ -4,13 +4,13 @@ ASLR | Operating Systems - +
Skip to main content

ASLR

Question Text

If we enable ASLR and run the bo_write_practice executable with the previously payload what vulnerabilities will we be able to still exploit?

Question Answers

  • we can still jump to the secret_func

  • we can both still jump to the secret_func and overwrite the local variable

  • we can jump to a library function

  • we can still overwrite the local variable
- + \ No newline at end of file diff --git a/104/Data/Questions/memory-granularity/index.html b/104/Data/Questions/memory-granularity/index.html index 0722e6cf6b..852a7c614f 100644 --- a/104/Data/Questions/memory-granularity/index.html +++ b/104/Data/Questions/memory-granularity/index.html @@ -4,14 +4,14 @@ Memory Granularity | Operating Systems - +
Skip to main content
- + \ No newline at end of file diff --git a/104/Data/Questions/memory-leaks/index.html b/104/Data/Questions/memory-leaks/index.html index 244003bf68..e8f9808f46 100644 --- a/104/Data/Questions/memory-leaks/index.html +++ b/104/Data/Questions/memory-leaks/index.html @@ -4,14 +4,14 @@ Memory Leaks | Operating Systems - +
Skip to main content

Memory Leaks

Question Text

What happens to the leaked memory when the process finishes execution?

Question Answers

  • It will be freed by the OS garbage collector

  • It remains unusable until the first restart

  • It is freed alongside all memory used by process
  • It will remain reachable until another process explicitly frees it

Feedback

When a process ends, all its memory zones are freed by the OS to be reused. Leaking memory becomes a major problem in case of programs that run indefinitely, because the leaked memory will stack, causing a memory outage.

- + \ No newline at end of file diff --git a/104/Data/Questions/memory-regions-vars/index.html b/104/Data/Questions/memory-regions-vars/index.html index 80c2a8c836..02df126737 100644 --- a/104/Data/Questions/memory-regions-vars/index.html +++ b/104/Data/Questions/memory-regions-vars/index.html @@ -4,7 +4,7 @@ Variables in memory regions | Operating Systems - + @@ -14,7 +14,7 @@ Non-static local variables go on the.stack (c, k). malloc()'ed memory goes on the.heap. For k, the pointer is stored on the.stack, but the allocated memory, to which k points is stored on the.heap.

- + \ No newline at end of file diff --git a/104/Data/Questions/memory-stack-protector/index.html b/104/Data/Questions/memory-stack-protector/index.html index 6a96fbf4a0..93eb44c690 100644 --- a/104/Data/Questions/memory-stack-protector/index.html +++ b/104/Data/Questions/memory-stack-protector/index.html @@ -4,7 +4,7 @@ Stack Protector | Operating Systems - + @@ -13,7 +13,7 @@ Why is that?

Question Answers

Feedback

When using the canary, to minimize the damage a buffer overflow could cause, the buffers are always placed right below the canary. By doing so, a buffer overflow will not overwrite anything. However, it is still possible to overwrite other local buffers, provided that a function declares more than 1 array or if we use the pointer directly.

- + \ No newline at end of file diff --git a/104/Data/Questions/mmap-file/index.html b/104/Data/Questions/mmap-file/index.html index 0255b00982..ad97ed1df3 100644 --- a/104/Data/Questions/mmap-file/index.html +++ b/104/Data/Questions/mmap-file/index.html @@ -4,14 +4,14 @@ `mmap()` file | Operating Systems - +
Skip to main content

mmap() file

Question Text

What is one advantage of mapping a file in memory?

Question Answers

  • It reduces interaction with the disk
  • Consumes less memory

  • It is faster because it does not uses the file API

  • Allows all threads to use the same memory area

Feedback

After mapping a file in memory, all changes will be visible only in memory. When removing the mapping or explicitly calling msync() the information from memory will be visible on disk.

- + \ No newline at end of file diff --git a/104/Data/Questions/operators/index.html b/104/Data/Questions/operators/index.html index 728b80e4ab..1cccfc2822 100644 --- a/104/Data/Questions/operators/index.html +++ b/104/Data/Questions/operators/index.html @@ -4,13 +4,13 @@ Operator Overloading | Operating Systems - +
Skip to main content

Operator Overloading

Question Text

How many constructor calls, copy constructor calls, assignment operator calls and destructor calls does the following program issue?

Obj quiz(Obj o1, Obj o2)
{
o2 = o1;
return o2;
}
void main()
{
Obj b = quiz(o1, o2);
}

Question Answers

  • constructor calls = 0, copy constructor calls = 3, assignment operator calls = 1, destructor calls = 3
  • constructor calls = 1, copy constructor calls = 2, assignment operator calls = 1, destructor calls = 2

  • constructor calls = 0, copy constructor calls = 2, assignment operator calls = 1, destructor calls = 2

  • constructor calls = 0, copy constructor calls = 3, assignment operator calls = 1, destructor calls = 1

Feedback

  • There are no constructor calls because there is no object construction when using int.
  • There are 3 copy constructor calls: for passing o1, for passing o2, and for returning o2.
  • There is 1 assignment operator call for o2 = o1.
  • There are 3 destructor calls, because each constructed object needs to be destroyed.
- + \ No newline at end of file diff --git a/104/Data/Questions/page-allocation/index.html b/104/Data/Questions/page-allocation/index.html index 36fd379995..3d3e214330 100644 --- a/104/Data/Questions/page-allocation/index.html +++ b/104/Data/Questions/page-allocation/index.html @@ -4,14 +4,14 @@ Page Allocation | Operating Systems - +
Skip to main content

Page Allocation

Question Text

student@os:~/.../drills/tasks/static-dynamic/support$ size hello-static
text data bss dec hex filename
893333 20996 7128 921457 e0f71 hello-static

How many bytes should we add to the .data section to make its size 28 KB, instead of 24 KB?

Question Answers

  • 1 KB

  • 4 KB

  • 3580 bytes

  • 3581 bytes

Feedback

The total size must be 1 byte over the 24 KB threshold to cause a new page allocation. So in order to get that past the current size of 20996, we need 3581 bytes:

student@os:~$ echo "24 * 1024 + 1 - 20996" | bc
3581
- + \ No newline at end of file diff --git a/104/Data/Questions/stack-layout/index.html b/104/Data/Questions/stack-layout/index.html index 2e9dee7c57..8853170974 100644 --- a/104/Data/Questions/stack-layout/index.html +++ b/104/Data/Questions/stack-layout/index.html @@ -4,13 +4,13 @@ Stack layout | Operating Systems - +
Skip to main content

Stack layout

Question Text

What is the stack layout for the fun function in the bo_write.c program (starting from a high address)?

Question Answers

  • return address, old rbp, maybe some padding, variable a, b[0], b[1], b[2]
  • return address, old rbp, maybe some padding, variable a, b[2], b[1], b[0]
  • return address, maybe some padding, variable a, b[0], b[1], b[2]

  • return address, old rbp, maybe some padding, b[0], b[1], b[2], variable a

Feedback

Look at the assembly code and notice the exact layout.

- + \ No newline at end of file diff --git a/104/Data/Questions/string-buff-over/index.html b/104/Data/Questions/string-buff-over/index.html index b0b2929bb4..91b6677db0 100644 --- a/104/Data/Questions/string-buff-over/index.html +++ b/104/Data/Questions/string-buff-over/index.html @@ -4,14 +4,14 @@ String Buffer Overflow | Operating Systems - +
Skip to main content

String Buffer Overflow

Question Text

Why does the buffer overflow occur?

Question Answers

  • the initial string, declared in main(), does not contain a terminating null byte.

  • the buffer is not large enough to store the copied bytes.

  • memcpy() skips the copying of terminating null bytes.

  • memcpy() copies 4 bytes, whereas the size of the string, including the terminating null byte, is 5.

Feedback

The string soso has length equal to 4, however, 5 bytes are actually used to store it, including the terminating null byte. Even though the buffer declared in fun() is not large enough to store the 5 bytes, the underlying issue is that we copying just 4 bytes, thus skipping the null byte.

- + \ No newline at end of file diff --git a/104/Data/Questions/string-strcpy/index.html b/104/Data/Questions/string-strcpy/index.html index a13477ed93..d6fc28a903 100644 --- a/104/Data/Questions/string-strcpy/index.html +++ b/104/Data/Questions/string-strcpy/index.html @@ -4,13 +4,13 @@ Strcpy Buffer Overflow | Operating Systems - +
Skip to main content

Strcpy Buffer Overflow

Question Text

Does any buffer overflow occur with the latest version of the program?

Question Answers

  • no, because strcpy() was designed to correctly handle such situations.

  • no, because the string is correctly printed, i.e. no extra characters.

  • we cannot know

  • yes, strcpy() copies the entirety of the source, including the \0; since the size of dst is 4 the null byte overwrites the least significant byte of var

Feedback

Print the contents of variable var.

- + \ No newline at end of file diff --git a/104/Data/Questions/valgrind-leaks/index.html b/104/Data/Questions/valgrind-leaks/index.html index a4b1682aef..529c2af798 100644 --- a/104/Data/Questions/valgrind-leaks/index.html +++ b/104/Data/Questions/valgrind-leaks/index.html @@ -4,7 +4,7 @@ Valgrind Leaks | Operating Systems - + @@ -12,7 +12,7 @@
Skip to main content

Valgrind Leaks

Question Text

struct student {
char *name;
int age;
}

struct student *s = malloc(sizeof(*s));
s->name = strdup("Reginald");
// ...
free(s);

What are the leaks in the above c program?

Question Answers

  • There are no leaks

  • s->name is definitely lost

  • s->name is indirectly lost
  • s->name is still reachable

Feedback

strdup() allocates memory for a string so the returned pointer must be freed. Freeing s will leave us unable to free s->name, so s->name is indirectly lost. Find more about valgrind leak categories here.

- + \ No newline at end of file diff --git a/104/Data/data-overview/index.html b/104/Data/data-overview/index.html index a7fc452e0f..b645616420 100644 --- a/104/Data/data-overview/index.html +++ b/104/Data/data-overview/index.html @@ -4,7 +4,7 @@ Data | Operating Systems - + @@ -16,7 +16,7 @@ The programming language analyzes the use of these variables and outputs code that uses an interface provided by the operating system. This interface offers the possibility to allocate/deallocate different variables in certain memory regions. Next, the operating system manages the execution of the program and provides the actual physical addresses that are used to interact with the data.

Moreover, the operating system governs the competing access of multiple programs to memory, ensuring that a program does not have access to a different program's memory.

Contents

  1. Working with Memory
  2. Process Memory
  3. Investigate Memory
  4. Memory Security
- + \ No newline at end of file diff --git a/104/Data/index.html b/104/Data/index.html index 02d83c56d9..1136fda634 100644 --- a/104/Data/index.html +++ b/104/Data/index.html @@ -4,13 +4,13 @@ Data | Operating Systems - +
Skip to main content
- + \ No newline at end of file diff --git a/104/Data/lab3/index.html b/104/Data/lab3/index.html index b46864b2f3..960028e08c 100644 --- a/104/Data/lab3/index.html +++ b/104/Data/lab3/index.html @@ -4,7 +4,7 @@ Lab 3 - Memory | Operating Systems - + @@ -183,7 +183,7 @@ Comment the version(none) annotation for the assignment operator and implement the logic so that the reference counted array is correct. When an object is assigned to another object, we need to first decrement the count for the object that is being assigned to, then fill the fields similarly to the copy constructor case and lastly increment the count for the assigned object. After completing the exercise, make sure that the memory is properly managed.

  • Play with your reference counted array and create different scenarios to test its limits.

  • If you're having difficulties solving this exercise, go through this reading material.

    - + \ No newline at end of file diff --git a/104/Data/lab4/index.html b/104/Data/lab4/index.html index c43a584697..e61038798e 100644 --- a/104/Data/lab4/index.html +++ b/104/Data/lab4/index.html @@ -4,7 +4,7 @@ Lab 4 - Investigate Memory | Operating Systems - + @@ -44,7 +44,7 @@ Note that the file path used for LD_PRELOAD may need to be updated, depending on your distribution:

    student@os:~/.../memory-leak/support$ LD_PRELOAD=/lib/x86_64-linux-gnu/libc_malloc_debug.so.0 MALLOC_TRACE=mem.trace ./memory_leak_malloc
    Andrei Popescu is 22 years old and likes Linux
    Ioana David is 23 years old and likes macOS

    Subsequently, we use the mtrace tool to show information about the leaked data:

    student@os:~/.../memory-leak/support$ mtrace ./memory_leak_malloc mem.trace

    Memory not freed:
    -----------------
    Address Size Caller
    0x000056506d8be6a0 0x94 at 0x56506c3777ec

    The size (0x94) is the same value shown by Valgrind (148).

    mtrace provides an outcome similar to Valgrind. Valgrind is however more powerful: it works on different types of memory (not only those allocated with malloc()) and it doesn't require access to the source code (and the compiler phase).

    Practice

    1. Print the size of the Student class and the struct student structure to see if it equates to the leak shown by Valgrind.

    2. Solve the memory leaks in both programs. Validate with Valgrind.

    - + \ No newline at end of file diff --git a/104/Data/lab5/index.html b/104/Data/lab5/index.html index f0e4e9a794..bf2a5e0358 100644 --- a/104/Data/lab5/index.html +++ b/104/Data/lab5/index.html @@ -4,7 +4,7 @@ Lab 5 - Memory Security | Operating Systems - + @@ -66,7 +66,7 @@ Use anonymous mapping (i.e. the MAP_ANONYMOUS) flag. Use the proper permissions required to enable the shellcode to be read from the file into memory and then executed.

    To test the implementation, enter the tests/ directory and run:

    make check

    As an extra item, add a shellcode for the brk() system call in the tests/brk.asm file. It should be a simple shellcode that calls brk(NULL), i.e. with the purpose of getting the current program break.

    In case of a correct solution, you will get an output such as:

    ./run_all_tests.sh
    test_helloworld ........................ passed ... 25
    test_getpid ........................ passed ... 25
    test_openfile ........................ passed ... 25
    test_brk ........................ passed ... 25

    Total: 100/100

    If you're having difficulties solving this exercise, go through this reading material.

    - + \ No newline at end of file diff --git a/104/Exams/Aggregator Application/aggregator-application/index.html b/104/Exams/Aggregator Application/aggregator-application/index.html index 304615f27a..fae494ca1a 100644 --- a/104/Exams/Aggregator Application/aggregator-application/index.html +++ b/104/Exams/Aggregator Application/aggregator-application/index.html @@ -4,7 +4,7 @@ Aggregator Application | Operating Systems - + @@ -25,7 +25,7 @@ Answer: True

  • The aggregator application's page table DOES NOT contain pages without write permission. Answer: False

  • The system can only function if the communication between the aggregator application and LLM sites is encrypted. Answer: False

  • - + \ No newline at end of file diff --git a/104/Exams/Application Investigator/application-investigator/index.html b/104/Exams/Application Investigator/application-investigator/index.html index e515069c17..11fc773f9a 100644 --- a/104/Exams/Application Investigator/application-investigator/index.html +++ b/104/Exams/Application Investigator/application-investigator/index.html @@ -4,7 +4,7 @@ Application Investigator | Operating Systems - + @@ -23,7 +23,7 @@ Answer: False

  • The resulting file from the memory dump is a binary file, not text. Answer: True

  • In principle, with certain adjustments, the application can work on both 32-bit and 64-bit systems. Answer: True

  • - + \ No newline at end of file diff --git a/104/Exams/Backup System/backup-system/index.html b/104/Exams/Backup System/backup-system/index.html index 8353b30302..3ac2879a7f 100644 --- a/104/Exams/Backup System/backup-system/index.html +++ b/104/Exams/Backup System/backup-system/index.html @@ -4,7 +4,7 @@ Backup System | Operating Systems - + @@ -14,7 +14,7 @@ We want to add a backup functionality to the program so that data from memory is periodically saved to disk. For data recovery, analysis data for the last N intervals is kept (we have N files of 4GB each, each file retains analysis data from a backup).

    All answers should be justified.

    Questions

    1. How would you implement such a backup system?

    2. How do you determine the opportune moment for performing the backup?

    3. Do you use a separate process or thread for performing the backup? Justify your answer.

    4. How do you manage the files saved to disk?

    5. How do you analyze the overhead brought by the backup functionality?

    - + \ No newline at end of file diff --git a/104/Exams/Benchmarking Application/benchmarking-application/index.html b/104/Exams/Benchmarking Application/benchmarking-application/index.html index 078b0d32ff..c7842b9996 100644 --- a/104/Exams/Benchmarking Application/benchmarking-application/index.html +++ b/104/Exams/Benchmarking Application/benchmarking-application/index.html @@ -4,7 +4,7 @@ Benchmarking Application | Operating Systems - + @@ -23,7 +23,7 @@ Answer: True

  • With the necessary modifications, the application can handle both HTTP and HTTPS connections. Answer: True

  • The benchmarking application can only measure open-source web applications + open-source web servers (with available sources). Answer: False

  • - + \ No newline at end of file diff --git a/104/Exams/Blockchain System/blockchain-system/index.html b/104/Exams/Blockchain System/blockchain-system/index.html index 2ebcbf9dce..90a5415c6c 100644 --- a/104/Exams/Blockchain System/blockchain-system/index.html +++ b/104/Exams/Blockchain System/blockchain-system/index.html @@ -4,7 +4,7 @@ Blockchain System | Operating Systems - + @@ -29,7 +29,7 @@ Answer: False

  • An SSD (fast storage) is more useful for the frontend service than for the backend. Answer: False

  • The backend service uses a lot of RAM (almost the entire system memory). Answer: True

  • - + \ No newline at end of file diff --git a/104/Exams/Cloud System/cloud-system/index.html b/104/Exams/Cloud System/cloud-system/index.html index d76fa1207d..974c49030d 100644 --- a/104/Exams/Cloud System/cloud-system/index.html +++ b/104/Exams/Cloud System/cloud-system/index.html @@ -4,7 +4,7 @@ Cloud System | Operating Systems - + @@ -14,7 +14,7 @@ Suspension can occur either in RAM or on disk.

    All answers should be justified.

    Questions

    1. Describe the criteria based on which the dispatcher will send requests to the executors and how it obtains/measures the necessary metrics.

    2. What usage scenarios are suitable for such a cloud system? In these scenarios, when does the starting/resuming and stopping/suspending of a virtual machine occur?

    3. How does an executor node decide which method to use: stopping, suspending in RAM, or suspending on disk? What criteria does it use, and how does it use them in the decision-making process?

    4. How will you calculate the billing for the system's customers?

    - + \ No newline at end of file diff --git a/104/Exams/Database Application/database-application/index.html b/104/Exams/Database Application/database-application/index.html index 7595fb9c4f..b0db763837 100644 --- a/104/Exams/Database Application/database-application/index.html +++ b/104/Exams/Database Application/database-application/index.html @@ -4,7 +4,7 @@ Database Application | Operating Systems - + @@ -24,7 +24,7 @@ Answer: True

  • Memory within the container cannot be visible from outside the container, even by a privileged account. Answer: False

  • The application exclusively spends time in user mode, not in kernel mode. Answer: False

  • - + \ No newline at end of file diff --git a/104/Exams/Digital Forensics/digital-forensics/index.html b/104/Exams/Digital Forensics/digital-forensics/index.html index 40c8bd2ea8..21b533d3e6 100644 --- a/104/Exams/Digital Forensics/digital-forensics/index.html +++ b/104/Exams/Digital Forensics/digital-forensics/index.html @@ -4,7 +4,7 @@ Digital Forensics | Operating Systems - + @@ -25,7 +25,7 @@ Answer: True

  • The application cannot realistically be used on a 64-bit system, only on a 32-bit system. Answer: False

  • As long as the operating system provides support, the application can work on both x86 and ARM processor architectures. Answer: False

  • - + \ No newline at end of file diff --git a/104/Exams/Distributed System/distributed-system/index.html b/104/Exams/Distributed System/distributed-system/index.html index 4fa4784276..cb9630a978 100644 --- a/104/Exams/Distributed System/distributed-system/index.html +++ b/104/Exams/Distributed System/distributed-system/index.html @@ -4,7 +4,7 @@ Distributed System | Operating Systems - + @@ -23,7 +23,7 @@ Answer: False

  • SSD storage is required for the frontend service. Answer: False

  • The backend service uses a lot of memory - almost the entire system memory. Answer: True

  • - + \ No newline at end of file diff --git a/104/Exams/Extending an App Manager/extending-an-app-manager/index.html b/104/Exams/Extending an App Manager/extending-an-app-manager/index.html index 597a2e9418..13dc456a03 100644 --- a/104/Exams/Extending an App Manager/extending-an-app-manager/index.html +++ b/104/Exams/Extending an App Manager/extending-an-app-manager/index.html @@ -4,7 +4,7 @@ Extending an App Manager | Operating Systems - + @@ -13,7 +13,7 @@ We want to add functionality to the application manager through which we can transfer a process managed by it from one system to another system managed by another application manager while the process is running. For simplicity, we consider that the process does not use files from the disk.

    All answers should be justified.

    Questions

    1. How do you establish the connection and transfer between managers? Describe a minimal communication protocol.

    2. What process data needs to be transferred so that the process can continue running (from where it left off) on the new system?

    3. How do you minimize the time the process is stopped?

    - + \ No newline at end of file diff --git a/104/Exams/FaaS Application/faas-application/index.html b/104/Exams/FaaS Application/faas-application/index.html index adb4c94418..ce0b7a9540 100644 --- a/104/Exams/FaaS Application/faas-application/index.html +++ b/104/Exams/FaaS Application/faas-application/index.html @@ -4,7 +4,7 @@ FaaS Application | Operating Systems - + @@ -26,7 +26,7 @@ Answer: True

  • During the execution of the service, NO hardware interrupts are generated. Answer: False

  • The service can only operate on a Linux operating system. Answer: False

  • - + \ No newline at end of file diff --git a/104/Exams/File Changes Notifier/file-changes-notifier/index.html b/104/Exams/File Changes Notifier/file-changes-notifier/index.html index 9f8606db7f..8d2408ced2 100644 --- a/104/Exams/File Changes Notifier/file-changes-notifier/index.html +++ b/104/Exams/File Changes Notifier/file-changes-notifier/index.html @@ -4,7 +4,7 @@ File Changes Notifier | Operating Systems - + @@ -12,7 +12,7 @@
    Skip to main content

    File Changes Notifier

    Scenario

    You are the administrator of a system and have multiple logging files from different applications at your disposal. You want to be notified every time new information appears in any of these files, and at the same time, you want to be able to add new monitoring targets throughout the runtime of this monitor.

    All answers should be justified.

    Question

    Can you suggest a simple method or pseudocode to solve this dilemma? (hint: file operations).

    - + \ No newline at end of file diff --git a/104/Exams/Header Analysis Application/header-analysis-application/index.html b/104/Exams/Header Analysis Application/header-analysis-application/index.html index c95da04b46..dcd0863b84 100644 --- a/104/Exams/Header Analysis Application/header-analysis-application/index.html +++ b/104/Exams/Header Analysis Application/header-analysis-application/index.html @@ -4,14 +4,14 @@ Header Analysis Application | Operating Systems - +
    Skip to main content

    Header Analysis Application

    Scenario

    We aim to implement a network packet header analysis application to detect suspicious behaviors from a network security standpoint. We assume the following steps are already implemented sequentially:

    • Packet headers are received through a socket.
    • Packet analysis is performed using functions already implemented in a shared library.
    • Data about suspicious packets (according to the analysis) are written to an application log file.

    All answers should be justified.

    Questions

    1. What specific technologies and concepts do you use to optimize the application (multithreading, multiprocessing, I/O multiplexing, asynchronous operations)?

    2. How do you ensure scalability/performance of the application in case the number of packets in the network is very high (network flooding)?

    3. How do you ensure uniform data writing to the application analysis log file?

    - + \ No newline at end of file diff --git a/104/Exams/Industrial System/industrial-system/index.html b/104/Exams/Industrial System/industrial-system/index.html index 8115d2d63a..a5fd8ebb3d 100644 --- a/104/Exams/Industrial System/industrial-system/index.html +++ b/104/Exams/Industrial System/industrial-system/index.html @@ -4,7 +4,7 @@ Industrial System | Operating Systems - + @@ -26,7 +26,7 @@ Answer: True

  • Context switching is more costly for applications in wasmer. Answer: False

  • Applications in wasmer do not use the libc file access API but still benefit from the file cache system of the operating system. Answer: True

  • - + \ No newline at end of file diff --git a/104/Exams/Intrusion Detection System/intrusion-detection-system/index.html b/104/Exams/Intrusion Detection System/intrusion-detection-system/index.html index 605fe83c44..96bb0bb566 100644 --- a/104/Exams/Intrusion Detection System/intrusion-detection-system/index.html +++ b/104/Exams/Intrusion Detection System/intrusion-detection-system/index.html @@ -4,14 +4,14 @@ Intrusion Detection System | Operating Systems - +
    Skip to main content

    Intrusion Detection System

    Scenario

    We want to build an intrusion detection system for applications serving different servers without having access to their source code. Assume that we have access to a knowledge base (in any form you prefer) describing the normal behavior of the application.

    All answers should be justified.

    Questions

    1. What profiling and debugging utilities (perf, strace, valgrind, etc.) can help us verify whether, as a result of interaction between the server and a specific client, the client was able to exploit various vulnerabilities such as buffer overflow or code injection?

    2. Could you propose a simplistic algorithm that can determine the type of client behavior (normal or malicious) based on information gathered from the utility of your choice?

    - + \ No newline at end of file diff --git a/104/Exams/Library Warmer/library-warmer/index.html b/104/Exams/Library Warmer/library-warmer/index.html index d2b4636b0d..1ffa98dbb9 100644 --- a/104/Exams/Library Warmer/library-warmer/index.html +++ b/104/Exams/Library Warmer/library-warmer/index.html @@ -4,7 +4,7 @@ Library Warmer | Operating Systems - + @@ -16,7 +16,7 @@ What is the execution flow of the application?

  • What functionalities does the operating system need to expose in order to efficiently and effectively implement the heating application?

  • What configuration interface will the application expose to the user/system administrator? What will they be able to configure?

  • How will you evaluate the use of the heating application? What will you measure to demonstrate an improvement (or not) compared to the case where you do not use the application?

  • - + \ No newline at end of file diff --git a/104/Exams/Memory Deduplication/memory-deduplication/index.html b/104/Exams/Memory Deduplication/memory-deduplication/index.html index 22157b2eab..3f9e2a42fb 100644 --- a/104/Exams/Memory Deduplication/memory-deduplication/index.html +++ b/104/Exams/Memory Deduplication/memory-deduplication/index.html @@ -4,7 +4,7 @@ Memory Deduplication | Operating Systems - + @@ -17,7 +17,7 @@ When and how will memory deduplication be performed with the support of the operating system?

  • How do we evaluate the functionality of memory deduplication? What metrics do we track? What scenarios will we use to monitor these metrics?

  • - + \ No newline at end of file diff --git a/104/Exams/Network Configurations Manager/network-configurations-manager/index.html b/104/Exams/Network Configurations Manager/network-configurations-manager/index.html index e5de01b107..25afcbb016 100644 --- a/104/Exams/Network Configurations Manager/network-configurations-manager/index.html +++ b/104/Exams/Network Configurations Manager/network-configurations-manager/index.html @@ -4,7 +4,7 @@ Network Configurations Manager | Operating Systems - + @@ -24,7 +24,7 @@ Answer: True

  • In the application's address space, there are memory areas without write permissions. Answer: True

  • The application process will consistently have the highest priority. Answer: False

  • - + \ No newline at end of file diff --git a/104/Exams/Network Performance Utility/network-performance-utility/index.html b/104/Exams/Network Performance Utility/network-performance-utility/index.html index 525fc4c095..3611895ace 100644 --- a/104/Exams/Network Performance Utility/network-performance-utility/index.html +++ b/104/Exams/Network Performance Utility/network-performance-utility/index.html @@ -4,7 +4,7 @@ Network Performance Utility | Operating Systems - + @@ -24,7 +24,7 @@ Answer: True

  • The process started by the utility will use shared memory mechanisms. Answer: False

  • The process started by the utility is a component that requires additional security/isolation compared to other processes. Answer: False

  • - + \ No newline at end of file diff --git a/104/Exams/Nightly Builds System/nightly-builds-system/index.html b/104/Exams/Nightly Builds System/nightly-builds-system/index.html index 403ac6123d..b0b83f9bc5 100644 --- a/104/Exams/Nightly Builds System/nightly-builds-system/index.html +++ b/104/Exams/Nightly Builds System/nightly-builds-system/index.html @@ -4,7 +4,7 @@ Nightly Builds System | Operating Systems - + @@ -29,7 +29,7 @@ Answer: True

  • The dispatcher component does not cause page faults. Answer: False

  • The dispatcher system can function as both a statically compiled and a dynamically compiled application. Answer: True

  • - + \ No newline at end of file diff --git a/104/Exams/Resource Monitor/resource-monitor/index.html b/104/Exams/Resource Monitor/resource-monitor/index.html index 0e48350d66..2e6f51500a 100644 --- a/104/Exams/Resource Monitor/resource-monitor/index.html +++ b/104/Exams/Resource Monitor/resource-monitor/index.html @@ -4,7 +4,7 @@ Resource Monitor | Operating Systems - + @@ -14,7 +14,7 @@ The master process is responsible for sending configurations to the agents and reporting resource (ab)use issues to the administrator or commanding actions for the agents to perform. The implementation of the agents should be as portable as possible to allow them to run on various platforms/operating systems.

    All answers should be justified.

    Questions

    1. What resources/information will agents collect to report the overall system status? How will the configuration that the master process will transmit to the agents look like, schematically?

    2. Could you describe the design and implementation idea of an agent?

    3. Could you describe the design and implementation idea of the master process?

    4. Describe schematically the communication protocol between agent and master: what information is transferred, at what intervals, on what triggers, what happens when there are network issues, or when an agent or master fails?

    - + \ No newline at end of file diff --git a/104/Exams/Supervisor-type Service/supervisor-type-service/index.html b/104/Exams/Supervisor-type Service/supervisor-type-service/index.html index 49702df4f9..18b665f009 100644 --- a/104/Exams/Supervisor-type Service/supervisor-type-service/index.html +++ b/104/Exams/Supervisor-type Service/supervisor-type-service/index.html @@ -4,7 +4,7 @@ Supervisor-type Service | Operating Systems - + @@ -25,7 +25,7 @@ Answer: False

  • The service can configure the started processes to have standard descriptors redirected to a /dev/null-like input. Answer: True

  • The service can memory-map the configuration file. Answer: True

  • - + \ No newline at end of file diff --git a/104/Exams/System Process Monitoring Tool/system-process-monitoring-tool/index.html b/104/Exams/System Process Monitoring Tool/system-process-monitoring-tool/index.html index 93ebaf1218..1acd4c3904 100644 --- a/104/Exams/System Process Monitoring Tool/system-process-monitoring-tool/index.html +++ b/104/Exams/System Process Monitoring Tool/system-process-monitoring-tool/index.html @@ -4,7 +4,7 @@ System Process Monitoring Tool | Operating Systems - + @@ -24,7 +24,7 @@ Answer: False

  • The application benefits from using the buffer cache. Answer: True

  • The application can be implemented without using synchronization primitives. Answer: True

  • - + \ No newline at end of file diff --git a/104/Exams/User-level Threading Library/user-level-threading-library/index.html b/104/Exams/User-level Threading Library/user-level-threading-library/index.html index 1b716cc169..bbc42738cc 100644 --- a/104/Exams/User-level Threading Library/user-level-threading-library/index.html +++ b/104/Exams/User-level Threading Library/user-level-threading-library/index.html @@ -4,7 +4,7 @@ User-level Threading Library | Operating Systems - + @@ -23,7 +23,7 @@ Answer: True

  • A program using the library will use only one core/processor. Answer: True

  • Programs using the library cannot use shared memory to communicate with other processes. Answer: False

  • - + \ No newline at end of file diff --git a/104/Exams/Web GUI 1/web-gui-1/index.html b/104/Exams/Web GUI 1/web-gui-1/index.html index f06151ad45..7bb62c0701 100644 --- a/104/Exams/Web GUI 1/web-gui-1/index.html +++ b/104/Exams/Web GUI 1/web-gui-1/index.html @@ -4,7 +4,7 @@ Web GUI 1 | Operating Systems - + @@ -14,7 +14,7 @@ Describe the general components and their interaction. Applications should be able to access system resources.

  • We want to add the possibility of having threads in the application. Propose an architecture for this.

  • Propose a mechanism that will allow the use of async and await primitives for functions that interact with the operating system.

  • Answer one of the two options:

  • - + \ No newline at end of file diff --git a/104/Exams/Web GUI 2/web-gui-2/index.html b/104/Exams/Web GUI 2/web-gui-2/index.html index 69a5863474..b216d638dc 100644 --- a/104/Exams/Web GUI 2/web-gui-2/index.html +++ b/104/Exams/Web GUI 2/web-gui-2/index.html @@ -4,7 +4,7 @@ Web GUI 2 | Operating Systems - + @@ -15,7 +15,7 @@ Take into account that the JavaScript engine (V8) can only execute JavaScript code on a single thread. You cannot modify the V8 engine.

  • Answer one of the following:

  • - + \ No newline at end of file diff --git a/104/Exams/index.html b/104/Exams/index.html index 5189afcf0b..74115eccb5 100644 --- a/104/Exams/index.html +++ b/104/Exams/index.html @@ -4,13 +4,13 @@ Exams | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Hackathons/Lambda Function Loader/index.html b/104/Hackathons/Lambda Function Loader/index.html index b5b18dcf2f..7b3865bf67 100644 --- a/104/Hackathons/Lambda Function Loader/index.html +++ b/104/Hackathons/Lambda Function Loader/index.html @@ -4,7 +4,7 @@ Lambda Function Loader | Operating Systems - + @@ -42,7 +42,7 @@ Implement measures to prevent data leaks.
  • Conducting performance optimizations.
  • Establishing application logging.
  • Managing configuration files/options: Configure the server during startup based on specified options/configuration files such as maximum client count, socket type preferences, etc.
  • Real-time server monitoring and statistical extraction (e.g. client count, loaded libraries, memory usage, etc.).
  • Adapting the implementation to another programming language (the initial skeleton is in C, but the communication's nature allows implementation in any language meeting project requirements).
  • Generating a suitable response in cases where the requested function exceeds a TIMEOUT or performs actions leading to server shutdown (e.g. invalid memory access, exit/abort calls). The solution's complexity may vary based on how the client's connection termination is handled (whether an error message is conveyed) and how the cause of execution termination is identified.
  • - + \ No newline at end of file diff --git a/104/Hackathons/index.html b/104/Hackathons/index.html index 83f344f80c..21cf917efd 100644 --- a/104/Hackathons/index.html +++ b/104/Hackathons/index.html @@ -4,13 +4,13 @@ Hackathons | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Lecture/Application-Interaction/index.html b/104/Lecture/Application-Interaction/index.html index 1c568b2316..c40293faf6 100644 --- a/104/Lecture/Application-Interaction/index.html +++ b/104/Lecture/Application-Interaction/index.html @@ -4,13 +4,13 @@ Application-Interaction | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Lecture/Compute/index.html b/104/Lecture/Compute/index.html index 8652b167b1..fa661a5bc6 100644 --- a/104/Lecture/Compute/index.html +++ b/104/Lecture/Compute/index.html @@ -4,13 +4,13 @@ Compute | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Lecture/IO/index.html b/104/Lecture/IO/index.html index eeedf69412..70d00736fe 100644 --- a/104/Lecture/IO/index.html +++ b/104/Lecture/IO/index.html @@ -4,13 +4,13 @@ IO | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Lecture/index.html b/104/Lecture/index.html index 15a9487972..21425d3e89 100644 --- a/104/Lecture/index.html +++ b/104/Lecture/index.html @@ -4,13 +4,13 @@ Lecture | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Software Stack/Questions/dynamic-libraries/index.html b/104/Software Stack/Questions/dynamic-libraries/index.html index e1dd1c4b20..884c4331bb 100644 --- a/104/Software Stack/Questions/dynamic-libraries/index.html +++ b/104/Software Stack/Questions/dynamic-libraries/index.html @@ -4,13 +4,13 @@ Dynamic Libraries | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Software Stack/Questions/index.html b/104/Software Stack/Questions/index.html index 4fb335eb8f..3e7dd0a429 100644 --- a/104/Software Stack/Questions/index.html +++ b/104/Software Stack/Questions/index.html @@ -4,13 +4,13 @@ Questions | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Software Stack/Questions/libc/index.html b/104/Software Stack/Questions/libc/index.html index 106ea80c3d..e5b20f6a4d 100644 --- a/104/Software Stack/Questions/libc/index.html +++ b/104/Software Stack/Questions/libc/index.html @@ -4,13 +4,13 @@ Syscall Tool | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Software Stack/Questions/libcall-syscall/index.html b/104/Software Stack/Questions/libcall-syscall/index.html index 076b307f66..ac98ff7445 100644 --- a/104/Software Stack/Questions/libcall-syscall/index.html +++ b/104/Software Stack/Questions/libcall-syscall/index.html @@ -4,14 +4,14 @@ Libcall with Syscall | Operating Systems - +
    Skip to main content

    Libcall with Syscall

    Question Text

    Which of the following library calls will for sure invoke a system call?

    Question Answers

    • fopen()
    • fwrite()

    • printf()

    • strcpy()

    Feedback

    fopen() requires opening a file and access to the operating system (for filesystem access). The others may not require a system call (strcpy()) or may use buffering to delay the invocation of a system call (fwrite(), printf()).

    - + \ No newline at end of file diff --git a/104/Software Stack/Questions/malloc/index.html b/104/Software Stack/Questions/malloc/index.html index 08c4cb87a7..292ec84da4 100644 --- a/104/Software Stack/Questions/malloc/index.html +++ b/104/Software Stack/Questions/malloc/index.html @@ -4,13 +4,13 @@ malloc() | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Software Stack/Questions/printf-syscall/index.html b/104/Software Stack/Questions/printf-syscall/index.html index 545ffc8bda..fc476f98dc 100644 --- a/104/Software Stack/Questions/printf-syscall/index.html +++ b/104/Software Stack/Questions/printf-syscall/index.html @@ -4,13 +4,13 @@ printf() System Call | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Software Stack/Questions/printf-vs-write/index.html b/104/Software Stack/Questions/printf-vs-write/index.html index bb7b3c025b..372e7bb032 100644 --- a/104/Software Stack/Questions/printf-vs-write/index.html +++ b/104/Software Stack/Questions/printf-vs-write/index.html @@ -4,14 +4,14 @@ printf() vs write | Operating Systems - +
    Skip to main content

    printf() vs write

    Question Text

    What are features provided by printf() when compared to write? (choose 2 answers)

    Question Answers

    • buffering
    • outputs to standard output

    • may write to file

    • does output formatting
    • can work with binary data

    Feedback

    printf() can do buffering to reduce the number of system calls. Also, printf(), as it name suggests (the f suffix), does output formatting.

    - + \ No newline at end of file diff --git a/104/Software Stack/Questions/python-tools/index.html b/104/Software Stack/Questions/python-tools/index.html index bbfebdf89a..7cabd6747b 100644 --- a/104/Software Stack/Questions/python-tools/index.html +++ b/104/Software Stack/Questions/python-tools/index.html @@ -4,14 +4,14 @@ Python Tools | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Software Stack/Questions/software/index.html b/104/Software Stack/Questions/software/index.html index aa63e84d7f..3737e77ac5 100644 --- a/104/Software Stack/Questions/software/index.html +++ b/104/Software Stack/Questions/software/index.html @@ -4,7 +4,7 @@ Software Properties | Operating Systems - + @@ -12,7 +12,7 @@
    Skip to main content

    Software Properties

    Question Text

    Which of the following is *not- an advantage of software when compared to hardware?

    Question Answers

    • reusability
    • performance
    • portability

    • flexibility

    Feedback

    Software is reusable and flexible, unlike physical hardware that's rigid and used-once. Software is also portable across different hardware (and software platforms). However, software relies on hardware for running, so software will never beat hardware in terms of sheer speed / performance.

    - + \ No newline at end of file diff --git a/104/Software Stack/Questions/static-executables/index.html b/104/Software Stack/Questions/static-executables/index.html index 0f7321d708..ea2a7e829c 100644 --- a/104/Software Stack/Questions/static-executables/index.html +++ b/104/Software Stack/Questions/static-executables/index.html @@ -4,14 +4,14 @@ Static Executables | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Software Stack/Questions/strcpy-syscall/index.html b/104/Software Stack/Questions/strcpy-syscall/index.html index 8a97856f83..0c84c1d242 100644 --- a/104/Software Stack/Questions/strcpy-syscall/index.html +++ b/104/Software Stack/Questions/strcpy-syscall/index.html @@ -4,13 +4,13 @@ strcpy() System Call | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Software Stack/Questions/syscall-id/index.html b/104/Software Stack/Questions/syscall-id/index.html index ce95e0671b..ca682009e9 100644 --- a/104/Software Stack/Questions/syscall-id/index.html +++ b/104/Software Stack/Questions/syscall-id/index.html @@ -4,13 +4,13 @@ Syscall ID | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Software Stack/Questions/syscall-numbers/index.html b/104/Software Stack/Questions/syscall-numbers/index.html index 2e978aee7b..1338db4525 100644 --- a/104/Software Stack/Questions/syscall-numbers/index.html +++ b/104/Software Stack/Questions/syscall-numbers/index.html @@ -4,13 +4,13 @@ Syscall Numbers | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Software Stack/Questions/syscall-tool/index.html b/104/Software Stack/Questions/syscall-tool/index.html index ecb64f9730..22ae7a38dd 100644 --- a/104/Software Stack/Questions/syscall-tool/index.html +++ b/104/Software Stack/Questions/syscall-tool/index.html @@ -4,13 +4,13 @@ Syscall Tool | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Software Stack/Questions/syscall-wrapper/index.html b/104/Software Stack/Questions/syscall-wrapper/index.html index 967ce3df09..3b1720052f 100644 --- a/104/Software Stack/Questions/syscall-wrapper/index.html +++ b/104/Software Stack/Questions/syscall-wrapper/index.html @@ -4,13 +4,13 @@ Syscall Wrappers | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Software Stack/Software-Stack/index.html b/104/Software Stack/Software-Stack/index.html index 9deb47099a..5204e3f3f5 100644 --- a/104/Software Stack/Software-Stack/index.html +++ b/104/Software Stack/Software-Stack/index.html @@ -4,13 +4,13 @@ Software-Stack | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Software Stack/index.html b/104/Software Stack/index.html index 299bca19cc..f2af4a3f50 100644 --- a/104/Software Stack/index.html +++ b/104/Software Stack/index.html @@ -4,13 +4,13 @@ Software Stack | Operating Systems - +
    Skip to main content
    - + \ No newline at end of file diff --git a/104/Software Stack/lab1/index.html b/104/Software Stack/lab1/index.html index fedb9b3bda..5d50dee33c 100644 --- a/104/Software Stack/lab1/index.html +++ b/104/Software Stack/lab1/index.html @@ -4,7 +4,7 @@ Lab 1 - Operating System Perspective | Operating Systems - + @@ -70,7 +70,7 @@ the return value is 4 (the number of digits of the "1234" string).

    Then make the call to getpid; it gets no arguments and returns an integer (the PID - *process ID- of the current process).

    If you're having difficulties solving this exercise, go through this reading material.

    Library Calls vs System Calls

    Enter the chapters/software-stack/system-calls/drills/tasks/libcall-syscall/support/ folder and go through the practice items below.

    1. Check library calls and system calls for the call2.c file. Use ltrace and strace.

      Find explanations for the calls being made and the library call to system call mapping.

      Quiz

    If you're having difficulties solving this exercise, go through this reading material.

    - + \ No newline at end of file diff --git a/104/Software Stack/lab2/index.html b/104/Software Stack/lab2/index.html index 9e1343e21c..8d5e1c3a17 100644 --- a/104/Software Stack/lab2/index.html +++ b/104/Software Stack/lab2/index.html @@ -4,7 +4,7 @@ Lab 2 - Library Perspective | Operating Systems - + @@ -97,7 +97,7 @@ The file command tells if the file passed as argument is a statically-linked executable. If you can't find one, install the busybox-static package.

  • Look into what busybox is and explain why it's custom to have it as statically-linked executable.

  • Run ldd, nm, strace, ltrace on a statically-linked application executable. Explain the results.

  • If you're having difficulties solving this exercise, go through this reading material.

    - + \ No newline at end of file diff --git a/104/Software Stack/software-stack-overview/index.html b/104/Software Stack/software-stack-overview/index.html index d825c23fbe..0985bd047f 100644 --- a/104/Software Stack/software-stack-overview/index.html +++ b/104/Software Stack/software-stack-overview/index.html @@ -4,7 +4,7 @@ Software Stack | Operating Systems - + @@ -24,7 +24,7 @@ These generic interfaces "hides" possible differences in the even lower layers. This way, a software stack ensures portability across different other parts of software (and hardware as well). For example, the standard C library, that we will present shortly, ensures portability across different operating systems.

    Software Stack

    Quiz

    Contents

    - + \ No newline at end of file diff --git a/104/assets/js/c9516280.4f32e625.js b/104/assets/js/c9516280.4f32e625.js new file mode 100644 index 0000000000..2bf2102ec4 --- /dev/null +++ b/104/assets/js/c9516280.4f32e625.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkso=self.webpackChunkso||[]).push([[313],{5680:(e,t,n)=>{n.d(t,{xA:()=>g,yg:()=>m});var a=n(6540);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),p=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},g=function(e){var t=p(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},y=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,s=e.originalType,l=e.parentName,g=i(e,["components","mdxType","originalType","parentName"]),u=p(n),y=r,m=u["".concat(l,".").concat(y)]||u[y]||c[y]||s;return n?a.createElement(m,o(o({ref:t},g),{},{components:n})):a.createElement(m,o({ref:t},g))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=n.length,o=new Array(s);o[0]=y;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[u]="string"==typeof e?e:r,o[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>c,frontMatter:()=>s,metadata:()=>i,toc:()=>p});var a=n(8168),r=(n(6540),n(5680));const s={},o="Setting up the Lab Environment",i={unversionedId:"lab-setup",id:"lab-setup",title:"Setting up the Lab Environment",description:"Prerequisites",source:"@site/docs/lab-setup.md",sourceDirName:".",slug:"/lab-setup",permalink:"/operating-systems/104/lab-setup",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"sidebar",previous:{title:"Operating Systems",permalink:"/operating-systems/104/"},next:{title:"Software Stack",permalink:"/operating-systems/104/Software Stack/"}},l={},p=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Cloning the repository",id:"cloning-the-repository",level:2},{value:"Getting the latest changes",id:"getting-the-latest-changes",level:2},{value:"Save Progress and Prepare next lab",id:"save-progress-and-prepare-next-lab",level:2}],g={toc:p},u="wrapper";function c(e){let{components:t,...n}=e;return(0,r.yg)(u,(0,a.A)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,r.yg)("h1",{id:"setting-up-the-lab-environment"},"Setting up the Lab Environment"),(0,r.yg)("h2",{id:"prerequisites"},"Prerequisites"),(0,r.yg)("p",null,"You can work on any Linux setup (native install, ",(0,r.yg)("inlineCode",{parentName:"p"},"WSL"),", ",(0,r.yg)("inlineCode",{parentName:"p"},"VM"),"), but we strongly recommend you use the ",(0,r.yg)("a",{parentName:"p",href:"https://cs-pub-ro.github.io/operating-systems/resources#virtual-machine"},(0,r.yg)("inlineCode",{parentName:"a"},"operating-systems")," class VMs"),"."),(0,r.yg)("h2",{id:"cloning-the-repository"},"Cloning the repository"),(0,r.yg)("p",null,"If you haven't already cloned the repository, do so and you are ready to go:"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-bash"},"student@os:~$ git clone https://github.com/cs-pub-ro/operating-systems.git\nstudent@os:~$ cd operating-systems\n")),(0,r.yg)("h2",{id:"getting-the-latest-changes"},"Getting the latest changes"),(0,r.yg)("p",null,"Each time you start a new laboratory, you should ensure you have the latest changes.\nIf you have no local changes, you can simply run ",(0,r.yg)("inlineCode",{parentName:"p"},"git pull")," and you are ready to go:"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-bash"},'student@os:~$ cd operating-systems\nstudent@os:~/operating-systems$ git status # Check if you have unstaged changes\nOn branch \nnothing to commit, working tree clean\n\n# "working tree clean" means that you have no changes\nstudent@os:~/operating-systems$ git pull --rebase\n')),(0,r.yg)("p",null,"If ",(0,r.yg)("inlineCode",{parentName:"p"},"git status")," output differs, follow the ",(0,r.yg)("a",{parentName:"p",href:"#save-progress-and-prepare-next-lab"},"instructions to save your progress"),"."),(0,r.yg)("h2",{id:"save-progress-and-prepare-next-lab"},"Save Progress and Prepare next lab"),(0,r.yg)("ol",null,(0,r.yg)("li",{parentName:"ol"},(0,r.yg)("p",{parentName:"li"},"Check if you have unstaged changes that might be lost:"),(0,r.yg)("pre",{parentName:"li"},(0,r.yg)("code",{parentName:"pre",className:"language-bash"},'student@os:~$ cd operating-systems\nstudent@os:~/operating-systems$ git status\nOn branch \nChanges not staged for commit:\n(use "git add ..." to update what will be committed)\n(use "git restore ..." to discard changes in working directory)\n modified: main.c\n')),(0,r.yg)("p",{parentName:"li"},"If ",(0,r.yg)("inlineCode",{parentName:"p"},"git status"),' states "work tree clean", you should follow the ',(0,r.yg)("a",{parentName:"p",href:"#getting-the-latest-changes"},"instructions to pull latest changes")," instead.")),(0,r.yg)("li",{parentName:"ol"},(0,r.yg)("p",{parentName:"li"},"Create a commit to store your changes:"),(0,r.yg)("pre",{parentName:"li"},(0,r.yg)("code",{parentName:"pre",className:"language-bash"},'student@os:~/operating-systems$ git add -f . # Use -f as `support/` directories are ignored\nstudent@os:~/operating-systems$ git commit -m "Store progress for lab X"\nstudent@os:~/operating-systems$ git status # double check that everything is staged\nOn branch \nnothing to commit, working tree clean\n'))),(0,r.yg)("li",{parentName:"ol"},(0,r.yg)("p",{parentName:"li"},"Create a new branch for lab Y:"),(0,r.yg)("pre",{parentName:"li"},(0,r.yg)("code",{parentName:"pre",className:"language-bash"},"student@os:~/operating-systems$ git checkout -b lab-Y # Replace Y with lab number\nstudent@os:~/operating-systems$ git pull origin main # Get latest changes from origin/main\n"))),(0,r.yg)("li",{parentName:"ol"},(0,r.yg)("p",{parentName:"li"},"(Optional) Finding previous labs"),(0,r.yg)("p",{parentName:"li"},"Assuming you followed the instructions in this section, you can find your previous work on other branches:"),(0,r.yg)("pre",{parentName:"li"},(0,r.yg)("code",{parentName:"pre",className:"language-bash"},"student@os:~/operating-systems$ git branch\nmain\nlab-1\nlab-2\n* lab-3\nstudent@os:~/operating-systems$ git checkout lab-2\nSwitched to branch 'lab-2'\n")))))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/104/assets/js/c9516280.ac0867a4.js b/104/assets/js/c9516280.ac0867a4.js deleted file mode 100644 index 916b6beb5d..0000000000 --- a/104/assets/js/c9516280.ac0867a4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkso=self.webpackChunkso||[]).push([[313],{5680:(e,t,n)=>{n.d(t,{xA:()=>g,yg:()=>m});var r=n(6540);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),p=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},g=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},y=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,g=i(e,["components","mdxType","originalType","parentName"]),u=p(n),y=a,m=u["".concat(l,".").concat(y)]||u[y]||c[y]||o;return n?r.createElement(m,s(s({ref:t},g),{},{components:n})):r.createElement(m,s({ref:t},g))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,s=new Array(o);s[0]=y;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[u]="string"==typeof e?e:a,s[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>c,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var r=n(8168),a=(n(6540),n(5680));const o={},s="Setting up the Lab Environment",i={unversionedId:"lab-setup",id:"lab-setup",title:"Setting up the Lab Environment",description:"Prerequisites",source:"@site/docs/lab-setup.md",sourceDirName:".",slug:"/lab-setup",permalink:"/operating-systems/104/lab-setup",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"sidebar",previous:{title:"Operating Systems",permalink:"/operating-systems/104/"},next:{title:"Software Stack",permalink:"/operating-systems/104/Software Stack/"}},l={},p=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Cloning the repository",id:"cloning-the-repository",level:2},{value:"Getting the latest changes",id:"getting-the-latest-changes",level:2},{value:"Save Progress and Prepare next lab",id:"save-progress-and-prepare-next-lab",level:2}],g={toc:p},u="wrapper";function c(e){let{components:t,...n}=e;return(0,a.yg)(u,(0,r.A)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,a.yg)("h1",{id:"setting-up-the-lab-environment"},"Setting up the Lab Environment"),(0,a.yg)("h2",{id:"prerequisites"},"Prerequisites"),(0,a.yg)("p",null,"You can work on any Linux setup (native install, ",(0,a.yg)("inlineCode",{parentName:"p"},"WSL"),", ",(0,a.yg)("inlineCode",{parentName:"p"},"VM"),"), but we strongly recommend you use the ",(0,a.yg)("a",{parentName:"p",href:"https://cs-pub-ro.github.io/operating-systems/resources#virtual-machine"},(0,a.yg)("inlineCode",{parentName:"a"},"operating-systems")," class VMs"),"."),(0,a.yg)("h2",{id:"cloning-the-repository"},"Cloning the repository"),(0,a.yg)("p",null,"If you haven't already cloned the repository, do so and you are ready to go:"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-console"},"student@os:~$ git clone https://github.com/cs-pub-ro/operating-systems.git\nstudent@os:~$ cd operating-systems\n")),(0,a.yg)("h2",{id:"getting-the-latest-changes"},"Getting the latest changes"),(0,a.yg)("p",null,"Each time you start a new laboratory, you should ensure you have the latest changes.\nIf you have no local changes, you can simply run ",(0,a.yg)("inlineCode",{parentName:"p"},"git pull")," and you are ready to go:"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-console"},'student@os:~$ cd operating-systems\nstudent@os:~/operating-systems$ git status # Check if you have unstaged changes\nOn branch \nnothing to commit, working tree clean\n\n# "working tree clean" means that you have no changes\nstudent@os:~/operating-systems$ git pull --rebase\n')),(0,a.yg)("p",null,"If ",(0,a.yg)("inlineCode",{parentName:"p"},"git status")," output differs, follow the ",(0,a.yg)("a",{parentName:"p",href:"#save-progress-and-prepare-next-lab"},"instructions to save your progress"),"."),(0,a.yg)("h2",{id:"save-progress-and-prepare-next-lab"},"Save Progress and Prepare next lab"),(0,a.yg)("ol",null,(0,a.yg)("li",{parentName:"ol"},(0,a.yg)("p",{parentName:"li"},"Check if you have unstaged changes that might be lost:"),(0,a.yg)("pre",{parentName:"li"},(0,a.yg)("code",{parentName:"pre",className:"language-console"},'student@os:~$ cd operating-systems\nstudent@os:~/operating-systems$ git status\nOn branch \nChanges not staged for commit:\n(use "git add ..." to update what will be committed)\n(use "git restore ..." to discard changes in working directory)\n modified: misc/lab-setup.md\n')),(0,a.yg)("p",{parentName:"li"},"If ",(0,a.yg)("inlineCode",{parentName:"p"},"git status"),' states "work tree clean", you should follow the ',(0,a.yg)("a",{parentName:"p",href:"#getting-the-latest-changes"},"instructions to pull latest changes")," instead.")),(0,a.yg)("li",{parentName:"ol"},(0,a.yg)("p",{parentName:"li"},"Create a commit to store your changes:"),(0,a.yg)("pre",{parentName:"li"},(0,a.yg)("code",{parentName:"pre",className:"language-console"},'student@os:~/operating-systems$ git add .\nstudent@os:~/operating-systems$ git commit -m "Store progress for lab X"\nstudent@os:~/operating-systems$ git status # double check that everything is staged\nOn branch \nnothing to commit, working tree clean\n'))),(0,a.yg)("li",{parentName:"ol"},(0,a.yg)("p",{parentName:"li"},"Create a new branch for lab Y:"),(0,a.yg)("pre",{parentName:"li"},(0,a.yg)("code",{parentName:"pre",className:"language-console"},"student@os:~/operating-systems$ git checkout -b lab-Y # Replace Y with lab number\nstudent@os:~/operating-systems$ git pull origin main # Get latest changes from origin/main\n"))),(0,a.yg)("li",{parentName:"ol"},(0,a.yg)("p",{parentName:"li"},"(Optional) Finding previous labs"),(0,a.yg)("p",{parentName:"li"},"Assuming you followed the instructions in this section, you can find your previous work on other branches:"),(0,a.yg)("pre",{parentName:"li"},(0,a.yg)("code",{parentName:"pre",className:"language-console"},"student@os:~/operating-systems$ git branch\nmain\nlab-1\nlab-2\n* lab-3\nstudent@os:~/operating-systems$ git checkout lab-2\nSwitched to branch 'lab-2'\n")))))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/104/assets/js/runtime~main.e0698ca5.js b/104/assets/js/runtime~main.485b467a.js similarity index 99% rename from 104/assets/js/runtime~main.e0698ca5.js rename to 104/assets/js/runtime~main.485b467a.js index 3c7c2061d7..c6b682b58c 100644 --- a/104/assets/js/runtime~main.e0698ca5.js +++ b/104/assets/js/runtime~main.485b467a.js @@ -1 +1 @@ -(()=>{"use strict";var e,c,a,d,b={},f={};function t(e){var c=f[e];if(void 0!==c)return c.exports;var a=f[e]={id:e,loaded:!1,exports:{}};return b[e].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}t.m=b,t.c=f,e=[],t.O=(c,a,d,b)=>{if(!a){var f=1/0;for(i=0;i=b)&&Object.keys(t.O).every((e=>t.O[e](a[o])))?a.splice(o--,1):(r=!1,b0&&e[i-1][2]>b;i--)e[i]=e[i-1];e[i]=[a,d,b]},t.n=e=>{var c=e&&e.__esModule?()=>e.default:()=>e;return t.d(c,{a:c}),c},a=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,t.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var b=Object.create(null);t.r(b);var f={};c=c||[null,a({}),a([]),a(a)];for(var r=2&d&&e;"object"==typeof r&&!~c.indexOf(r);r=a(r))Object.getOwnPropertyNames(r).forEach((c=>f[c]=()=>e[c]));return f.default=()=>e,t.d(b,f),b},t.d=(e,c)=>{for(var a in c)t.o(c,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:c[a]})},t.f={},t.e=e=>Promise.all(Object.keys(t.f).reduce(((c,a)=>(t.f[a](e,c),c)),[])),t.u=e=>"assets/js/"+({114:"3ab8ba97",133:"bd661649",295:"fdd932e3",296:"f3b326a0",313:"c9516280",431:"de8c6cf5",446:"2c5e963b",517:"5ebe6805",645:"a057a266",728:"a210c167",782:"aee7a050",789:"8815920a",805:"b4c6c600",881:"76594300",895:"29ea19b5",941:"ef7ad362",1118:"ed8bb14c",1269:"6b326dfe",1280:"bdd18817",1392:"4c341edc",1400:"9ca8cdc0",1535:"77ccc4bc",1643:"63c434c4",1714:"cd9eb992",1992:"efb9ee94",2213:"463aadd7",2278:"23374ca6",2334:"b5c587af",2429:"b407248a",2574:"17017c95",2741:"0afd4953",2979:"59fcd8c2",3237:"ae952c5d",3383:"c4b5fe4e",3508:"918b3e21",3706:"747ded37",3748:"2bf71d30",3882:"caff8214",3885:"9dbf5e3b",3986:"58e12640",4126:"e3a89e97",4134:"393be207",4324:"7acd3bcd",4363:"579f6061",4422:"c3389805",4436:"51ad08a9",4571:"4032a112",4639:"18519af9",4711:"d6fc9938",4789:"8ec866b0",4921:"467560df",5023:"05a859b2",5093:"c8c74c20",5150:"18331331",5745:"3f2616b2",5794:"84cf1180",6001:"0b9ed770",6061:"1f391b9e",6106:"42cb4b20",6142:"a3f724e5",6198:"4dd793a9",6454:"8e632797",6826:"8b145087",6965:"96164f48",6969:"14eb3368",6984:"b583f8da",7002:"06ae2feb",7087:"e6234b82",7205:"1277da97",7280:"4837c448",7479:"94b33d50",7525:"24305ed3",7560:"10bd5768",7657:"fedaf6f6",7796:"54a1d96a",8381:"4e0d9b1a",8401:"17896441",8532:"6d364990",8562:"c137d568",8581:"935f2afb",8589:"92cccb59",8714:"1be78505",8864:"d92a3c43",8897:"7c61c187",9026:"c34e76e6",9086:"eda63c6c",9088:"6c180aec",9437:"e36fd90c",9445:"13be4e0d",9462:"31b22d21",9560:"277d5ed9",9659:"258674bb",9704:"91ac0728",9788:"c746c086",9790:"b6e4f51b",9795:"3e478533",9957:"695aeeb3"}[e]||e)+"."+{114:"a5b7ee7f",133:"81af0ea6",295:"36e79e7a",296:"f7b522bf",313:"ac0867a4",431:"575a9c28",446:"58edb2db",517:"344198a8",645:"9aa2d5e4",728:"17c2d551",782:"2a221dff",789:"4637b1a0",805:"ba8301c0",881:"52239d7a",895:"ac8a4cd1",941:"3d087698",1118:"1403492e",1269:"db3315b4",1280:"12875c00",1392:"992e3611",1400:"898f74cf",1535:"53ac24fc",1643:"343aa2f8",1714:"676aa211",1774:"ffe8feb8",1992:"d02af0cc",2213:"6b86e304",2278:"fd75805e",2334:"a759e66f",2429:"afbed4cb",2574:"406043c2",2741:"bd99dbc3",2979:"ba8b034f",3237:"c4ea3c94",3383:"bdb07c3c",3508:"b9d16ec1",3706:"f473a7ac",3748:"9c741aeb",3882:"00771c52",3885:"3126b3c1",3986:"10cada0c",4126:"7803d3c9",4134:"7f34b3c4",4324:"6cd9d7f3",4363:"9ddfbf2e",4422:"d056eabf",4436:"2bcd7f6a",4567:"ec7a4b29",4571:"ccfbf6bf",4639:"702b1087",4711:"9c8847ff",4789:"a75dfe10",4921:"7688c603",5023:"38955902",5093:"d81e7d2a",5150:"7e3e320c",5745:"3447d453",5794:"326408bb",6001:"b841d4ba",6061:"1d436071",6106:"0d11879a",6142:"16db3bf0",6198:"5ab30e3b",6454:"d62edfac",6826:"8ef95da6",6965:"18f07c4a",6969:"050c38c9",6984:"5ca3ac72",7002:"4028b2a6",7087:"4c285f41",7205:"c75e8c5d",7280:"e0d81bc3",7479:"20ff3cb9",7525:"caf64e7d",7560:"c7159cd2",7657:"e990f94e",7796:"7004d604",8381:"db89510b",8401:"3d4a71db",8532:"5562d781",8562:"2a832f4a",8581:"42d8a123",8589:"da875c73",8714:"fe706c1c",8864:"7d761259",8897:"0eed92e2",9026:"cce0d5ae",9086:"a811f1bb",9088:"725342e2",9437:"fae715df",9445:"fab88bb5",9462:"cc3a34b4",9560:"f358ef90",9659:"4ef0a05e",9704:"57eed96e",9788:"b534be5b",9790:"db5a090a",9795:"c017f142",9957:"eedbdec4"}[e]+".js",t.miniCssF=e=>{},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.o=(e,c)=>Object.prototype.hasOwnProperty.call(e,c),d={},t.l=(e,c,a,b)=>{if(d[e])d[e].push(c);else{var f,r;if(void 0!==a)for(var o=document.getElementsByTagName("script"),n=0;n{f.onerror=f.onload=null,clearTimeout(l);var b=d[e];if(delete d[e],f.parentNode&&f.parentNode.removeChild(f),b&&b.forEach((e=>e(a))),c)return c(a)},l=setTimeout(u.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=u.bind(null,f.onerror),f.onload=u.bind(null,f.onload),r&&document.head.appendChild(f)}},t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.p="/operating-systems/104/",t.gca=function(e){return e={17896441:"8401",18331331:"5150",76594300:"881","3ab8ba97":"114",bd661649:"133",fdd932e3:"295",f3b326a0:"296",c9516280:"313",de8c6cf5:"431","2c5e963b":"446","5ebe6805":"517",a057a266:"645",a210c167:"728",aee7a050:"782","8815920a":"789",b4c6c600:"805","29ea19b5":"895",ef7ad362:"941",ed8bb14c:"1118","6b326dfe":"1269",bdd18817:"1280","4c341edc":"1392","9ca8cdc0":"1400","77ccc4bc":"1535","63c434c4":"1643",cd9eb992:"1714",efb9ee94:"1992","463aadd7":"2213","23374ca6":"2278",b5c587af:"2334",b407248a:"2429","17017c95":"2574","0afd4953":"2741","59fcd8c2":"2979",ae952c5d:"3237",c4b5fe4e:"3383","918b3e21":"3508","747ded37":"3706","2bf71d30":"3748",caff8214:"3882","9dbf5e3b":"3885","58e12640":"3986",e3a89e97:"4126","393be207":"4134","7acd3bcd":"4324","579f6061":"4363",c3389805:"4422","51ad08a9":"4436","4032a112":"4571","18519af9":"4639",d6fc9938:"4711","8ec866b0":"4789","467560df":"4921","05a859b2":"5023",c8c74c20:"5093","3f2616b2":"5745","84cf1180":"5794","0b9ed770":"6001","1f391b9e":"6061","42cb4b20":"6106",a3f724e5:"6142","4dd793a9":"6198","8e632797":"6454","8b145087":"6826","96164f48":"6965","14eb3368":"6969",b583f8da:"6984","06ae2feb":"7002",e6234b82:"7087","1277da97":"7205","4837c448":"7280","94b33d50":"7479","24305ed3":"7525","10bd5768":"7560",fedaf6f6:"7657","54a1d96a":"7796","4e0d9b1a":"8381","6d364990":"8532",c137d568:"8562","935f2afb":"8581","92cccb59":"8589","1be78505":"8714",d92a3c43:"8864","7c61c187":"8897",c34e76e6:"9026",eda63c6c:"9086","6c180aec":"9088",e36fd90c:"9437","13be4e0d":"9445","31b22d21":"9462","277d5ed9":"9560","258674bb":"9659","91ac0728":"9704",c746c086:"9788",b6e4f51b:"9790","3e478533":"9795","695aeeb3":"9957"}[e]||e,t.p+t.u(e)},(()=>{var e={5354:0,1869:0};t.f.j=(c,a)=>{var d=t.o(e,c)?e[c]:void 0;if(0!==d)if(d)a.push(d[2]);else if(/^(1869|5354)$/.test(c))e[c]=0;else{var b=new Promise(((a,b)=>d=e[c]=[a,b]));a.push(d[2]=b);var f=t.p+t.u(c),r=new Error;t.l(f,(a=>{if(t.o(e,c)&&(0!==(d=e[c])&&(e[c]=void 0),d)){var b=a&&("load"===a.type?"missing":a.type),f=a&&a.target&&a.target.src;r.message="Loading chunk "+c+" failed.\n("+b+": "+f+")",r.name="ChunkLoadError",r.type=b,r.request=f,d[1](r)}}),"chunk-"+c,c)}},t.O.j=c=>0===e[c];var c=(c,a)=>{var d,b,f=a[0],r=a[1],o=a[2],n=0;if(f.some((c=>0!==e[c]))){for(d in r)t.o(r,d)&&(t.m[d]=r[d]);if(o)var i=o(t)}for(c&&c(a);n{"use strict";var e,c,a,d,b={},f={};function t(e){var c=f[e];if(void 0!==c)return c.exports;var a=f[e]={id:e,loaded:!1,exports:{}};return b[e].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}t.m=b,t.c=f,e=[],t.O=(c,a,d,b)=>{if(!a){var f=1/0;for(i=0;i=b)&&Object.keys(t.O).every((e=>t.O[e](a[o])))?a.splice(o--,1):(r=!1,b0&&e[i-1][2]>b;i--)e[i]=e[i-1];e[i]=[a,d,b]},t.n=e=>{var c=e&&e.__esModule?()=>e.default:()=>e;return t.d(c,{a:c}),c},a=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,t.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var b=Object.create(null);t.r(b);var f={};c=c||[null,a({}),a([]),a(a)];for(var r=2&d&&e;"object"==typeof r&&!~c.indexOf(r);r=a(r))Object.getOwnPropertyNames(r).forEach((c=>f[c]=()=>e[c]));return f.default=()=>e,t.d(b,f),b},t.d=(e,c)=>{for(var a in c)t.o(c,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:c[a]})},t.f={},t.e=e=>Promise.all(Object.keys(t.f).reduce(((c,a)=>(t.f[a](e,c),c)),[])),t.u=e=>"assets/js/"+({114:"3ab8ba97",133:"bd661649",295:"fdd932e3",296:"f3b326a0",313:"c9516280",431:"de8c6cf5",446:"2c5e963b",517:"5ebe6805",645:"a057a266",728:"a210c167",782:"aee7a050",789:"8815920a",805:"b4c6c600",881:"76594300",895:"29ea19b5",941:"ef7ad362",1118:"ed8bb14c",1269:"6b326dfe",1280:"bdd18817",1392:"4c341edc",1400:"9ca8cdc0",1535:"77ccc4bc",1643:"63c434c4",1714:"cd9eb992",1992:"efb9ee94",2213:"463aadd7",2278:"23374ca6",2334:"b5c587af",2429:"b407248a",2574:"17017c95",2741:"0afd4953",2979:"59fcd8c2",3237:"ae952c5d",3383:"c4b5fe4e",3508:"918b3e21",3706:"747ded37",3748:"2bf71d30",3882:"caff8214",3885:"9dbf5e3b",3986:"58e12640",4126:"e3a89e97",4134:"393be207",4324:"7acd3bcd",4363:"579f6061",4422:"c3389805",4436:"51ad08a9",4571:"4032a112",4639:"18519af9",4711:"d6fc9938",4789:"8ec866b0",4921:"467560df",5023:"05a859b2",5093:"c8c74c20",5150:"18331331",5745:"3f2616b2",5794:"84cf1180",6001:"0b9ed770",6061:"1f391b9e",6106:"42cb4b20",6142:"a3f724e5",6198:"4dd793a9",6454:"8e632797",6826:"8b145087",6965:"96164f48",6969:"14eb3368",6984:"b583f8da",7002:"06ae2feb",7087:"e6234b82",7205:"1277da97",7280:"4837c448",7479:"94b33d50",7525:"24305ed3",7560:"10bd5768",7657:"fedaf6f6",7796:"54a1d96a",8381:"4e0d9b1a",8401:"17896441",8532:"6d364990",8562:"c137d568",8581:"935f2afb",8589:"92cccb59",8714:"1be78505",8864:"d92a3c43",8897:"7c61c187",9026:"c34e76e6",9086:"eda63c6c",9088:"6c180aec",9437:"e36fd90c",9445:"13be4e0d",9462:"31b22d21",9560:"277d5ed9",9659:"258674bb",9704:"91ac0728",9788:"c746c086",9790:"b6e4f51b",9795:"3e478533",9957:"695aeeb3"}[e]||e)+"."+{114:"a5b7ee7f",133:"81af0ea6",295:"36e79e7a",296:"f7b522bf",313:"4f32e625",431:"575a9c28",446:"58edb2db",517:"344198a8",645:"9aa2d5e4",728:"17c2d551",782:"2a221dff",789:"4637b1a0",805:"ba8301c0",881:"52239d7a",895:"ac8a4cd1",941:"3d087698",1118:"1403492e",1269:"db3315b4",1280:"12875c00",1392:"992e3611",1400:"898f74cf",1535:"53ac24fc",1643:"343aa2f8",1714:"676aa211",1774:"ffe8feb8",1992:"d02af0cc",2213:"6b86e304",2278:"fd75805e",2334:"a759e66f",2429:"afbed4cb",2574:"406043c2",2741:"bd99dbc3",2979:"ba8b034f",3237:"c4ea3c94",3383:"bdb07c3c",3508:"b9d16ec1",3706:"f473a7ac",3748:"9c741aeb",3882:"00771c52",3885:"3126b3c1",3986:"10cada0c",4126:"7803d3c9",4134:"7f34b3c4",4324:"6cd9d7f3",4363:"9ddfbf2e",4422:"d056eabf",4436:"2bcd7f6a",4567:"ec7a4b29",4571:"ccfbf6bf",4639:"702b1087",4711:"9c8847ff",4789:"a75dfe10",4921:"7688c603",5023:"38955902",5093:"d81e7d2a",5150:"7e3e320c",5745:"3447d453",5794:"326408bb",6001:"b841d4ba",6061:"1d436071",6106:"0d11879a",6142:"16db3bf0",6198:"5ab30e3b",6454:"d62edfac",6826:"8ef95da6",6965:"18f07c4a",6969:"050c38c9",6984:"5ca3ac72",7002:"4028b2a6",7087:"4c285f41",7205:"c75e8c5d",7280:"e0d81bc3",7479:"20ff3cb9",7525:"caf64e7d",7560:"c7159cd2",7657:"e990f94e",7796:"7004d604",8381:"db89510b",8401:"3d4a71db",8532:"5562d781",8562:"2a832f4a",8581:"42d8a123",8589:"da875c73",8714:"fe706c1c",8864:"7d761259",8897:"0eed92e2",9026:"cce0d5ae",9086:"a811f1bb",9088:"725342e2",9437:"fae715df",9445:"fab88bb5",9462:"cc3a34b4",9560:"f358ef90",9659:"4ef0a05e",9704:"57eed96e",9788:"b534be5b",9790:"db5a090a",9795:"c017f142",9957:"eedbdec4"}[e]+".js",t.miniCssF=e=>{},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.o=(e,c)=>Object.prototype.hasOwnProperty.call(e,c),d={},t.l=(e,c,a,b)=>{if(d[e])d[e].push(c);else{var f,r;if(void 0!==a)for(var o=document.getElementsByTagName("script"),n=0;n{f.onerror=f.onload=null,clearTimeout(l);var b=d[e];if(delete d[e],f.parentNode&&f.parentNode.removeChild(f),b&&b.forEach((e=>e(a))),c)return c(a)},l=setTimeout(u.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=u.bind(null,f.onerror),f.onload=u.bind(null,f.onload),r&&document.head.appendChild(f)}},t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.p="/operating-systems/104/",t.gca=function(e){return e={17896441:"8401",18331331:"5150",76594300:"881","3ab8ba97":"114",bd661649:"133",fdd932e3:"295",f3b326a0:"296",c9516280:"313",de8c6cf5:"431","2c5e963b":"446","5ebe6805":"517",a057a266:"645",a210c167:"728",aee7a050:"782","8815920a":"789",b4c6c600:"805","29ea19b5":"895",ef7ad362:"941",ed8bb14c:"1118","6b326dfe":"1269",bdd18817:"1280","4c341edc":"1392","9ca8cdc0":"1400","77ccc4bc":"1535","63c434c4":"1643",cd9eb992:"1714",efb9ee94:"1992","463aadd7":"2213","23374ca6":"2278",b5c587af:"2334",b407248a:"2429","17017c95":"2574","0afd4953":"2741","59fcd8c2":"2979",ae952c5d:"3237",c4b5fe4e:"3383","918b3e21":"3508","747ded37":"3706","2bf71d30":"3748",caff8214:"3882","9dbf5e3b":"3885","58e12640":"3986",e3a89e97:"4126","393be207":"4134","7acd3bcd":"4324","579f6061":"4363",c3389805:"4422","51ad08a9":"4436","4032a112":"4571","18519af9":"4639",d6fc9938:"4711","8ec866b0":"4789","467560df":"4921","05a859b2":"5023",c8c74c20:"5093","3f2616b2":"5745","84cf1180":"5794","0b9ed770":"6001","1f391b9e":"6061","42cb4b20":"6106",a3f724e5:"6142","4dd793a9":"6198","8e632797":"6454","8b145087":"6826","96164f48":"6965","14eb3368":"6969",b583f8da:"6984","06ae2feb":"7002",e6234b82:"7087","1277da97":"7205","4837c448":"7280","94b33d50":"7479","24305ed3":"7525","10bd5768":"7560",fedaf6f6:"7657","54a1d96a":"7796","4e0d9b1a":"8381","6d364990":"8532",c137d568:"8562","935f2afb":"8581","92cccb59":"8589","1be78505":"8714",d92a3c43:"8864","7c61c187":"8897",c34e76e6:"9026",eda63c6c:"9086","6c180aec":"9088",e36fd90c:"9437","13be4e0d":"9445","31b22d21":"9462","277d5ed9":"9560","258674bb":"9659","91ac0728":"9704",c746c086:"9788",b6e4f51b:"9790","3e478533":"9795","695aeeb3":"9957"}[e]||e,t.p+t.u(e)},(()=>{var e={5354:0,1869:0};t.f.j=(c,a)=>{var d=t.o(e,c)?e[c]:void 0;if(0!==d)if(d)a.push(d[2]);else if(/^(1869|5354)$/.test(c))e[c]=0;else{var b=new Promise(((a,b)=>d=e[c]=[a,b]));a.push(d[2]=b);var f=t.p+t.u(c),r=new Error;t.l(f,(a=>{if(t.o(e,c)&&(0!==(d=e[c])&&(e[c]=void 0),d)){var b=a&&("load"===a.type?"missing":a.type),f=a&&a.target&&a.target.src;r.message="Loading chunk "+c+" failed.\n("+b+": "+f+")",r.name="ChunkLoadError",r.type=b,r.request=f,d[1](r)}}),"chunk-"+c,c)}},t.O.j=c=>0===e[c];var c=(c,a)=>{var d,b,f=a[0],r=a[1],o=a[2],n=0;if(f.some((c=>0!==e[c]))){for(d in r)t.o(r,d)&&(t.m[d]=r[d]);if(o)var i=o(t)}for(c&&c(a);n Operating Systems | Operating Systems - + @@ -12,7 +12,7 @@

    Operating Systems

    Welcome to the Operating Systems course, held by the National University of Science and Technology Politehnica Bucharest.

    Our content is structured into 5 chapters:

    • Software Stack: provides an overview about the interactions between applications, libraries, the and the hardware with an emphasis on the need and usage for system calls
    • Data: teaches how the operating system manages the memory of a process
    • Compute: explains how the operating system manages threads, processes and the way they interact
    • I/O: teaches how an application interacts with outside resource such as files or the network from the perspective of the operating system
    • App Interact: combines the previous chapters to showcase how applications can leverage multiple mechanisms provided by the OS to exchange information

    We store this content in our GitHub repository. If you want to make contributions, make sure you follow our contributing guidelines. Raise issues to ask questions and point out errors and bugs.

    - + \ No newline at end of file diff --git a/104/lab-setup/index.html b/104/lab-setup/index.html index efb29a09d1..44dc06b69b 100644 --- a/104/lab-setup/index.html +++ b/104/lab-setup/index.html @@ -4,14 +4,14 @@ Setting up the Lab Environment | Operating Systems - +
    -

    Setting up the Lab Environment

    Prerequisites

    You can work on any Linux setup (native install, WSL, VM), but we strongly recommend you use the operating-systems class VMs.

    Cloning the repository

    If you haven't already cloned the repository, do so and you are ready to go:

    student@os:~$ git clone https://github.com/cs-pub-ro/operating-systems.git
    student@os:~$ cd operating-systems

    Getting the latest changes

    Each time you start a new laboratory, you should ensure you have the latest changes. -If you have no local changes, you can simply run git pull and you are ready to go:

    student@os:~$ cd operating-systems
    student@os:~/operating-systems$ git status # Check if you have unstaged changes
    On branch <not-important>
    nothing to commit, working tree clean

    # "working tree clean" means that you have no changes
    student@os:~/operating-systems$ git pull --rebase

    If git status output differs, follow the instructions to save your progress.

    Save Progress and Prepare next lab

    1. Check if you have unstaged changes that might be lost:

      student@os:~$ cd operating-systems
      student@os:~/operating-systems$ git status
      On branch <not-important>
      Changes not staged for commit:
      (use "git add <file>..." to update what will be committed)
      (use "git restore <file>..." to discard changes in working directory)
      modified: misc/lab-setup.md

      If git status states "work tree clean", you should follow the instructions to pull latest changes instead.

    2. Create a commit to store your changes:

      student@os:~/operating-systems$ git add .
      student@os:~/operating-systems$ git commit -m "Store progress for lab X"
      student@os:~/operating-systems$ git status # double check that everything is staged
      On branch <not-important>
      nothing to commit, working tree clean
    3. Create a new branch for lab Y:

      student@os:~/operating-systems$ git checkout -b lab-Y  # Replace Y with lab number
      student@os:~/operating-systems$ git pull origin main # Get latest changes from origin/main
    4. (Optional) Finding previous labs

      Assuming you followed the instructions in this section, you can find your previous work on other branches:

      student@os:~/operating-systems$ git branch
      main
      lab-1
      lab-2
      * lab-3
      student@os:~/operating-systems$ git checkout lab-2
      Switched to branch 'lab-2'
    - +

    Setting up the Lab Environment

    Prerequisites

    You can work on any Linux setup (native install, WSL, VM), but we strongly recommend you use the operating-systems class VMs.

    Cloning the repository

    If you haven't already cloned the repository, do so and you are ready to go:

    student@os:~$ git clone https://github.com/cs-pub-ro/operating-systems.git
    student@os:~$ cd operating-systems

    Getting the latest changes

    Each time you start a new laboratory, you should ensure you have the latest changes. +If you have no local changes, you can simply run git pull and you are ready to go:

    student@os:~$ cd operating-systems
    student@os:~/operating-systems$ git status # Check if you have unstaged changes
    On branch <not-important>
    nothing to commit, working tree clean

    # "working tree clean" means that you have no changes
    student@os:~/operating-systems$ git pull --rebase

    If git status output differs, follow the instructions to save your progress.

    Save Progress and Prepare next lab

    1. Check if you have unstaged changes that might be lost:

      student@os:~$ cd operating-systems
      student@os:~/operating-systems$ git status
      On branch <not-important>
      Changes not staged for commit:
      (use "git add <file>..." to update what will be committed)
      (use "git restore <file>..." to discard changes in working directory)
      modified: main.c

      If git status states "work tree clean", you should follow the instructions to pull latest changes instead.

    2. Create a commit to store your changes:

      student@os:~/operating-systems$ git add -f .  # Use -f as `support/` directories are ignored
      student@os:~/operating-systems$ git commit -m "Store progress for lab X"
      student@os:~/operating-systems$ git status # double check that everything is staged
      On branch <not-important>
      nothing to commit, working tree clean
    3. Create a new branch for lab Y:

      student@os:~/operating-systems$ git checkout -b lab-Y  # Replace Y with lab number
      student@os:~/operating-systems$ git pull origin main # Get latest changes from origin/main
    4. (Optional) Finding previous labs

      Assuming you followed the instructions in this section, you can find your previous work on other branches:

      student@os:~/operating-systems$ git branch
      main
      lab-1
      lab-2
      * lab-3
      student@os:~/operating-systems$ git checkout lab-2
      Switched to branch 'lab-2'
    + \ No newline at end of file diff --git a/104/markdown-page/index.html b/104/markdown-page/index.html index 492ec65092..200240d09e 100644 --- a/104/markdown-page/index.html +++ b/104/markdown-page/index.html @@ -4,13 +4,13 @@ Markdown page example | Operating Systems - +

    Markdown page example

    You don't need React to write simple standalone pages.

    - + \ No newline at end of file diff --git a/104/resources/index.html b/104/resources/index.html index 6c1b8a5516..08b232d66a 100644 --- a/104/resources/index.html +++ b/104/resources/index.html @@ -4,7 +4,7 @@ Resources and Useful Links | Operating Systems - + @@ -15,7 +15,7 @@ Follow the instructions on the official websites for installation.

    UTM (macOS >= 11 users)

    If you are using an M1 Apple system, you will not be able to run the virtual machine using VirtualBox or VMware. You will need to use UTM, along with a .qcow2 image. You will need to log in using your UPB account.

    After you install UTM and download and unzip the archive, you can import it using the Open existing VM option in UTM.

    You can also follow the instructions for running the VM using qemu.

    - + \ No newline at end of file diff --git a/104/rules-and-grading/index.html b/104/rules-and-grading/index.html index 25a683edb3..362b7a263a 100644 --- a/104/rules-and-grading/index.html +++ b/104/rules-and-grading/index.html @@ -4,7 +4,7 @@ Rules and Grading | Operating Systems - + @@ -86,7 +86,7 @@ You cannot retain the grades for lecture components (lecture tests and exam).
  • Students interested in preserving their grades should respond on the designated Moodle thread by October 13, 2024, 23:55.
  • The rules and grading system for students retaking the course are the same as for students in the current year (lecture tests + exam, assignments, etc.).
  • Students retaking the course can participate in any lab session as long as there are available slots. Like other students, the attendance list becomes fixed starting from the third week.
  • Students retaking the course can participate in any lecture, lecture test, and exam, regardless of the series to which they belonged.
  • By default, the grades for the 2024-2025 academic year will be reset on October 1, 2025. If you do not graduate from the course in the 2024-2025 academic year, you will need to retake it in the 2025-2026 academic year, with the possibility of retaining some components, as detailed above.

    - + \ No newline at end of file