Opera5ng Systems and Hardware Overview Por%ons of - - PowerPoint PPT Presentation

opera5ng systems and hardware overview
SMART_READER_LITE
LIVE PREVIEW

Opera5ng Systems and Hardware Overview Por%ons of - - PowerPoint PPT Presentation

CSE/ISE 311: Systems Administra5on Opera5ng Systems and Hardware Overview Por%ons of this material from U. Manitoba CSE/ISE 311: Systems Administra5on


slide-1
SLIDE 1

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Opera5ng ¡Systems ¡and ¡ Hardware ¡Overview ¡

¡ ¡ ¡ Por%ons ¡of ¡this ¡material ¡from ¡U. ¡Manitoba ¡

slide-2
SLIDE 2

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Components ¡of ¡a ¡Computer ¡System ¡

  • A ¡computer ¡system ¡consists ¡of ¡both ¡hardware ¡and ¡

so=ware ¡

  • Many ¡different ¡types: ¡

– Tablets, ¡laptops ¡ – Desktops, ¡worksta%ons ¡ – Embedded ¡systems ¡ – Servers ¡ – Mainframes ¡ ¡ – Super ¡Computers ¡

2-2

slide-3
SLIDE 3

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Inside ¡a ¡Computer ¡Case ¡

2-3

slide-4
SLIDE 4

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Hardware ¡Components ¡

  • Processor ¡
  • Main ¡memory ¡
  • Secondary ¡memory ¡ ¡

– hard ¡disk, ¡op%cal ¡disks, ¡tapes, ¡… ¡

  • Input ¡devices ¡

– keyboard, ¡mouse, ¡microphone, ¡… ¡

  • Output ¡devices ¡ ¡

– monitor, ¡printer, ¡speaker, ¡… ¡

2-4

slide-5
SLIDE 5

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Processors ¡

cpu cpu socket with cooler cpu with cover removed

2-5

slide-6
SLIDE 6

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Main ¡Memory ¡

2-6

slide-7
SLIDE 7

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Motherboard ¡of ¡a ¡Laptop ¡ ¡

2-7

slide-8
SLIDE 8

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Motherboard ¡of ¡iphone3G ¡

http://www.rapidrepair.com/Merchant2/merchant.mvc?Screen=cp-iphone3g 2-8

slide-9
SLIDE 9

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Buses ¡

  • Key ¡abstrac%on ¡for ¡hardware ¡
  • A ¡hardware-­‑level ¡messaging ¡system ¡for ¡components ¡
  • A ¡lot ¡of ¡EE-­‑type ¡specifica%ons ¡about ¡clock ¡rate, ¡

voltage, ¡etc. ¡

  • You ¡mostly ¡need ¡to ¡know ¡that ¡the ¡specs ¡for ¡all ¡

components ¡have ¡to ¡agree ¡

9 ¡

slide-10
SLIDE 10

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Bus ¡idea ¡

2-­‑10 ¡

Awesome ¡ Dev ¡1 ¡ Awesome ¡Dev ¡ 2 ¡ Bus ¡ Controller ¡ Awesome ¡Dev ¡3 ¡ Bus ¡Client ¡ Bus ¡Client ¡ Bus ¡Client ¡

slide-11
SLIDE 11

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Bus ¡Intui%on ¡

  • For ¡a ¡given ¡device ¡type, ¡the ¡bus ¡client ¡speaks ¡the ¡

protocol ¡over ¡the ¡wire ¡

  • Encapsulates ¡low-­‑level ¡device ¡implementa%on ¡

2-­‑11 ¡

slide-12
SLIDE 12

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

A ¡logical ¡view ¡of ¡hardware ¡

CPU(s) ¡ RAM ¡ PCI-­‑X ¡ Bus ¡ PCI ¡ Bus ¡ SATA ¡ BIOS ¡ North ¡Bridge ¡ ¡ (Fast ¡devices: ¡ ¡ e.g., ¡GPU) ¡ South ¡Bridge ¡ ¡ (“Slow” ¡Devices: ¡ ¡ e.g., ¡Disk, ¡USB, ¡ Most ¡network) ¡

slide-13
SLIDE 13

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Buses ¡galore ¡

  • Memory ¡Bus: ¡connects ¡Northbridge ¡components ¡

(CPU, ¡RAM, ¡GPU, ¡Southbridge ¡controller) ¡

  • Disk ¡buses: ¡ ¡

– Controller ¡on ¡the ¡motherboard ¡

  • O=en ¡on ¡south ¡bridge ¡

