Nytro Posted November 13, 2012 Report Posted November 13, 2012 Computer Science from the Bottom UpIan Wienand<ian@wienand.org>Copyright © 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Ian WienandComputer Science from the Bottom Up — A free, online book designed to teach computer science from the bottom end up. Topics covered include binary and binary logic, operating systems internals, toolchain fundamentals and system library fundamentals.Table of ContentsIntroduction Welcome Philosophy Why from the bottom up? Enabling technologies1. General Unix and Advanced C Everything is a file! Abstraction and function pointers Application Programming Interfaces Libraries Summary Exercises Standard File Descriptors The Shell Redirection2. Binary and Number Representation Binary -- the basis of computing Binary Theory Hexadecimal Practical Implications Types and Number Representation C Standards Types Number Representation3. Computer Architecture The CPU Branching Cycles Fetch, Decode, Execute, Store CISC v RISC Memory Memory Hierarchy Cache in depth Peripherals and busses Peripheral Bus concepts DMA Other Busses Small to big systems Symmetric Multi-Processing Clusters Non-Uniform Memory Access Memory ordering, locking and atomic operations4. The Operating System The role of the operating system Abstraction of hardware Multitasking Standardised Interfaces Security Performance Operating System Organisation The Kernel Userspace System Calls Overview Analysing a system call Privileges Hardware Other ways of communicating with the kernel File Systems5. The Process What is a process? Elements of a process Process ID Memory File Descriptors Registers Kernel State Process Hierarchy Fork and Exec Fork Exec How Linux actually handles fork and exec The init process Context Switching Scheduling Preemptive v co-operative scheduling Realtime Nice value A brief look at the Linux Scheduler The Shell Signals Example6. Virtual Memory What Virtual Memory isn't What virtual memory is 64 bit computing Using the address space Pages Physical Memory Pages + Frames = Page Tables Virtual Addresses Page Offset Virtual Address Translation Consequences of virtual addresses, pages and page tables Individual address spaces Protection Swap Sharing memory Disk Cache Hardware Support Physical v Virtual Mode The TLB TLB Management Linux Specifics Address Space Layout Three Level Page Table7. The Toolchain Compiled v Interpreted Programs Compiled Programs Interpreted programs Building an executable Compiling The process of compiling Syntax Assembly Generation Optimisation Assembler Linker Symbols The linking process A practical example Compiling Assembly Linking The Executable8. Behind the process Review of executable files Representing executable files Three Standard Sections Binary Format Binary Format History ELF ELF in depth Debugging ELF Executables Libraries Static Libraries Shared Libraries ABI's Byte Order Calling Conventions Starting a process Kernel communication to programs Starting the program9. Dynamic Linking Code Sharing Dynamic Library Details Including libraries in an executable The Dynamic Linker Relocations Position Independence Global Offset Tables The Global Offset Table Libraries The Procedure Lookup Table Working with libraries and the linker Library versions Finding symbols10. I/O Fundamentals File System Fundamentals Networking FundamentalsComputer Science from the Bottom Up GlossaryLink:http://www.bottomupcs.com/index.htmlPuneti mana si mai si cititi cate ceva Quote