GNU Programming
| Code | Completion | Credits | Range |
|---|---|---|---|
| 11GNU | KZ | 4 | 2P+2C |
- Course guarantor:
- Martin Dráb
- Lecturer:
- Martin Dráb
- Tutor:
- Supervisor:
- Department of Solid State Engineering
- Synopsis:
-
The aim of the course is to introduce students into the Linux system environment and therein used GNU utilities and programming tools to such a level, that they would be able to use these tools for creating scripts and programs for processing acquired or simulated data for their experiments in physics with the use of the facultys Hyperion cluster (however the learned skills could of course be applied to any Linux system). For students to be able to write an effective code, it is necessary to know how today's computers function internally, so the first half of the course is dedicated to an overview of principles of internal functionality of a computer (from hardware, through the operating system, up to the applications).
- Requirements:
-
Final classification work entails a building project, a program in C and a script in BASH with the use of various GNU utilities. The work is primarily focused on experimental data processing. After a successfull submission and acceptance of the classification work a personal discussion over the solution of the work follows together with questions regarding the theory from the first cca half of the course. Based on all of these tasks completed, student gets a classification.
- Syllabus of lectures:
-
1. Introduction, physical display of HW, components, buses.
2. Processor, core, thread, RISC/CISC, instructions, pipeline, registers, flip-flops, Boolean algebra.
3. X86-64 registers, IEEE754, cache, cache-line, FIFO/LIFO.
4. RAM (topology/organization, rows, columns, banks, ranks, CL, multi-channel, refresh, principle).
5. Memory virtualization, MMU, page-table, memory mapping, TLB, address spaces, swap, shared memory.
6. I/O, MMIO, IOMMU, devices, GPU, APU, interrupts and exceptions, character and block devices.
7. Protection mode and rings, process, thread, contexts, user-space, kernel-space, context switching.
8. Block devices, disks, sector, CHS, LBA, AF, 4kn/512e, RAID, file systems, file, directory, FAT, journal,
inode, b-tree, symlink, hardlink, snapshots.
9. Boot, MBR/GPT, partition table, (U)EFI/Legacy, BIOS, kernel architecture, Linux distributions, virtualization.
10. Intro to Linux, Linux vs. Windows, UNIX/Windows time, EPOCH, rights, file attributes, UID, GID, PID, FHS.
11. Programming languages division, compiler principle.
12. Compiler principle continuation (GIMPLE, RTL, optimization, frontend, backend, LTO, PGO).
13. Compiler principle finalization, interpreter principle.
14. Accessing Linuxu, vim, shell, BASH, man, info, basic commands and utils to work with files.
15. BASH: variables, expansions, stdin/stdout/stderr, redirection, subshell, arrays.
16. BASH: commands, expressions, pipe, special expressions and symbols, arithmetic, scripting.
17. BASH: more commands, examples.
18. grep, regular expressions, sed: principle and most of the commands.
19. sed: the 's' command and addressing; C: intro, standards, libc, basic types, pointers, void pointer, arrays.
20. C: compound types, macros, pointer arithmetics, qualifiers, dynamic memory allocation,
garbage collector, reference counting.
21. C: operators and their priorities, atomic operations, code examples
22. C: code examples, work with files.
23. GNU Make: Intro, Makefile, rules, prerequisities, static and dynamic libraries, manual linking, examples
24. SW projects, building systems, Autotools (autoconf, automake, m4, libtool), examples
(Other lessons are usually cancelled during the semester, otherwise it is possible to continue with an introduction to parallel programming and work with the cluster. Optionally, according to available time.)
- Syllabus of tutorials:
-
(Tutorials are not separated from lectures and are executed in tow with them when needed.)
- Study Objective:
- Study materials:
-
Key references:
[1] C. Alvin: Computer Programming: Learn Any Programming Language in 2 Hours. CreateSpace Independent Publishing Platform, 2018. ISBN: 1985644916, 9781985644915
[2] T. Roughgarden: Algorithms Illuminated. Soundlikeyourself Publishing, LLC 2019, ISBN-13: 978-0999282946.
Other references:
[3] M. Barr, A. Massa: Programming Embedded Systems: With C and GNU Development Tools. 2nd ed., OReilly Media, Sebastopol CA USA 2007, ISBN-13: 978-0596009830
- Note:
- Time-table for winter semester 2025/2026:
- Time-table is not available yet
- Time-table for summer semester 2025/2026:
- Time-table is not available yet
- The course is a part of the following study plans: