Tutorial 8 Exercises CH8.

Slides:



Advertisements
Similar presentations
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200.
Advertisements

$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500.
Who Wants To Be A Millionaire?
Welcome to Who Wants to be a Millionaire
Set Up Instructions Place a question in each spot indicated Place an answer in each spot indicated Remove this slide Save as a powerpoint slide show.
$1 Million $500,000 $250,000 $125,000 $64,000 $32,000 $16,000 $8,000 $4,000 $2,000 $1,000 $500 $300 $200 $100 Welcome.
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
Demonstration Problem
$100 $400 $300$200$400 $200$100$100$400 $200$200$500 $500$300 $200$500 $100$300$100$300 $500$300$400$400$500.
Multiplying Powers Dividing Powers Zero ExponentsNegative.
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200.
Who wants to be a Millionaire?
Category 1 Category 2 Category 3 Category 4 Category.
Dont Forget... Contestants …Always phrase your answers in the form of a question!
Category Category Category Category Category.
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
So far Binary numbers Logic gates Digital circuits process data using gates – Half and full adder Data storage – Electronic memory – Magnetic memory –
Editing Instructions Simply add a question and 4 possible answers by overtyping the white text. The green box on the next slide shows which answer should.
Who Wants To Be A Millionaire?
Who Wants To Be A Millionaire? Mrs Mances Edition.
Who Wants To Be A Millionaire? Year 3 What does it weigh?
£1 Million £500,000 £250,000 £125,000 £64,000 £32,000 £16,000 £8,000 £4,000 £2,000 £1,000 £500 £300 £200 £100 Welcome.
£1 Million £500,000 £250,000 £125,000 £64,000 £32,000 £16,000 £8,000 £4,000 £2,000 £1,000 £500 £300 £200 £100 Welcome.
Welcome to Who Wants to be a Millionaire
£1 Million £500,000 £250,000 £125,000 £64,000 £32,000 £16,000 £8,000 £4,000 £2,000 £1,000 £500 £300 £200 £100 Welcome.
Welcome to Who Wants to be a Millionaire
Welcome to Who Wants to be a Millionaire
Visual Formalisms Message Sequence Charts Book: Chapter 10.
$100 $200 $300 $400 $100 $200 $300 $400 $100 $200 $300 $400 $100 $200 $300 $400 $100 $200 $300 $400.
Chapter 5 : Memory Management
CS1104 – Computer Organization
Memory.
Practical Session 9, Memory
Page Table Implementation
Chapter 8 Homework Solutions
1 st Wave Allen plays Atascosita 9 AM, Ct 1 Allen plays Coppell 10 AM, Ct 1 2 nd Wave If Allen is 1 st in Wave 1, Play at 2:30 and 4:30 on Ct 2 (R2G1P1)
Problem of the Day Problem of the Day Computation Money next
Created by Susan Neal $100 Fractions Addition Fractions Subtraction Fractions Multiplication Fractions Division General $200 $300 $400 $500 $100 $200.
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
Category Heading Category Heading Category Heading.
CMPT 300 Introduction to Operating Systems
$1 Million $500,000 $250,000 $125,000 $64,000 $32,000 $16,000 $8,000 $4,000 $2,000 $1,000 $500 $300 $200 $100 Welcome.
Part IV: Memory Management
Equal or Not. Equal or Not
Slippery Slope
Blank Jeopardy. Category #1 Category #2 Category #3 Category #4 Category #
MATHCOUNTS TOOLBOX Facts, Formulas and Tricks
Fractions Simplify: 36/48 = 36/48 = ¾ 125/225 = 125/225 = 25/45 = 5/9
Distributed Database Management Systems Lecture 15.
Partial Products. Category 1 1 x 3-digit problems.
Operating Systems.
Distributed Computing 9. Sorting - a lower bound on bit complexity Shmuel Zaks ©
Allocating Memory.
Day 20 Memory Management. Assumptions A process need not be stored as one contiguous block. The entire process must reside in main memory.
1 Memory Management Virtual Memory Chapter 4. 2 The virtual memory concept In a multiprogramming environment, an entire process does not have to take.
Virtual Memory Chantha Thoeun. Overview  Purpose:  Use the hard disk as an extension of RAM.  Increase the available address space of a process. 
Memory Management Ch.8.
Paging Examples Assume a page size of 1K and a 15-bit logical address space. How many pages are in the system?
8.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 08 Main Memory (Page table questions)
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-8 Memory Management (2) Department of Computer Science and Software.
8.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Paging Physical address space of a process can be noncontiguous Avoids.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Introduction to Paging. Readings r 4.3 of the text book.
COMBINED PAGING AND SEGMENTATION
Day 19 Memory Management.
Paging Examples Assume a page size of 1K and a 15-bit logical address space. How many pages are in the system?
Practice Six Chapter Eight.
Operating Systems Placement Algorithm Alok Kumar Jagadev.
Paging Memory Relocation and Fragmentation Paging
Presentation transcript:

