Storage management of experimental five operating systems

Source: Internet
Author: User

Storage management of experimental five operating systems

First, the purpose of the experiment

Continuous memory allocation forms many "fragments", although many fragments can be stitched together into usable chunks of space through a "compact" approach, with a significant overhead. If you allow a process to be loaded directly into many non-contiguous partitions, you do not need to be "compact". Based on this idea, a discrete distribution method is produced.

If the base unit of a discrete allocation is a page, it is called paging storage management, and if the base unit of a discrete allocation is a segment, it is called a segmented storage management method.

In the way of paging storage management, if the page redemption function is not available, it is called basic paging storage management, or pure paging storage management, it does not have the function of supporting virtual memory, it requires that each job is loaded into memory to run.

This experiment through the program simulation operating system basic paging storage management, further understand the principle and characteristics of this memory allocation method, deepen the mastery of theoretical knowledge.

Second, the experimental requirements

1, the C language or the Java language program to simulate the operating system of memory basic paging storage Management mode

2, the program to be able to properly "memory" for "allocation" and "recycling", can accept user input, display memory allocation, and have a certain degree of fault-tolerant ability.

3, each person completes the experiment content independently on time.

Iii. contents of the experiment

This experiment assumes that the memory space has been divided into blocks, the target program does not care about the memory block size and other underlying details, simply by the algorithm to allocate memory blocks. The program should implement the following functions:

1, memory initialization. Assuming that there are N of memory blocks, the initialized memory space should be partially used, which can be done with random numbers or other algorithms inside the program.

2, the program should be able to accept user input process information, and allocate memory for it, return the allocation results (success or failure), note that here should consider the illegal input and processing accordingly.

3, the program can reclaim the memory space occupied by the user-specified process, therefore, the program may need to assign each process a unique process number and give detailed information.

4, can visually and reasonably display the memory allocation situation.

5, the program interface friendly, easy to operate and view the results of the operation.

Four. Experiment code

Five. Experimental summary

Storage management of experimental five operating systems

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.