Skip to main content

Memory Management Operating System

Inside Operating System
 
Memory Management
 
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.
 
The first task requires the operating system to set up memory boundaries for types of software and for individual applications.
Image result for memory management operating system
 
As an example, let's look at an imaginary small system with 1 megabyte (1,000 kilobytes) of RAM. During the boot process, the operating system of our imaginary computer is designed to go to the top of available memory and then "back up" far enough to meet the needs of the operating system itself. Let's say that the operating system needs 300 kilobytes to run. Now, the operating system goes to the bottom of the pool of RAM and starts building up with the various driver software required to control the hardware subsystems of the computer. In our imaginary computer, the drivers take up 200 kilobytes. So after getting the operating system completely loaded, there are 500 kilobytes remaining for application processes.
 
When applications begin to be loaded into memory, they are loaded in block sizes determined by the operating system. If the block size is 2 kilobytes, then every process that is loaded will be given a chunk of memory that is a multiple of 2 kilobytes in size. Applications will be loaded in these fixed block sizes, with the blocks starting and ending on boundaries established by words of 4 or 8 bytes. These blocks and boundaries help to ensure that applications won't be loaded on top of one another's space by a poorly calculated bit or two. With that ensured, the larger question is what to do when the 500-kilobyte application space is filled.
 
In most computers, it's possible to add memory beyond the original capacity. For example, you might expand RAM from 1 to 2 megabytes. This works fine, but tends to be relatively expensive. It also ignores a fundamental fact of computing -- most of the information that an application stores in memory is not being used at any given moment. A processor can only access memory one location at a time, so the vast majority of RAM is unused at any moment. Since disk space is cheap compared to RAM, then moving information in RAM to hard disk can greatly expand RAM space at no cost. This technique is called virtual memory management.
 
Disk storage is only one of the memory types that must be managed by the operating system, and is the slowest.
 
Ranked in order of speed, the types of memory in a computer system are:
 
• High-speed cache
 
This is fast, 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
 
This is the RAM that you see measured in megabytes when you buy a computer.  
 
• Secondary memory
 
This is most often some 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. 
 
The operating system must balance the needs of the various processes with the availability of the different types of memory, moving data in blocks (called pages) between available memory as the schedule of processes dictates.

Comments

Popular posts from this blog

Voice Support Executive Jobs in Thane – 12th pass

Amazon currently hiring Marathi Voice Support Executive Job in Thane Maharashtra for 12th pass freshers who had fluency in Marathi or Hindi or English language can apply online with ease. Post: Voice Support Executive – Freshers Department: Customer Support Work location: Thane Maharashtra (candidate may get nearby branch of Mumbai ) Education: 12th pass and above Language Preference : Marathi / HI_IN / EN_IN Salary: 12,000 to 17,000/- per months Candidate who cleared 12th exam and looking for tele-calling job in Thane or back office jobs in Thane area for freshers, can apply jobs at amazon over here. Basic need to enrol for Amazon jobs in Thane: • Firstly, good in talk which is communication skills should be excellent in any of Marathi, or English. • Must be able to handle telephonic software support, should have computer knowledge. • Candidate should be able to handle the voice calls from local customers of Maharashtra state in Marathi or English Language. • Problem-solving ...

how to use Java code from Python using JPype:

  Sure, here are the complete steps to use Java code from Python using JPype: Install JPype: You can install JPype using pip by running the following command in your command prompt or terminal: Copy code pip install jpype1 Set up your Java environment: To use JPype, you'll need to have a Java Development Kit (JDK) installed on your system. You can download the latest JDK from the Oracle website. Write your Java code: Write your Java code in a text editor or an Integrated Development Environment (IDE) such as Eclipse, IntelliJ, or NetBeans. For example, you could write a simple Java class that prints "Hello, World!" to the console: java Copy code public class HelloWorld { public static void main (String[] args) { System.out.println( "Hello, World!" ); } } Compile your Java code: Compile your Java code using the javac command. Open your command prompt or terminal and navigate to the directory where your HelloWorld.java file is ...

Booting! What is this?

Booting! What is this? What is Booting? Booting  (booting up) is a bootstrapping process that starts operating systems when the user turns on a computer system. A boot sequence is the set of operations the computer performs when it is switched on that loads an operating system.   When you turn on the power to a computer, the first program that runs is usually a set of instructions kept in the computer's read-only memory ( ROM ). This code examines the system hardware to make sure everything is functioning properly. This power-on self test ( POST ) checks the  CPU , memory, and basic input-output systems ( BIOS ) for errors and stores the result in a special memory location. Once the  POST  has successfully completed, the software loaded in  ROM  (sometimes called the  BIOS  or firmware) will begin to activate the computer's disk drives. In most modern computers, when the computer activates the hard disk drive, it finds the first piec...