– Speaks ¡to ¡disks ¡ ¡

  • SATA, ¡IDE, ¡SCSI, ¡etc ¡
  • USB, ¡Firewire, ¡etc. ¡are ¡all ¡bus ¡protocols ¡

2-­‑13 ¡

slide-14
SLIDE 14

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Fewer ¡Bridges ¡

  • Newer ¡system ¡organiza%ons ¡are ¡moving ¡more ¡

devices ¡to ¡the ¡North ¡bridge, ¡and ¡consolida%ng ¡more ¡ things ¡on ¡the ¡CPU ¡itself. ¡

slide-15
SLIDE 15

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

So ¡what ¡is ¡an ¡OS? ¡

2-­‑15 ¡

slide-16
SLIDE 16

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

One ¡view ¡of ¡an ¡OS ¡

2-­‑16 ¡

slide-17
SLIDE 17

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Another ¡simple ¡view ¡of ¡an ¡OS ¡

2-­‑17 ¡

Hardware ¡ OS ¡ App ¡ App ¡ App ¡ App ¡

slide-18
SLIDE 18

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

A ¡less ¡happy ¡view ¡of ¡an ¡OS ¡

2-­‑18 ¡

slide-19
SLIDE 19

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

So ¡which ¡one ¡is ¡right? ¡

  • They ¡all ¡are ¡

2-­‑19 ¡

slide-20
SLIDE 20

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

An ¡OS ¡serves ¡three ¡masters ¡

  • 1. Give ¡users ¡a ¡desktop ¡environment ¡
  • 2. Give ¡applica%ons ¡a ¡more ¡usable ¡abstrac%on ¡of ¡the ¡

hardware ¡

  • 3. Give ¡hardware ¡manufacturers ¡an ¡abstrac%on ¡of ¡the ¡

applica%ons ¡ ¡

2-­‑20 ¡

slide-21
SLIDE 21

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Background ¡(1) ¡

  • CPUs ¡have ¡2 ¡modes: ¡user ¡and ¡supervisor ¡

– Some%mes ¡more, ¡but ¡whatevs ¡

  • Supervisor ¡mode: ¡ ¡

– Issue ¡commands ¡to ¡hardware ¡devices ¡ – Power ¡off, ¡Reboot, ¡Suspend ¡ – Launch ¡missiles, ¡Do ¡awesome ¡stuff ¡

  • User ¡mode: ¡ ¡

– Run ¡other ¡code, ¡hardware ¡taeles ¡if ¡you ¡try ¡anything ¡ reserved ¡for ¡the ¡supervisor ¡

2-­‑21 ¡

slide-22
SLIDE 22

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

OS ¡architecture ¡

2-­‑22 ¡

Hardware ¡ OS ¡ App ¡ App ¡ App ¡ App ¡

slide-23
SLIDE 23

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

OS ¡architecture ¡

2-­‑23 ¡

Hardware ¡ Libraries ¡ App ¡ App ¡ App ¡ App ¡ Kernel ¡ User ¡ Super-­‑ ¡ visor ¡

slide-24
SLIDE 24

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Master ¡#2: ¡Applica%ons ¡

  • Applica%on ¡Programming ¡Interface ¡(API) ¡

– Win32 ¡(Windows) ¡ – POSIX ¡(Unix/Linux) ¡ – Cocoa/Cocoa ¡Touch ¡(Mac ¡OS/iOS) ¡

  • Applica%on-­‑facing ¡func%ons ¡provided ¡by ¡libraries ¡

– Injected ¡by ¡the ¡OS ¡into ¡each ¡applica%on ¡

2-­‑24 ¡

slide-25
SLIDE 25

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

OS ¡architecture ¡

2-­‑25 ¡

Hardware ¡ Libraries ¡ App ¡ App ¡ App ¡ App ¡ Kernel ¡ User ¡ Super-­‑ ¡ visor ¡

slide-26
SLIDE 26

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡ App ¡

OS ¡architecture ¡

2-­‑26 ¡

Hardware ¡ Libraries ¡ Kernel ¡ User ¡ Super-­‑ ¡ visor ¡ App ¡ Libraries ¡ App ¡ Libraries ¡ Win32 ¡ API ¡

slide-27
SLIDE 27

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Famous ¡libraries, ¡anyone? ¡

  • Windows: ¡ntdll.dll, ¡kernel32.dll, ¡user32.dll, ¡gdi32.dll ¡
  • Linux/Unix: ¡libc.so, ¡ld.so, ¡libpthread.so, ¡libm.so ¡

2-­‑27 ¡

