Sessions
General information on sessions
During an OS session, you are not supposed to surf on the Internet, except for searching some information relevant to this laboratory session. Also, you are not supposed to read your email, chat, and send SMS or whatever: stay focused on the session. Do not work in groups, not even in groups of two. You will get a much better understanding and get the maximum benefit of the lab if working alone. While far less difficult, sitting near a geek and admiring how fast she/he is will not be as beneficial. Of course, You can exchange ideas with somebody else during the lab, but labs are individual, personal work. After you have tried hard on a question, you can obviously seek for help calling the teaching assistants. Also, sometimes, a partial solution is given with aUse of AI
Learning curve
Learning operating systems and programming in C is both challenging and rewarding. These topics give you a deeper understanding of how computers really work behind the scenes: memory management, processes, scheduling, filesystems, and low-level programming. Mastering them will sharpen your thinking, improve your debugging skills, and make you a much stronger developer.
AI assistants can be very helpful for daily and professional tasks. But there's a real risk: if you rely too much on AI to write or debug your code, you may feel like you're learning - when in fact you're skipping the essential struggle of solving problems yourself. That frustration when your program segfaults, and the effort you spend to track down why, is not wasted time. It is exactly how you build deep understanding.
If AI gives you answers too quickly, your learning curve becomes shallow: you might pass a lab, but later you'll discover you can't tackle harder problems - especially those that AI cannot solve for you.
How to use AI
Here are a few suggestions:- Ask it to explain an error message, or to walk you through a concept of the lectures step by step, but try solving the problem yourself first.
- After AI gives you a feedback, understand it and totally rewrite it in your own style
- Always double-check AI output - especially in C, where small mistakes (like wrong use of malloc() or free() calls or incorrect pointer arithmetic) can have big consequences. Never execute a (C) code provided by AI before double-checking it: imagine that a wrong code may erase all your files!
- Struggle before you ask! If you've thought hard and tried to debug for 30 minutes, then it's fair to use AI as a guide. But don't make it your first instinct in labs.
The very basics of Software development
- Using terminals
- Editing a C file
$ code myfile.cYou may also use your favorite text editor.
- Compiling a C file
$ gcc -o myExe myFile.cwith myExe, the name you want to give to the executable file, and myFile.c, the name of the C file you want to compile.
Compilation may fail: in most cases, it is due to an error in your program.
Sometimes, when using perticular programming libraries, you need to specify additional compilation directives. For example, when using POSIX features, you need to specify the real-time library:
$ gcc -lrt -o myExe myFile.cExecuting your program
$ ./myExe
F.A.Q.
- I am stuck with programming, what should I do?
$ man forkAnd to specify a given section (here, section 2) of manual pages:
$ man -S 2 cloneAnother way to do is to use the apropos command:
$ apropos cloneAlso, you can find information on the course's slides or on Linux manual pages on the Internet.
- When I compile, I get error messages, what should I do?