Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Operating System code programming Prompt In this project, assume that files are stored on the hard disk using linked storage allocation. Your task is to

Operating System code programming

image text in transcribed

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 Job ID Start Time Job required size Execution interval Job state at the end of the interval 1 1 2 7 Sleep 2 3 8 Sleep 3 3 4 6 Sleep 4 4 3 6 Sleep 5 5 2 9 Sleep 6 6 3 6 Sleep 7 7 2 6 Sleep 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 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 Job ID Start Time Job required size Execution interval Job state at the end of the interval 1 1 2 7 Sleep 2 3 8 Sleep 3 3 4 6 Sleep 4 4 3 6 Sleep 5 5 2 9 Sleep 6 6 3 6 Sleep 7 7 2 6 Sleep 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Object Databases The Essentials

Authors: Mary E. S. Loomis

1st Edition

020156341X, 978-0201563412

More Books

Students also viewed these Databases questions