# TEMPLATE LECTURE --- ### Included slides These slides have been included from the `intro.md` file. They also contain a list as follows: * item 1 * item 2 ---- ### Slides including images ![CPU Internals](media/cpu-internals.jpg) * A slide can also include images included using `![CPU Internals](../media/cpu-internals.jpg)` ---- ### All Processes in a System ``` student@os:~$ ps -e | wc -l 32 student@os:~$ ps -e PID TTY TIME CMD 1 ? 00:00:00 init 914 ? 00:00:00 init 2582 ? 00:00:07 gpg-agent 19812 ? 00:00:00 init 19813 ? 00:00:00 init 19814 pts/0 00:00:00 bash 20650 ? 00:00:00 init 20651 ? 00:00:00 init 20652 pts/1 00:00:00 sh 20653 pts/1 00:00:00 sh 20658 pts/1 00:00:00 sh 20661 pts/1 00:00:03 node 20672 ? 00:00:00 init 20673 ? 00:00:00 init 20674 pts/2 00:00:00 node 20681 pts/1 00:00:00 node 20701 ? 00:00:00 init 20702 ? 00:00:00 init 20703 pts/3 00:00:01 node 20722 pts/1 00:00:00 node 20733 pts/1 00:00:18 node 20796 pts/1 00:00:25 node 20915 ? 00:00:00 init 20916 ? 00:00:00 init 20917 pts/4 00:00:00 bash 20964 pts/4 00:00:00 python3 20981 ? 00:00:00 init 20982 ? 00:00:00 init 20983 pts/5 00:00:00 bash 21045 pts/5 00:00:00 ps ``` Terminal listings work the same as in regular markdown files. --- ## Slides hierarchy --- ## Slides Hierarchy * Slides are organized in two levels * We use `---` in order to open up a new topic. This leads to a new horizontal slide figuring a topic that can be expanded by vertical slides. * We expand discussions on the same topic by vertical slides. We use `----`, which adds a new vertical slide ---- ### New Vertical Slide * This slide illustrates a new item of discussion on the matter of the slides hierarchy --- ### Animated Slides * You can even animate slides like this ``` [1 - 2 | 3 - 4] student@os:~/.../compute/lecture/demo/create-process$ strace -e clone ./fork_exec clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f7e83aa4810) = 5302 student@os:~/.../compute/lecture/demo/create-thread$ strace -e clone ./create_thread clone(child_stack=0x7f9ea7df0fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, tls=0x7f9ea7df1700, child_tidptr=0x7f9ea7df19d0) = 5389 ``` --- ### Tables You can include tables: | Advantages | Disadvantages | | :------------------------------: | :----------------------------------------: | | implemented by libraries | implemented by the kernel | | blocking actions stall process | blocking actions only stall current thread | | more mapped on one kernel thread | provide support for user level threads | | Java, Python | Linux KThreads, Windows threads | --- * We can include `*.md*` files in order to create modular courses * To include external files, we use the `!INCLUDE` directive