subject

Your simulator will prompt the user for the size of the memory and then the memory management policy (and associated parameters) information. The Memory Size (an integer) denotes the capacity of the main memory in your simulation (it can be interpreted as a multiple of Kbytes). The Memory Management Policy can be:

1. VSP: Variable-Size Partitioning (Contiguous Allocation). In this case, there will also be a policy parameter can be either 1, 2 or 3, encoding the algorithm used for choosing among eligible "memory holes" when moving a process to the memory (1: First-Fit, 2: Best-Fit, 3: Worst-Fit).

2. PAG: Paging. In this case, the policy parameter will denote the page size (consequently, also the frame size). You can assume that the Memory Size will always be a multiple of the page (hence, frame) size.

3. SEG: Segmentation. In this case, the policy parameter can be either 1, 2 or 3, denoting the algorithm used for choosing among eligible "memory holes" when moving individual segments to the memory (1: First-Fit, 2: Best-Fit, 3: Worst-Fit).

As an example, to define the memory size to be 2000 kbytes and the memory policy to be Variable-size partitioning with Worst-fit, the interaction would be the following (simulator prompts in boldface, user responses in italics):

Memory size: 2000

Memory management policy (1- VSP, 2- PAG, 3- SEG): 1

Fit algorithm (1- first-fit, 2- best-fit, 3- worst-fit): 3

If the policy is PAG, prompt for a page/frame size (rather than a fit algorithm).

At this point, you will prompt the user for the name of a workload file. This file will first have an integer value N that tells you how many processes are defined in the file. The characteristics of each individual process will include a unique process id on the first line, the time it is submitted to the system (Arrival Time) and its lifetime after it is admitted to the main memory (Lifetime in Memory) on the second line, and finally, its memory requirements (Address Space). These process specifications will be separated by a single blank line. Processes in the file will be listed in arrival order. If two processes have the same arrival time, the process listed first in the file goes on the input queue first. See the online examples for details.

The Address Space line is a sequence of one or more integers separated by a single blank. The first integer gives the number of 'pieces' of memory on the line. This sequence denotes the total size of the address space of the process. For VSP and PAG, you simply sum these integers to get the overall space requirement. For SEG, the list of numbers is the size of the individual segments of the process. As an example, if Memory Management Policy is PAG and Address Space is "3 500 300 200", then the process has a total address space of 1000 K for the purposes of your simulation. If Memory Management Policy is SEG then the process has three segments: the first segment is 500 K, while the second and third segments are 300 K and 200 K, respectively.

Note that since the memory is limited, there is no guarantee that a process will be admitted to the memory as soon as it arrives; thus it may have to wait until the system can accommodate its memory requirements. The lifetime in memory information for a given process defines how long the process will run ONCE IT HAS BEEN GIVEN SPACE IN MAIN MEMORY. If a process is submitted to the system at time = 100 with Lifetime in Memory = 2000, but isn’t admitted to the memory until time = 1500, then it will complete at time = 1500 + Lifetime in Memory = 3500. The memory space for a process will be freed by the memory manager when it completes.

Your simulator must generate output (to the screen) that explicitly shows the trace of important "events" that "modify" the memory contents and input queue, including:

· Process arrival

· Process admission to the main memory

· Process completion

Whenever there is a change in the memory map or the input queue, your program must also display the updated contents of the memory map and/or input queue. Please make sure to visit Blackboard for sample input files and the corresponding output files that illustrate the expected format. When the simulation terminates (when there are no more processes in the input queue or time reaches 100,000).

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:00
Two technicians are discussing the common u-joint. technician a says its input and output speeds should be equal. technician b says that it normally has two yokes. which technician is correct?
Answers: 1
question
Computers and Technology, 24.06.2019 03:00
What is one potential problem associated with an organization purchasing new technology early in its lifecycle
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
You are most likely to automatically encode information about
Answers: 1
question
Computers and Technology, 24.06.2019 11:40
100 pts. first person gets brainliest
Answers: 2
You know the right answer?
Your simulator will prompt the user for the size of the memory and then the memory management policy...
Questions
question
Chemistry, 03.03.2020 23:33
question
Mathematics, 03.03.2020 23:33
Questions on the website: 13722363