Tutorial 8 Exercises CH8

8.1 Name two differences between logical and physical addresses.

8.1 Name two differences between logical and physical addresses.

8.1 Name two differences between logical and physical addresses. Answer: A logical address does not refer to an actual existing address; rather, it refers to an abstract address in an abstract address space. Contrast this with a physical address that refers to an actual physical address in memory. A logical address is generated by the CPU and is translated into a physical address by the memory management unit(MMU). Therefore, physical addresses are generated by the MMU.

8.3 Why are page sizes always powers of 2?

8.3 Why are page sizes always powers of 2? Answer: Recall that paging is implemented by breaking up an address into a page and offset number. It is most efficient to break the address into X page bits and Y offset bits, rather than perform arithmetic on the address to calculate the page number and offset. Because each bit position represents a power of 2, splitting an address between bits results in a page size that is a power of 2.

8.4 Consider a logical address space of 64 pages of 1,024 words each, mapped onto a physical memory of 32 frames. a. How many bits are there in the logical address? b. How many bits are there in the physical address? Addressing within a 1024-word page requires 10 bits because 1024 = 210. Since the logical address space consists of 64 = 26 pages, the logical addresses must be 10+6 = 16 bits. Similarly, since there are 32 = 25 physical frames, physical addresses are 5 + 10 = 15 bits long.

8.9 Explain the difference between internal and external fragmentation.

8.9 Explain the difference between internal and external fragmentation. Internal fragmentation is unused allocated area, whereas external fragmentation is un allocated area and unused

8.11 Given six memory partitions of 300 KB, 600 KB, 350 KB, 200 KB, 750 KB, and 125 KB (in order), how would the first-fit, best-fit, and worst-fit algorithms place processes of size 115 KB, 500 KB, 358 KB, 200 KB, and 375 KB (in order)?

8.11 Given six memory partitions of 300 KB, 600 KB, 350 KB, 200 KB, 750 KB, and 125 KB (in order), how would the first-fit, best-fit, and worst-fit algorithms place processes of size 115 KB, 500 KB, 358 KB, 200 KB, and 375 KB (in order)? M1=300 KB M2=600 KB M3=350 KB M4=200 KB M5=750 KB M6=125 KB P1=115 KB P2=500 KB P3=358 KB P4=200 KB P5=375 KB First-fit: P1 = 115 M1=300 M2=600 M3=350 M4=200 M5=750 M6=125 P2 = 500 M1=185 M2=600 M3=350 M4=200 M5=750 M6=125 P3 = 358 M1=185 M2=100 M3=350 M4=200 M5=750 M6=125 P4 = 200 M1=185 M2=100 M3=350 M4=200 M5=392 M6=125 P5 = 375 M1=185 M2=100 M3=150 M4=200 M5=392 M6=125 Best-fit P2 = 500 M1=300 M2=600 M3=350 M4=200 M5=750 M6=10 P3 = 358 M1=300 M2=100 M3=350 M4=200 M5=750 M6=10 P4 = 200 M1=300 M2=100 M3=350 M4=200 M5=392 M6=10 P5 = 375 M1=300 M2=100 M3=350 M4=000 M5=392 M6=10

8.20 Assuming a 1-KB page size, what are the page numbers and offsets for the following address references (provided as decimal numbers): a. 3085 b. 42095 c. 215201 d. 650000 e. 2000001 Answer: Page size =2n =1024 B= 210 B # of bits in offset part (n) =10 Solution steps : 1. Convert logical address: Decimal to Binary 2. Split binary address to 2 parts (page # , Offset), offset : n digits 3. Convert offset & page# : Binary to Decimal

8.20 Assuming a 1-KB page size, what are the page numbers and offsets for the following address references (provided as decimal numbers): Logical address (decimal) (binary) Page # (22 bits) (binary) Offset (10 bits) decimal 3085 00000000000000000000110000001101 0000000000000000000011 0000001101 3 13 42095 00000000000000001010010001101111 0000000000000000101001 0001101111 41 111 215201 00000000000000110100100010100001 0000000000000011010010 0010100001 210 161 650000 00000000000010011110101100010000 0000000000001001111010 1100010000 634 784 2000001 00000000000010000000000000000001 0000000000001000000000 0000000001 512 1

0,430 219+430=649 1,10 2300+10=2310 2,500 Invalid 3,400 1327+400=1727 4,112