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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 02:00, HannahVance99
In the context of an internet connection, llc stands for leased line connection liability limited company local loop complex local loop carrier
Answers: 1
image
Computers and Technology, 23.06.2019 16:00, lokaranjan5736
Write a grading program for a class with the following grading policies: a. there are two quizzes, each graded on the basis of 10 points. b. there is one midterm exam and one final exam, each graded on the basis of 100 points. c. the final exam counts for 50% of the grade, the midterm counts for 25%, and the two quizzes together count for a total of 25%. (do not forget to normalize the quiz scores. they should be converted to a percentage before they are averaged in.) any grade of 90 or more is an a, any grade of 80 or more (but less than 90) is a b, any grade of 70 or more (but less than 80) is a c, any grade of 60 or more (but less than 70) is a d, and any grade below 60 is an f. the program will read in the student’s scores and output the student’s record, which consists of two quiz and two exam scores as well as the student’s average numeric score for the entire course and final letter grade. define and use a structure for the student reco
Answers: 2
image
Computers and Technology, 23.06.2019 19:00, Heyitsbrandi
Now you’re on your own. include a short summary of this section with plots in your lab report. write a matlab script file to do steps (a) through (d) below. include a listing of the script file with your report. 1 the soundsc(xx, fs) function requires two arguments: the first one (xx) contains the vector of data to be played, the second argument (fs) is the sampling rate for playing the samples. in addition, soundsc(xx, fs) does automatic scaling and then calls sound(xx, fs) to actually play the signal. mcclellan, schafer, and yoder, dsp first, 2e, isbn 0-13-065562-7. prentice hall, upper saddle river, nj 07458. c 2015 pearson education, inc. 4 mcclellan, schafer and yoder, signal processing first. prentice hall, upper saddle river, new jersey, 2003. c 2003 prentice hall. (a) generate a time vector (tt) to cover a range of t that will exhibit approximately two cycles of the 4000 hz sinusoids defined in the next part, part (b). use a definition for tt similar to part 2.2(d). if we use t to denote the period of the sinusoids, define the starting time of the vector tt to be equal to t , and the ending time as ct . then the two cycles will include t d 0. finally, make sure that you have at least 25 samples per period of the sinusoidal wave. in other words, when you use the colon operator to define the time vector, make the increment small enough to generate 25 samples per period. (b) generate two 4000 hz sinusoids with arbitrary amplitude and time-shift. x1.t / d a1 cos.2
Answers: 1
image
Computers and Technology, 24.06.2019 00:30, Auttyrain3929
Afiling system in which an intermediary source of reference, such as a file card, must be consulted to locate specific files is called a(n) system. a. shelf filing b. direct filing c. indirect filing d. shingling
Answers: 1
You know the right answer?
Your simulator will prompt the user for the size of the memory and then the memory management policy...

Questions in other subjects:

Konu
English, 06.07.2021 16:10
Konu
English, 06.07.2021 16:10