Operating Systems Placement Algorithm Alok Kumar Jagadev.

Slides:



Advertisements
Similar presentations
Tutorial 8 Exercises CH8.
Advertisements

Basic Memory Management Monoprogramming Protection Swapping Overlaying OS space User space.
MEMORY MANAGEMENT (Best-Fit & First-Fit)
1 CMPT 300 Introduction to Operating Systems Virtual Memory Sample Questions.
3.3 Paging PAGE TABLE Logical memory Physical memory page frame
CSS430 Memory Management Textbook Ch8
CSEN5322 Quiz-6.
Virtual Memory. Hierarchy Cache Memory : Provide invisible speedup to main memory.
 Just as processes share the CPU, they also share physical memory. This section is about mechanisms for doing that sharing. EXAMPLE OF MEMORY USAGE Calculation.
Memory Management Chapter 7. Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated efficiently to pack as.
Allocating Memory.
Memory Management Design & Implementation Segmentation Chapter 4.
Chapter 8.3: Memory Management
Memory Problems (I.1.1) Prof. Sin-Min Lee Department of Mathematics and Computer Science.
Linux Vs. Windows NT Memory Management Hitesh Kumar
Chapter 10 Operating Systems. 2 Chapter Goals Describe the two main responsibilities of an operating system Define memory and process management Explain.
Memory Management Chapter 7 B.Ramamurthy. Memory Management Subdividing memory to accommodate multiple processes Memory needs to allocated efficiently.
Technical University of Lodz Department of Microelectronics and Computer Science Elements of high performance microprocessor architecture Virtual memory.
03/24/2004CSCI 315 Operating Systems Design1 Memory Management and Virtual Memory (Problem session)
Memory Management Five Requirements for Memory Management to satisfy: –Relocation Users generally don’t know where they will be placed in main memory May.
1 Memory Management Virtual Memory Chapter 4. 2 The virtual memory concept In a multiprogramming environment, an entire process does not have to take.
Answers to the VM Problems Spring First question A computer has 32 bit addresses and a virtual memory with a page size of 8 kilobytes.  How many.
1 Lecture 8: Memory Mangement Operating System I Spring 2008.
Memory Management Ch.8.
CS 346 – Chapter 8 Main memory –Addressing –Swapping –Allocation and fragmentation –Paging –Segmentation Commitment –Please finish chapter 8.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 32 Paging Read Ch. 9.4.
Paging Examples Assume a page size of 1K and a 15-bit logical address space. How many pages are in the system?
1 Memory Management Memory Management COSC513 – Spring 2004 Student Name: Nan Qiao Student ID#: Professor: Dr. Morteza Anvari.
8.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 08 Main Memory (Page table questions)
Chapter 10 Operating Systems.
Memory Management 1 Tanenbaum Ch. 3 Silberschatz Ch. 8,9.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming  To allocate scarce memory resources.
Paging Example What is the data corresponding to the logical address below:
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Memory Management Operating Systems CS550. Memory Manager Memory manager - manages allocation and de-allocation of main memory Plays significant impact.
Chapter 91 Logical Address in Paging  Page size always chosen as a power of 2.  Example: if 16 bit addresses are used and page size = 1K, we need 10.
Memory Management. Why memory management? n Processes need to be loaded in memory to execute n Multiprogramming n The task of subdividing the user area.
Homework Assignment #3 J. H. Wang Nov. 13, 2015.
Paging Paging is a memory-management scheme that permits the physical-address space of a process to be noncontiguous. Paging avoids the considerable problem.
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo 1 Memory management & paging.
VIRTUAL MEMORY Virtual Address Space. In computing, virtual address space (abbreviated VAS) is a memory mapping mechanism available in modern operating.
CSCI 6307 Foundation of Systems – Exercise (4) Xiang Lian The University of Texas – Pan American Edinburg, TX
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Memory Management & Virtual Memory. Hierarchy Cache Memory : Provide invisible speedup to main memory.
Introduction to Paging. Readings r 4.3 of the text book.
Memory Management One of the most important OS jobs.
CS 140 Lecture Notes: Virtual Memory
Memory Management.
Memory Management (2).
ITEC 202 Operating Systems
Chapter 2 Memory and process management
ITEC 202 Operating Systems
COMBINED PAGING AND SEGMENTATION
Paging Examples Assume a page size of 1K and a 15-bit logical address space. How many pages are in the system?
ICS Principles of Operating Systems
CS 140 Lecture Notes: Virtual Memory
Economics, Administration & Information system
Paging Lecture November 2018.
Segmentation Lecture November 2018.
CS241 Section: Week 10.
Lecture 32 Syed Mansoor Sarwar
CPSC 457 Operating Systems
CS 140 Lecture Notes: Virtual Memory
Virtual Memory.
Exercise (11).
Paging Memory Relocation and Fragmentation Paging
CS 140 Lecture Notes: Virtual Memory
COMP755 Advanced Operating Systems
Memory Management & Virtual Memory
Page Main Memory.
Presentation transcript:

Operating Systems Placement Algorithm Alok Kumar Jagadev

Placement Algorithm Given five memory partitions of 100 KB, 500 KB, 200 KB, 300 KB, and 600 KB (in order), how would each of the first-fit, best-fit, and worst-fit algorithms place processes of 212 KB, 417 KB, 112 KB, and 426 KB (in order)?Which algorithm makes the most efficient use of memory?

Placement Algorithm First-fit: 212K is put in 500K partition 417K is put in 600K partition 112K is put in 288K partition (new partition 288K = 500K − 212K) 426K must wait

Placement Algorithm Best-fit: 212K is put in 300K partition 417K is put in 500K partition 112K is put in 200K partition 426K is put in 600K partition

Placement Algorithm Worst-fit: 212K is put in 600K partition 417K is put in 500K partition 112K is put in 388K partition 426K must wait In this example, best-fit turns out to be the best.

Paging Assuming a 1 KB page size, what are the page numbers and offsets for the following address references (provided as decimal numbers): 2375 19366 30000 256 16385

Paging Assuming a 1 KB page size, what are the page numbers and offsets for the following address references (provided as decimal numbers): page = 2; offset = 327 page = 18; offset = 934 page = 29; offset = 304 page = 0; offset = 256 page = 1; offset = 1

Paging Consider a logical address space of 32 pages with 1024 words per page; mapped onto a physical memory of 16 frames. How many bits are required in the logical address? How many bits are required in the physical address?

Paging 25 = 32 + 210 = 1024 = 15 bits. 24 = 32 + 210 = 1024 = 14 bits.