Computers and Technology

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).

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 05:30, MOONCHILDSUGA
If you combine two cells into one, what action are you performing? a.  adding a new row or column      b.  splitting the cells      c.  removing a new row or column      d.  merging the cells
Answers: 2
image
Computers and Technology, 24.06.2019 18:20, 12375819
Use a while-end loop in a script file to calculate the sum of the first n terms of the series: summation sign on the top n bottom k=1 : )^k * k^2 +5k)/3^k show the script file and the two results of n = 10 and n = 20.
Answers: 2
image
Computers and Technology, 24.06.2019 18:30, HavenShort3075
These factors limit the ability to attach files to e-mail messages. location of sender recipient's ability to open file size of file type of operating system used
Answers: 1
image
Computers and Technology, 25.06.2019 16:30, kps26pd2mea
In which field of information technology do it professionals work directly with other employees to solve their general technology related issues?
Answers: 1
Do you know the correct answer?
Your simulator will prompt the user for the size of the memory and then the memory management policy...

Questions in other subjects:

Konu
Mathematics, 09.10.2019 14:30
Konu
Mathematics, 09.10.2019 14:30