1 / 65

proglit /

http:// proglit.com /. hardware and operating systems basics. SA. BY. client/workstation (PC) server (responds to requests from network) hand-held (phone, audio player) embedded system (toaster, car) mainframe (a big server) supercomputer (a many-processor system).

neil
Download Presentation

proglit /

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. http://proglit.com/

  2. hardware and operating systems basics

  3. SA BY

  4. client/workstation (PC) • server (responds to requests from network) • hand-held (phone, audio player) • embedded system (toaster, car) • mainframe (a big server) • supercomputer (a many-processor system)

  5. RAM (Random Access Memory) • addressable by the CPU • volatile • faster than storage • code and data of • running programs

  6. http://proglit.com/

  7. programming model (simplified conception of a processor for sake of programmers)

  8. instruction • copy bytes • arithmetic • bit logic • jumps (a sequence of bits understood by the processor to signal a certain action)

  9. register (a small memory area in a processor) • status • general purpose

  10. ISA (Instruction Set Architecture) x86 (IA-32, x86-64) ARM MIPS Motorola 68k

  11. http://proglit.com/

  12. code call stack (local variables) program memory heap (everything else)

  13.  top of stack frame of lama  top of stack frame of bird  top of stack • local variables • argument values frame of fish stack space  top of stack frame of dog  top of stack frame of cat  top of stack frame of main

  14.  top of stack frame of moose  top of stack frame of bird • local variables • argument values • return address frame of fish stack space frame of dog frame of cat frame of main

  15. big-endian vs. little-endian (the order in which the bytes of a register are copied from registers to memory and vice versa)

  16. big-endian vs. little-endian (the order in which the bytes of a register are copied from registers to memory and vice versa)

  17. http://proglit.com/

  18. capacity processor registers processor cache random access memory hard drives speed, cost

  19. http://proglit.com/

  20. device registers read/write  CPU

  21. port-mapped I/O vs. memory-mapped I/O output register 2 to port 0x44 98 copy register 5 to address 0x66 2C 1A 32

  22. memory addresses 0xFF FF FF FF RAM byte n byte 0 0x00 00 00 00 ports devices port n port 0

  23. memory addresses 0xFF FF FF FF RAM byte n byte 0 0x00 01 00 00 devices 0x00 00 FF FF 0x00 00 00 00

  24. polling (code periodically checks device registers to see if the device needs the CPU to do something)

  25. device interrupt line registers CPU

  26. polling interrupt • device sends interrupt signal to CPU • CPU saves state of whatever it was currently doing • CPU jumps to address corresponding to interrupt number in the interrupt table (code periodically checks device registers to see if they need the CPU to do something)

  27. … interrupt 7 0xFF 31 01 11 interrupt 6 0xFF 90 44 44 interrupt 5 0xFF 31 01 11 interrupt 4 0xFF 31 21 14 interrupt 3 0xA2 22 00 10 interrupt 2 0x82 87 95 94 interrupt 1 0x20 15 10 00 interrupt 0 0x76 00 00 00

  28. polling interrupt • device sends interrupt signal to CPU • CPU saves state of whatever it was currently doing • CPU jumps to address corresponding to interrupt number in the interrupt table • CPU returns to whatever it was doing before the interrupt (code periodically checks device registers to see if they need the CPU to do something)

  29. hardware exception … … exception 4 0xFF 31 21 14 (a condition which causes the CPU to jump to a pre-determined address) exception 3 0xA2 22 00 10 exception 2 0x82 87 95 94 exception 1 0x20 15 10 00 exception 0 0x76 00 00 00

  30. http://proglit.com/

  31. Instruction Set Architecture byte size word size address size cache speeds and sizes big-endian vs. little-endian ports vs. memory-mapped i/o number of processors/cores

  32. boot firmware BIOS registers CPU

  33. http://proglit.com/

  34. boot firmware BIOS registers CPU

  35. operating system • load and manage processes • provide “interfaces” to hardware via system calls • provide a filesystem • provide a basic user interface (manages the hardware and running programs)

  36. Windows (series of OS’s from Microsoft) • Windows 7 • Windows Server 2008 • Windows CE

  37. Unix • Linux • BSD • OS X (a family of OS’s)

  38. http://proglit.com/

  39. device driver OS (plug-in to the OS to control a particular device) software driver driver driver device device device hardware

  40. process OS B A B A B A B C C CPU time A C C C C B A B CPU 2

  41. pre-emptive multitasking CPU receives interrupt interrupt stores state of currently running code interrupt invokes handler interrupt handler invokes the scheduler scheduler selects a process scheduler “configures” CPU for that process scheduler jumps execution to that process

  42. http://proglit.com/

  43. 0xFF FF FFFF Process A Process B Process C OS 0x00 00 00 00

  44. 0x FF FFFFFF stack RAM byte n heap heap byte 0 heap code 0x 00 00 00 00

  45. 0x FF FFFFFF stack RAM byte n heap heap byte 0 heap HD code 0x 00 00 00 00

  46. http://proglit.com/

  47. Process A Process B RAM jump to system call code via special instruction Process C OS

More Related