slide-28
SLIDE 28

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Caveat ¡1 ¡

  • Libraries ¡include ¡a ¡lot ¡of ¡code ¡for ¡common ¡func%ons ¡

– Why ¡bother ¡reimplemen%ng ¡sqrt? ¡

  • They ¡also ¡give ¡high-­‑level ¡abstrac%ons ¡of ¡hardware ¡

– Files, ¡printer, ¡dancing ¡Homer ¡Simpson ¡USB ¡doll ¡

  • How ¡does ¡this ¡work? ¡

2-­‑28 ¡

slide-29
SLIDE 29

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

System ¡Call ¡

  • Special ¡instruc%on ¡to ¡switch ¡from ¡user ¡to ¡supervisor ¡

mode ¡

  • Transfers ¡CPU ¡control ¡to ¡the ¡kernel ¡

– One ¡of ¡a ¡small-­‑ish ¡number ¡of ¡well-­‑defined ¡func%ons ¡

  • How ¡many ¡system ¡calls ¡does ¡Windows ¡or ¡Linux ¡

have? ¡

– Windows ¡~1200 ¡ – Linux ¡~350 ¡

2-­‑29 ¡

slide-30
SLIDE 30

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡ App ¡

OS ¡architecture ¡

2-­‑30 ¡

Hardware ¡ Libraries ¡ Kernel ¡ User ¡ Super-­‑ ¡ visor ¡ App ¡ Libraries ¡ App ¡ Libraries ¡ System ¡Call ¡Table ¡(350—1200) ¡ Open ¡file ¡ “hw1.txt” ¡ Ok, ¡here’s ¡ handle ¡4 ¡

slide-31
SLIDE 31

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Caveat ¡2 ¡

  • Some ¡libraries ¡also ¡call ¡special ¡apps ¡provided ¡by ¡the ¡

OS, ¡called ¡a ¡daemon ¡(or ¡service) ¡

– Communicate ¡through ¡kernel-­‑provided ¡API ¡

  • Example: ¡Print ¡spooler ¡

– App ¡sends ¡pdf ¡to ¡spooler ¡ – Spooler ¡checks ¡quotas, ¡etc. ¡ – Turns ¡pdf ¡into ¡printer-­‑specific ¡format ¡ – Sends ¡reformaeed ¡document ¡to ¡device ¡via ¡OS ¡kernel ¡

2-­‑31 ¡

slide-32
SLIDE 32

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡ App ¡

OS ¡architecture ¡

2-­‑32 ¡

Hardware ¡ Libraries ¡ Kernel ¡ User ¡ Super-­‑ ¡ visor ¡ App ¡ Libraries ¡ Daemon ¡ Libraries ¡ System ¡Call ¡Table ¡(350—1200) ¡

slide-33
SLIDE 33

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Master ¡3: ¡Hardware ¡

  • OS ¡kernels ¡are ¡programmed ¡at ¡a ¡higher ¡low ¡level ¡of ¡

abstrac%on ¡

– Disk ¡blocks ¡vs. ¡specific ¡types ¡of ¡disks ¡

  • For ¡most ¡types ¡of ¡hardware, ¡the ¡kernel ¡has ¡a ¡“lowest ¡

common ¡denominator” ¡interface ¡

– E.g., ¡Disks, ¡video ¡cards, ¡network ¡cards, ¡keyboard ¡ – Think ¡Java ¡abstract ¡class ¡ – Some%mes ¡called ¡a ¡hardware ¡abstrac%on ¡layer ¡(HAL) ¡

  • Each ¡specific ¡device ¡(Nvidia ¡GeForce ¡600) ¡needs ¡to ¡

implement ¡the ¡abstract ¡class ¡

– Each ¡implementa%on ¡is ¡called ¡a ¡device ¡driver ¡

2-­‑33 ¡

slide-34
SLIDE 34

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡ App ¡

OS ¡architecture ¡

2-­‑34 ¡

Hardware ¡ Libraries ¡ Kernel ¡ ¡ User ¡ Super-­‑ ¡ visor ¡ App ¡ Libraries ¡ Daemon ¡ Libraries ¡ System ¡Call ¡Table ¡(350—1200) ¡ HAL ¡ Driver ¡ Driver ¡ Driver ¡

slide-35
SLIDE 35

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

What ¡about ¡Master ¡1 ¡

  • What ¡is ¡the ¡desktop? ¡
  • Really ¡just ¡a ¡special ¡daemon ¡that ¡interacts ¡closely ¡

with ¡keyboard, ¡mouse, ¡and ¡display ¡drivers ¡

