operating systems
play

Operating Systems Manage Resources Abstract Details CSC 452: - PDF document

8/27/2018 Operating Systems Manage Resources Abstract Details CSC 452: Introduction Dr. Jonathan Misurda jmisurda@cs.arizona.edu http://www.u.arizona.edu/~jmisurda Manage Resources Abstract Details CPU Time Exclusive


  1. 8/27/2018 Operating Systems • Manage Resources • Abstract Details CSC 452: Introduction Dr. Jonathan Misurda jmisurda@cs.arizona.edu http://www.u.arizona.edu/~jmisurda Manage Resources Abstract Details • CPU Time • Exclusive access to the CPU(s) • Memory • Huge amounts of dedicated RAM • I/O Devices • Exclusive access to I/O devices – Disks/Filesystems • Transparent security • Security In short, SHARING Varieties of OS Ye Olde Computer • Mainframe OS • Real-Time OS – Hard real-time • Server OS – Soft real-time • Parallel Computer OS • Embedded OS • Personal Computer OS • Smart Card OS 1

  2. 8/27/2018 Ye Olde Program Punchcard Data for $END program FORTRAN $RUN $LOAD program $FORTRAN $JOB, 10,6610802, ETHAN MILLER Why Study History? Multiprogramming Ontogeny Recapitulates Phylogeny Job 3 Development of the species is mimicked by the gestation of an individual Job 2 Or: Memory What’s old will be new again Job 1 partitions Operating system Image Protection Process’s Address Space 0x7fffffff Address Address Stack 0x2ffff 0x2ffff User program User data 0x2d000 and data Limit data 0x2b000 0x2bfff User data 0x29000 Base data 0x27fff Limit User program Limit text 0x24fff and data User program 0x23000 Base 0x23000 Base text 0x1dfff 0x1dfff Data (Heap) Operating Operating Data (Heap) system system 0 0 Text (Code) 0 2

  3. 8/27/2018 System Call Return to caller Context Switch Library Trap to kernel ( printf call) 3 Trap code in register Switching from one running process to User 8 space another 2 7 9 Increment SP 4 User Call printf code 1 Push arguments Kernel Sys call space Dispatch handler 5 6 (OS) The Memory Hierarchy A Simple Computer System Outside world Better < 1 KB Registers 1 ns 2 MB Cache (SRAM) 2–5 ns Video Hard drive USB Network controller controller controller controller 512 MB Main memory (DRAM) 50 ns 250 GB Magnetic disk 5 ms > 1 TB Magnetic tape 50 sec CPU Computer internals (inside the “box”) Memory Protect and Share CPU Architecture • CPU time Execute – Preemption unit Fetch Decode • Memory unit unit – Address Spaces/Virtual Memory Execute Fetch Decode Execute Buffer unit unit unit unit • I/O Fetch Decode – Spool Execute unit unit • Simultaneous Peripheral Operation On Line unit • Security Pipelined CPU Superscalar CPU 3

  4. 8/27/2018 Hard Drive Internals I/O Via Interrupts read/write head sector Return to caller Trap to kernel 3 2 3 Trap code in register 5 8 Interrupt Disk platter CPU controller controller 2 7 track 1 6 4 9 Increment SP 4 Call printf cylinder Push arguments 1 surfaces Sys call Dispatch handler 5 6 Hardware View Software View spindle actuator Pipe Hierarchical File System Root directory cse bin faculty grads A B ls ps cp csh elm sbrandt kag amer4 classes research stuff stuff Monolithic OS Microkernel Main procedure Termina Client Client Process File Memory … l User mode process process server server server Kernel mode server Service Kernel mode Microkernel routines Utility routines 4

  5. 8/27/2018 Virtual Machines App 1 App 2 App 3 App 4 System calls Linux Windows NT FreeBSD I/O instructions VMware VMware VMware Calls to simulate I/O Linux “Real” I/O instructions Bare hardware 5

Recommend


More recommend