Chapter 5 - Memory management. This chapter is devoted to the fundamentals of memory management. It begins by discussing how memory protection is implemented in the hardware by using special registers in the CPU. It then discusses how efficient use of memory is achieved by reusing memory released by a process while handling subsequent memory requests, and how techniques for fast memory allocation and deallocation may cause memory fragmentation. | PROPRIETARY MATERIAL. © 2007 The McGraw-Hill Companies, Inc. All rights reserved. No part of this PowerPoint slide may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their individual course preparation. If you are a student using this PowerPoint slide, you are using it without permission. Managing the memory hierarchy The memory hierarchy is comprised of several memory units with different speeds and cost Efficient operation of a process and the system depends on effective use of the memory hierarchy Efficient operation of a process depends on hit ratios in faster memories of the hierarchy, ., the cache and memory Efficient operation of the system requires many processes to be present in memory Managing the memory hierarchy How different levels in the hierarchy are managed L1 cache and L2 cache Allocation and use | PROPRIETARY MATERIAL. © 2007 The McGraw-Hill Companies, Inc. All rights reserved. No part of this PowerPoint slide may be displayed, reproduced or distributed in any form or by any means, without the prior written permission of the publisher, or used beyond the limited distribution to teachers and educators permitted by McGraw-Hill for their individual course preparation. If you are a student using this PowerPoint slide, you are using it without permission. Managing the memory hierarchy The memory hierarchy is comprised of several memory units with different speeds and cost Efficient operation of a process and the system depends on effective use of the memory hierarchy Efficient operation of a process depends on hit ratios in faster memories of the hierarchy, ., the cache and memory Efficient operation of the system requires many processes to be present in memory Managing the memory hierarchy How different levels in the hierarchy are managed L1 cache and L2 cache Allocation and use is managed by hardware to ensure high hit ratios Memory Use is managed by run time libraries of programming languages Allocation is managed by the kernel. It must Accommodate many processes in memory Ensure high hit ratios Disk Allocation and use is managed by the kernel Quick loading and storing of process address spaces is important Managing the memory hierarchy Efficient use of memory Involves sharing of memory among processes and reuse of memory previously allocated to other processes Requires speedy allocation and de-allocation within the memory allocated to a process We discuss these aspects in Chapter 5 and this set of slides The memory hierarchy consisting of memory and a disk is called virtual memory We discuss it separately in Chapter 6 Memory binding Each entity has a set of attributes; ., a variable has type, size and dimensionality Binding is the action of specifying values of attributes of an entity, . Declaration of type of a variable is the binding of its type .