%Revision %Thadeu Cascardo # Hardware # Machine types * Von Neumman and the stored program * Accumulator * Stack * Registers * ISA * Data, addresses and control registers # Memory * Buses * Memory Cache * Segmentation * Paging and Virtual Memory * Operation Reordering # Interrupts * Register saving * Different stack and context * Must enable, disable, ack # Supervisor mode * Protected instructions * Protected registers * Traps # Multi-processor systems * SMP * NUMA * Memory coherency # I/O * Buses * Different address space * Memory mapped registers * Device memory * Shared memory * DMA # Operating System # Extended machine * Software layer providing abstraction * Examples: - Filesystem instead of disk drive - Virtual memory and transparent swap instead of overlays # Resources Manager * CPU Manager * Memory Manager * Devices Manager # Process Management * Scheduling * Concurrency * Inter-process communication # Memory Management * Virtual Memory * Memory allocation * Memory hierarchy ("secondary" memory or storage) # I/O * Access protection * Sharing * Abstraction # Others * Filesystem * Network # Mechanism and policy * Provide mechanism in kernel space * Allow policy to user space # Unix, GNU, Linux and POSIX # History * MULTICS * Ken Thompson and Unix * Dennis Ritchie and C language * Berkeley Unix * Unix Wars * RMS and GNU Project * Minix * Linux and GNU # Architecture * toolchain: GNU * kernel: Linux * libc: GNU libc * loader: GNU * shell: GNU bash * utils: GNU coreutils * System: GNU + Linux * Other systems: *BSD, OpenSolaris, etc # Systems using Linux * toolchain is always GNU - Intel CC and tcc build Linux, but their use is unknown * libc: uclibc, dietlibc, eglibc, others... * busybox # GNU systems * Most systems are GNU + Linux * GNU Hurd * Debian GNU/kFreeBSD # Standards * man standards * Unix V7 * 4.[234]BSD * System V * SVr[234] * C * POSIX * XPG * SUS # Free software # Intellectual Rights * Copyright * "Author right" * Patents * Trademark * Trade Secret # RMS and FSF * The GNU Manifesto * Free Software Foundation * Copyleft # Copyleft * Public Domain allows changes to be non-free * The author may give permissions through licenses * The license may request conditions on distribution * A copyleft license requires the work to be kept free * The GPL # GPL version 2 * Allows use * Allows source code redistribution, including a fee * Allows modifications and their distribution on the condition that they are marked as so and licensed as GPL too * Allows distribution of binaries, when source code access is still possible * Does not allow further restrictions # Myths * The GPL requires the software to be free as in "free beer" - FALSE * The GPL requires modifications to be published - FALSE * The GPL requires all my code to be GPL - FALSE # License compatibility * All requirements must be satisfied simultaneously * The GPL does not allow further requirements * You can only combine GPL code with code licensed with no restrictions besides those in the GPL