+ All Categories
Home > Documents > CS 162 Discussion Section Week 5

CS 162 Discussion Section Week 5

Date post: 04-Jan-2016
Category:
Upload: wing-richards
View: 28 times
Download: 2 times
Share this document with a friend
Description:
CS 162 Discussion Section Week 5. Administrivia. Project code submission due Tuesday midnight Autograder is up and running Boat problem. What does an OS scheduler do?. Image Source: macdesign.net. How would you measure the effectiveness of a scheduler?. CPU Utilization Throughput - PowerPoint PPT Presentation
21
CS 162 Discussion Section Week 5
Transcript
Page 1: CS 162 Discussion Section Week 5

CS 162Discussion Section

Week 5

Page 2: CS 162 Discussion Section Week 5

Administrivia

• Project code submission due Tuesday midnight

• Autograder is up and running• Boat problem

Page 3: CS 162 Discussion Section Week 5

What does an OS scheduler do?

Page 4: CS 162 Discussion Section Week 5

Image Source: macdesign.net

Page 5: CS 162 Discussion Section Week 5

How would you measure the effectiveness of a scheduler?

• CPU Utilization• Throughput• Waiting time• Service time• Turnaround time for a process• Response time

Page 6: CS 162 Discussion Section Week 5

Work sheet time

Page 7: CS 162 Discussion Section Week 5

Recap: Why do we need memory management in the OS?

• Isolation / Protection• Ease of programming– Re-locatable code– Support for Dynamic Libraries

• Support larger address spaces (Program independent of hw availability)

Page 8: CS 162 Discussion Section Week 5

Memory Hierarchy

Image Source: http://www.sal.ksu.edu/faculty/tim/ossg/

Page 9: CS 162 Discussion Section Week 5

What are the typical segments in a process’ address space?

• Code• Data• Stack• Heap

Page 10: CS 162 Discussion Section Week 5

Seg ID # Base Limit

0 (code) 0x4000 0x0800

1 (data) 0x4800 0x1400

2 (shared) 0xF000 0x1000

3 (stack) 0x0000 0x3000

OffsetSeg014 1315

0x4000

0x0000

0x8000

0xC000

VirtualAddress Space

Virtual Address Format

0x0000

0x4800

0x5C00

0x4000

0xF000

PhysicalAddress Space

Space forOther Apps

Shared withOther Apps

Might be shared

SegID = 0

SegID = 1

Page 11: CS 162 Discussion Section Week 5

What is the problem with Memory Segmentation?

• Fragmentation!• Inter-process sharing is hard

What is the solution?

Page 12: CS 162 Discussion Section Week 5
Page 13: CS 162 Discussion Section Week 5

What is the size of the page table in a 64bit system if each

page is 4K in size?

Page 14: CS 162 Discussion Section Week 5

What is the problem with large pages?

What is the solution to large page tables?

Page 15: CS 162 Discussion Section Week 5
Page 16: CS 162 Discussion Section Week 5
Page 17: CS 162 Discussion Section Week 5

How does address translation really take place?

Page 18: CS 162 Discussion Section Week 5

What is the size of the page table in a 64bit system if each

page is 4K in size? – 16 PB

How many levels would you need if you had 1024 entry

page tables?

Page 19: CS 162 Discussion Section Week 5

Linear inverted page tables

Page 20: CS 162 Discussion Section Week 5

Hashed inverted page table

Page 21: CS 162 Discussion Section Week 5

Hashed inverted page table


Recommended