Top Banner
Sean Barker Recap: The OS Abstraction 1 User-level Applications Operating System Hardware virtual machine interface physical machine interface Sean Barker OS Resource Management 2 Memory I/O Processor Processes, scheduling, synchronization Allocation, protection, virtual memory Disk management, filesystems, networking Hardware OS Services
7

Recap: The OS Abstraction - Bowdoin Collegesbarker/teaching/courses/... · L1)Cache L2)Cache RAM Disk 1"cycle'latency 2"cycle'latency 7"cycle'latency 100'cycle'latency 40,000,000'cycle'latency'

Jul 19, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Recap: The OS Abstraction - Bowdoin Collegesbarker/teaching/courses/... · L1)Cache L2)Cache RAM Disk 1"cycle'latency 2"cycle'latency 7"cycle'latency 100'cycle'latency 40,000,000'cycle'latency'

Sean Barker

Recap: The OS Abstraction

1

User-level Applications

Operating System

Hardware

virtual(machine(((interface

physical(machine(((interface

Sean Barker

OS Resource Management

2

Memory

I/O

Processor Processes, scheduling, synchronization

Allocation, protection, virtual memory

Disk management, filesystems, networking

Hardware OS Services

Page 2: Recap: The OS Abstraction - Bowdoin Collegesbarker/teaching/courses/... · L1)Cache L2)Cache RAM Disk 1"cycle'latency 2"cycle'latency 7"cycle'latency 100'cycle'latency 40,000,000'cycle'latency'

Sean Barker

Today: OS and Computer Architecture

3

networkcard

System bus

Sean Barker

Computer Architecture

4

Logic board

Page 3: Recap: The OS Abstraction - Bowdoin Collegesbarker/teaching/courses/... · L1)Cache L2)Cache RAM Disk 1"cycle'latency 2"cycle'latency 7"cycle'latency 100'cycle'latency 40,000,000'cycle'latency'

Sean Barker

Assembly Language

5

Sean Barker

Protection: User and Kernel Mode

6

Page 4: Recap: The OS Abstraction - Bowdoin Collegesbarker/teaching/courses/... · L1)Cache L2)Cache RAM Disk 1"cycle'latency 2"cycle'latency 7"cycle'latency 100'cycle'latency 40,000,000'cycle'latency'

Sean Barker

System Calls

7

Sean Barker

Traps

8

0: 0x00080000

1: 0x00100000

2: 0x00100480

3: 0x00123010

Illegal address

Memory violation

Division by zero

System call

Trap Vector

...

Memory Addresses

Page 5: Recap: The OS Abstraction - Bowdoin Collegesbarker/teaching/courses/... · L1)Cache L2)Cache RAM Disk 1"cycle'latency 2"cycle'latency 7"cycle'latency 100'cycle'latency 40,000,000'cycle'latency'

Sean Barker

I/O Control & Interrupts

9

0: 0x2ff080000

1: 0x2ff100000

2: 0x2ff100480

3: 0x2ff123010

keyboard

mouse

timer

disk 1

Interrupt Vector

Sean Barker

Synchronous & Asynchronous I/O

10

Page 6: Recap: The OS Abstraction - Bowdoin Collegesbarker/teaching/courses/... · L1)Cache L2)Cache RAM Disk 1"cycle'latency 2"cycle'latency 7"cycle'latency 100'cycle'latency 40,000,000'cycle'latency'

Sean Barker

Hardware Timer

11

Sean Barker

Memory Protection

12

Base register value

Limit register value

Mem

ory

(byt

es 0

to N

)

Page 7: Recap: The OS Abstraction - Bowdoin Collegesbarker/teaching/courses/... · L1)Cache L2)Cache RAM Disk 1"cycle'latency 2"cycle'latency 7"cycle'latency 100'cycle'latency 40,000,000'cycle'latency'

Sean Barker

Caches in the Memory Hierarchy

13

registers

L1)Cache

L2)Cache

RAM

Disk

1"cycle'latency

2"cycle'latency

7"cycle'latency

100'cycle'latency

40,000,000'cycle'latency'

Network 200,000,000+'cycle'latency'

load

evict

fast

ersl

ower

Sean Barker

Summary of Architecture Support

14

OS Service Hardware Support

Protection Kernel/user mode, protected instructions, base/limit registers

Interrupts Interrupt vectors

System calls Traps and trap vectors

I/O InterruptsScheduling, error recovery,

accounting Timer

Synchronization Atomic instructions

Virtual memory Translation look-aside buffers