Documente Academic
Documente Profesional
Documente Cultură
Glib Ivashkevych
junior researcher, NSC KIPT
3 GRUB stage 2
presents menu, loads kernel image, maneuvers in unreal mode, since kernel image can be larger than 640K Config files: /boot - they are here. /boot/grub2/grub.cfg is a main config file.
3 Kernel
kernel is now PID 0, setups remaining CPUs, hardware is fully functional kernel launches init (tries /sbin/init, /etc/init, /bin/init, /bin/sh) kernel thread waits for requests
systemd becomes a parent of any process which lost its direct parent (and what the hell does that
mean?! believe it or not, any process in Linux has a parent. except PID 0 and PID 1).
exec
loads new program to memory typically, never returns
stack
stack: per function call, contains local variables, return values and where to return. One stack per thread heap: dynamically allocated memory
0x00000000
virtual address
mechanisms of control
conflict
Linux interrupts
Interrupt: signal, that breaks current CPU activity Async: generated by hardware Sync: generated by CPU itself (exceptionally conditions, etc.)
Linux interrupts
Kernel should handle interrupts
peripheral device kernel decides what to do: schedule process, return to previously running critical actions (other interrupts disabled) non-critical deferred
interrupt controller
CPU
ps
takes info from /proc many different options
Linux
The test of the machine is the satisfaction it gives you. There isn't any other test. If the machine produces tranquility it's right. If it disturbs you it's wrong until either the machine or your mind is changed. Robert Pirsig, in Zen and the Art of Motorcycle Maintenance
Questions?