Great Deal! Get Instant $25 FREE in Account on First Order + 10% Cashback on Every Order Order Now

About this Assignment In this project, you will use the what you have studied in the chapter Memory Management & Operating Systems to emulate how operating systems manage memory paging, allocation,...

1 answer below »

About this Assignment
In this project, you will use the what you have studied in the chapter Memory Management & Operating Systems to emulate how operating systems manage memory paging, allocation, deallocation and replacement. Upon completion of this project you will be able to:
· Describe how operating systems manage memory
· Use simple codes to emulate basic functionalities of operating systems
Sources
This assignment covers material presented in the chapter 'Memory Management & Operating Systems'. You can refer particularly to the following lessons in order to help you working through your solution:
· Memory Allocation Schemes: Definition & Uses
· Paged Memory Allocation: Definition, Purpose & Structure
· Memory Deallocation: Definition & Purpose
· Page Replacement: Definition & Algorithms
· Memory Management (MEM) Coding: Analysis & Example
Prompt
Consider the below settings to begin this project and keep them in mind:
Total Memory size = 20 Kbyte
Page size = 1 Kbyte
Run the following list of jobs given the above considerations.
    Job ID
    Start Time
    Job required size
    Execution interval
    Job state at the end of the interval
    1
    1
    2
    7
    End
    2
    2
    3
    8
    Sleep
    3
    3
    4
    6
    End
    4
    4
    3
    6
    Sleep
    5
    5
    2
    9
    Sleep
    6
    6
    3
    6
    Sleep
    7
    7
    2
    6
    Sleep
Using the functions you studied in the previously mentioned code that implement the different allocation, deallocation and replacement schemes, try three different scenarios in order to manage memory allocation for the following jobs
    Job ID
    Start Time
    Job required size
    Execution interval
    Job state at the end of the interval
    8
    8
    3
    4
    Sleep
    9
    9
    5
    5
    Sleep
    10
    10
    2
    8
    Sleep
    11
    11
    4
    6
    End
    12
    12
    6
    5
    Sleep
    2
    13
    3
    6
    End
    4
    13
    3
    4
    Sleep
    13
    13
    5
    3
    End
    7
    13
    2
    3
    End
    9
    17
    4
    4
    Sleep
    10
    19
    2
    11
    End
    6
    19
    3
    6
    End
    5
    20
    2
    10
    Sleep
    4
    21
    3
    12
    Sleep
    12
    22
    6
    13
    End
    8
    22
    3
    9
    End
    9
    28
    5
    11
    End
    5
    33
    2
    3
    Sleep
    4
    34
    3
    10
    End
    5
    38
    2
    10
    End
Show the memory state for the different scenarios and analyze which choice is the best. Discuss the impact that Linux verses Windows might have on the ending memory state.

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
    Job ID
    Start Time
    Job required size
    Execution interval
    Job state at the end of the interval
    1
    1
    2
    7
    Sleep
    2
    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 transfe
ed to the memory in time interval 12
· File required to stay in memory up to interval 16
Answered 6 days AfterFeb 23, 2022

Solution

Chirag answered on Mar 02 2022
69 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here