Describe how operating systems manage files in memory
Ask Expert

Be Prepared For The Toughest Questions

Practice Problems

Describe how operating systems manage files in memory

About this Assignment

In this project, you will write code that emulates how operating systems manage interaction between files and memory. The code you are writing will be functions that provide interaction between the code you have seen in the chapters Memory Management & Operating Systems and File Management Systems. As the functionality you are developing is file management related, you are required to develop your code as methods in the file management class. Upon completion of this project you will be able to: 

Describe how operating systems manage files in memory 

Write simple codes to emulate basic functionalities of operating systems 

Prompt

In this project, assume that files are stored on the hard disk using linked storage allocation. Your task is to write a code that: 

1. Collects information about all the fragments of the file from the hard disc in order to calculate the total required space needed for the file in memory 

2. Calculates the space required to store the file in memory (For simplicity, you can assume that this space equals only to the total size of the file. Do not consider other related metadata) 

3. Allocates space in memory for the file. If needed, you can use the code you wrote in Assignment 1: Solving Memory Management Problems to liberate space in memory 

Use the following example as a use case to build your code: 

Total Memory size = 20 Kbyte 

Page size = 1 Kbyte 

Initial memory state 


Note that all processes are in sleep state at the end of their respective time intervals in the previous table. Your program should not be limited to the previous use case and you are required to test it against different other use cases. 

Here is the information related to the file: 

File size = 8Kbyte 

Disk bloc size= 1 Kbyte 

File initially allocated the following disk blocs: 8, 12, 1, 28, 11, 12, 4, 5 

File required to be transferred to the memory in time interval 12 

File required to stay in memory up to interval 16

Hint
Computer"how operating systems manage memory:To manage the memory, the operating system needs to keep track of three things, which is1. Total amount of physical memory present on the system.2. Amount of the physical memory currently being used.3. Amount of the memory available for allocation to a requesting process."...

Know the process

Students succeed in their courses by connecting and communicating with
an expert until they receive help on their questions

1
img

Submit Question

Post project within your desired price and deadline.

2
img

Tutor Is Assigned

A quality expert with the ability to solve your project will be assigned.

3
img

Receive Help

Check order history for updates. An email as a notification will be sent.

img
Unable to find what you’re looking for?

Consult our trusted tutors.

Developed by Versioning Solutions.