Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

OS Memory Management

Partner Project
by

Byron Watkins

on 4 December 2012

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of OS Memory Management

Presentation by:
A program instruction within a process will have an internal (or virtual) address that will be used to reference it from within the process.

A virtual address will consist of a page number and an offset from the start of the page.

When the process is loaded into memory, the same program instruction will also have a physical address in memory.

Various pages of a process may be loaded into page frames, and may be swapped in and out of memory several times during each the process. Virtual memory Steps and Procedures: Windows Mac iOS
and
Mac OSX Basic Information: Continued... The concept of virtual memory is closely associated with that of paging.

Virtual memory effectively extends the amount of memory available to applications by using some of the system's OS, secondary storage space, or the hard disk drive.

Sometimes all or part of a process may be swapped between real memory and virtual memory.

Virtual memory allows more processes to co-exist on the system and eliminates the limitations on overall process size. Memory Management:
In order for programs to be executed by the processor, they must be loaded into main memory.

Main memory is several times faster than secondary storage in terms of its access time. Linux Mac iOS & OS X Because the virtual address space might be larger or smaller than the physical memory on the machine, the Windows Memory Manager has two main responsibilities:

First translate, or map, a process's virtual address space into physical memory so that when a thread is running in the context of that process reads or writes to the virtual address space, the correct physical address is referenced.

The second is paging some of the contents of memory to disk when it becomes overcommitted or when running threads/system code try to use more physical memory than is available, and bringing the contents back into physical memory as needed. The move towards network operating systems poses two problems:
How to provide users with high performance
How to allow users to easily share data



Performance is a problem in network environments because each access of data may require both a network access and a disk access.

Network accesses will be required if the data that is being accessed is stored on another workstation’s disk; both diskless workstations and workstations that are sharing data may have to perform many network accesses. Network Data Management Protocol General Windows Operating System Management Taquisha K.
Adriel B.
Timmy L.
Byron W. Memory management is the function of a computer operating system responsible for managing the computer's primary memory. Linux When an operating system manages the computer's memory, there are two broad tasks to be accomplished:

1.Each process must have enough memory in which to execute, and it can neither run into the memory space of another process nor be run into by another process.

2.The different types of memory in the system must be used properly so that each process can run most effectively.

High-speed cache : This is the fastest type of memory. It is relatively small amounts of memory that are available to the CPU through the fastest connections.

Cache controllers : Predict which pieces of data the CPU will need next and pull it from main memory into high-speed cache to speed up system performance.

Main memory : Second fastest, RAM, is what you see measured in megabytes, and is what the OS primarily manages/processes.

Secondary memory : This memory is most often a sort of rotating magnetic storage that keeps applications and data available to be used, and serves as virtual RAM under the control of the operating system.

Disk storage : The memory types that must be managed by the operating system, this is the slowest. A processor can only access memory one location at a time, so the majority of RAM is unused at many times. This is when memory management comes into action. The types of memory in a computer system Ranked in order of speed: Overlays:
The main limitations imposed on programmers in the early days of computing were; the size of the computer's memory and opertaing speed

If the program was larger than the available memory, it could not be loaded, which placed severe restrictions on program size.

One way for a programmer to overcome these limitations was to use overlays

In most cases the OS divides the program into a number of logical sections, a small portion of the program had to remain in memory at all times


Memory protection is a major issue that must be dealt with in terms of memory management, .

In a single-tasking system, it is simply a matter of protecting the operating system's memory space from the user's program.

Memory is effectively split into two partitions : One partition is reserved for the operating system, the other is available for user programs.

Protection is implemented using a boundary register built into the processor. The boundary register contains the base memory address of the user program. Partitions and Protected Memory Internal Fragmentation Often storage space is used inefficiently, reducing capacity and often performance. Built up fragmentation leads to storage space being "wasted".

The main problem with the fixed-partition system was that each partition can only accommodate a single process.

Space wasted inside of allocated memory blocks because of restriction on the allowed sizes of allocated blocks.

Allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition.

The loss of available memory within a partition due to the fact that the process allocated to the partition may be significantly smaller than the partition in which it executes is known as internal fragmentation

Unusable memory is contained within an allocated region, and is thus termed internal fragmentation

If the process does not use all of the memory within a partition, the remaining memory can't be used for any other processes.

The unused memory can't be utilized, making it an inefficient use of memory resources. Variable Partitions Partition main memory into a set of non-overlapping memory regions called partitions.

The main problem with fixed partitions is that they are rarely the correct size for a particular process.

Fixed partitions can be of equal or unequal size.

If the partition is too small, a process cannot be loaded into it and must await the availability of a large partition.

Leftover space in partition, after program assignment is called internal fragmentation.

If the partition is too large, the process may be loaded but significant amounts of the available memory within the partition will be useless. Paging Paging is one of the steps in the memory management process where a computer can store and retrieve data from secondary storage for use in main memory.

In the paging, the operating system retrieves data from secondary storage in same-size blocks called pages

To make efficient use of the processor, several processes need to be in the memory at one time.

As physical memory increases in size and speed, paging occurs to run program(s).

Paging overcomes the limitations imposed by the physical size of memory. If you need to load an entire program into memory in one contiguous block.

The main advantage of paging over memory segmentation is that it allows the physical address space of a process to be non-contiguous Windows PC Operating system Management Swaps virtual memory used to manage all pages of memory, which are required for:
File caching
Process isolation
Network communication
An administrator can improve overall system performance by adjusting certain virtual memory manager settings.

Linux uses paging

Linux OS avoids using segmentation

Segment register values are the same

Virtual memory functionality may not be optimal, depending on administrator’s settings. Unlike Windows or UNIX-based operating systems, OS X and iOS do not use a pre-located disk partition for the backing storage.

Mac OS uses all of the available space on the machine’s boot partition.

Efficient memory management is an important aspect of storing/running programs and applications in both OS X and iOS.

iOS and OS X minimize memory usage also reduces the amount of CPU time it consumes.

Minimizing memory usage decreases memory storage Although OS X supports a backing storage, iOS does not.

In iPhone applications, read-only data that is already on the disk, such as code pages, is simply removed from memory and reloaded from disk as needed.

Writable data is never removed from memory by the operating system

Applications/Programs that fail to free up enough memory are terminated by OS Continued... Memory Management in a
Network Operating System A network consists of two or more computers linked in order to share more resources.

In network operating systems, each user has a personal high-performance workstation and communicates with other uses across a network.

Data is distributed amongst the disks of several workstations

Many workstations don’t uses disk, the data for these diskless workstation is stored across the network on the disk of other workstations. The performance problem can be solved by using the large memories which have recently become available.

The memories can be used to cache recently accessed file data and eliminate many network and disk accessesUsing large memories as cache has it problems.

If file sharing becomes too difficult, cached data in a network operating system can potentially be distributed around the network in many workstation's memories. NDMP (Network Data Management Protocol) is an open protocol used to control data backup and recovery communications between primary and secondary storage in a heterogeneous network environment. os Mac
Apple now has an embedded OS based on Mac OS that allows them to perform many tasks on portable Apple devices.

Such as tablets, phones, iPods and laptops

The new AirPort Extreme not only handles printer sharing, but disk sharing with folder-level access controls for multiple disks os os The limit for this OS is 32 process running limit and the 32 MB application virtual space limit.

Microsoft has improved greatly on Windows Embedded CE but the way it manages memory.

The new kernel allows up to 32 thousand processes running at any one time.

Virtual memory space for a given application has been improved from 32 MB of virtual address space per process to 2 GB of address space per process. Apple Most Linux software development tasks for embedded systems are done in a cross development environment. This environment consists of a host and a target.

Linux has very high security levels

Very high standards, due to its ground breaking concepts.

Linux went through and overly excessive growth, for the fact that is uses desktop os and a server platform

Linux is a modular operating system that is available in the source code

Linux is documented outstandingly and offers embedded multitasking operation as well as an advanced programming interface (API). Linux Mac iOS & OSX Linux Windows UP HEADS Linux is well known as a Linux operating system without MMU, which is more suitable for embedded systems back at that time.

Embedded system, memory management varies from system to system, as you have your custom address space, custom peripheral devices and memory chips.

The porting of kernel may fail if the memory management is not carefully handled.
Application memory management is the process of allocating memory during your program’s runtime, using it, and freeing it when you are done with it.

Good programs use as little memory as possible.

Memory management can also be seen as distributing ownership of limited memory resources among many pieces of data and code.

Manage your application’s memory by managing the life cycle of objects and freeing them when they are no longer needed.

Although memory management is typically considered at the level of an individual object, your goal is actually to manage object graphs.

You want to make sure that you have no more objects in memory than necessary. The process of allocating memory during each program and run time, using it, and freeing it. Memory management in Windows Embedded OS are a pieces of hardware that are bonded closely with CPU to provide memory management functionality for programs, data, files, software and more.

Windows Embedded operating systems can function in two modes:

Real Mode: effective address are used to access physical memory directly.

Virtual Mode: effective address are translated into physical address to access physical memory by the virtual-memory management hardware in micro blaze. Embedded OS Memory Management Embedded Operating System Memory Management SEVEN-UP When the OS is done executing, or managing its storage/memory the program/processing will begin. Look up for virtual address in page table. External and Internal Fragmentation Internal fragmentation OS memory First-fit – the process is placed in first available hole large enough to hold it, allowing the operating system to make a decision quickly.

Best-fit – the process is placed in the hole that fits it most closely, leaving little space unused but creating additional management overhead (searching for the best fit) and leaving small holes that cannot be used by other processes.

Worst-fit – the process is placed in the largest possible hole regardless of size, potentially leaving enough space for another program but again creating additional management overhead (searching for the worst fit) and potentially leaving smaller holes that cannot be used by other processes The Windows OS provides different levels of memory management.
Full transcript