– Launches ¡programs ¡when ¡you ¡double ¡click, ¡etc. ¡ – Some ¡program ¡libraries ¡call ¡desktop ¡daemon ¡to ¡render ¡ content, ¡etc. ¡

2-­‑35 ¡

slide-36
SLIDE 36

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

An ¡OS ¡serves ¡three ¡masters ¡

  • 1. Give ¡users ¡a ¡desktop ¡environment ¡ ¡

– Desktop, ¡or ¡window ¡manager, ¡or ¡GUI ¡

  • 2. Give ¡applica%ons ¡a ¡more ¡usable ¡abstrac%on ¡of ¡the ¡

hardware ¡

– Libraries ¡(+ ¡system ¡calls ¡and ¡daemons) ¡

  • 3. Give ¡hardware ¡manufacturers ¡an ¡abstrac%on ¡of ¡the ¡

applica%ons ¡ ¡

– Device ¡Driver ¡API ¡(or ¡HAL) ¡

2-­‑36 ¡

slide-37
SLIDE 37

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

So ¡what ¡is ¡Linux? ¡

  • Really ¡just ¡an ¡OS ¡kernel ¡ ¡

– Including ¡lots ¡of ¡device ¡drivers ¡

  • Conflated ¡with ¡environment ¡consis%ng ¡of: ¡

– Linux ¡kernel ¡ – Gnu ¡libc ¡ – X ¡window ¡manager ¡daemon ¡ – CUPS ¡printer ¡manager ¡ – Etc. ¡

2-­‑37 ¡

slide-38
SLIDE 38

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

So ¡what ¡is ¡Ubuntu? ¡ ¡Centos? ¡

  • A ¡distribu5on: ¡bundles ¡all ¡of ¡that ¡stuff ¡together ¡

– Pick ¡versions ¡that ¡are ¡tested ¡to ¡work ¡together ¡ – Usually ¡also ¡includes ¡a ¡so=ware ¡update ¡system ¡

2-­‑38 ¡

slide-39
SLIDE 39

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

OSX ¡vs ¡iOS? ¡

  • Same ¡basic ¡kernel ¡(a ¡few ¡different ¡compile ¡op%ons) ¡
  • Different ¡window ¡manager ¡and ¡libraries ¡

2-­‑39 ¡

slide-40
SLIDE 40

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

What ¡is ¡Unix? ¡

  • A ¡very ¡old ¡OS ¡(1970s), ¡innova%ve, ¡s%ll ¡in ¡use ¡
  • Innova%ons: ¡

– Kernel ¡wrieen ¡in ¡C ¡(first ¡one ¡not ¡in ¡assembly) ¡

  • Co-­‑designed ¡C ¡language ¡with ¡Unix ¡

– Several ¡nice ¡API ¡abstrac%ons ¡ ¡

  • Fork, ¡pipes, ¡everything ¡a ¡file ¡
  • Several ¡implementa%ons: ¡*BSDs, ¡Solaris, ¡etc. ¡

– Linux ¡is ¡a ¡Unix-­‑like ¡kernel ¡

2-­‑40 ¡

slide-41
SLIDE 41

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

What ¡is ¡POSIX? ¡

  • A ¡standard ¡for ¡Unix ¡compa%bility ¡
  • Even ¡Windows ¡is ¡POSIX ¡compliant! ¡

¡

2-­‑41 ¡

slide-42
SLIDE 42

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

RTFM ¡

  • man ¡pages ¡are ¡your ¡friend! ¡

– (not ¡a ¡da%ng ¡service) ¡ – Ex: ¡‘man ¡malloc’, ¡or ¡‘man ¡3 ¡prinu’ ¡

  • Sec%on ¡3 ¡is ¡usually ¡where ¡libraries ¡live ¡-­‑ ¡there ¡is ¡a ¡command-­‑line ¡

u%lity ¡prinu ¡as ¡well ¡

  • Use ¡‘apropos ¡term’ to ¡search ¡for ¡man ¡entries ¡about ¡

term ¡

  • Windows ¡has ¡MSDN ¡online, ¡which ¡is ¡good ¡

2-­‑42 ¡

slide-43
SLIDE 43

CSE/ISE ¡311: ¡Systems ¡Administra5on ¡

Summary ¡

  • Understand ¡basic ¡hardware ¡terminology ¡
  • Understand ¡what ¡an ¡OS ¡is ¡

– Three ¡masters ¡ – Nomenclature ¡

  • Ques%ons? ¡

2-­‑43 ¡