9. Please describe the difference between segmentation and paging approaches for user program memory allocation (20 points)
Added by James B.
Close
Step 1
g., code, data, stack). Paging divides the address space into fixed-size blocks called pages. Show more…
Show all steps
Your feedback will help us improve your experience
Chandra Jain and 91 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
1. Describe and label the parts of PAGING and SEGMENTATION. 2. What are the similarities and differences between the two?
Chandra J.
13. Explain the basic method of segmentation. How is it different from paging? What is compaction? (In operating system)
Haricharan G.
Write a C/C++ program to simulate the Paging technique of memory management. Following steps should be implemented in the program: 1. Ask the user to enter the memory size. 2. Ask the user to enter the page size. 3. Display the number of pages in memory according to the acquired data. 4. Ask the user to input the number of processes and pages required for each process. 5. Enter the page table of each process. 6. If enough memory is available, assign memory to each process; otherwise, display the message "Memory is Full". 7. Compute and display the physical address of a memory address by asking the user to enter the process number, page number, and offset. 8. If the user inputs correct data, compute and display the corresponding physical address; otherwise, display an error message. The output of the program should be as follows: saleha@ubuntu:~/Desktop$ gcc paging.c saleha@ubuntu:~/Desktop$ ./a.out Enter the memory size: 1000 Enter the page size: 100 The number of pages available in memory are: 10 Enter the number of processes: 3 Enter the number of pages required for p[1]: Enter the page table for p[1]: 8 6 9 5 Enter the number of pages required for p[2]: 5 Enter the page table for p[2]: 1 4 5 7 3 Enter the number of pages required for p[3]: 5 Memory is Full Enter Logical Address to find Physical Address Enter the process number, page number, and offset: 2 360 The Physical Address is: 760 saleha@ubuntu:~/Desktop$
Madhur L.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD