Article View: att.lang.c++
Article #273operating systems project
From: Juan
Date: Tue, 14 Apr 1998 00:00
Date: Tue, 14 Apr 1998 00:00
25 lines
1845 bytes
1845 bytes
In a multiprogramming environment, all the processes cannot reside
in main memory at all times, some of them will have to be swapped
out of the main memory and make room for another process which its
presence is required in main memory at the moment. There are many
page replacement algorithms which have different way to choose a
process which has to be swapped out of memory. A list and descriptions
of each algorithm is in Chapter 9 of your textbook. Once again
we are about to simulate an important part of any multiprocessing OS,
which is page replacement algorithms. We are only interested in FCFS,
OPT and LRU algorithms.
Your program should be able to do the following tasks:
1) Reads the reference string which has a maximum length of 20
integers, from an input file cs332p2.in
2) Reads the number of frames which could range from 1 to 5, from
second line of the same file in part 1.
An example of c332p2.in file could contain:
7 0 1 2 0 3 0 4 2 <-- reference string 3 <-- number of frames
3) Prints the number of page faults and contents of each page frame.
A sample output would look like: x denotes no page faultFCFS^^^^^
7 7 7 2 x 2 2 4 4
0 0 0 x 3 3 3 2
1 1 x 1 0 0 0
Any information on how to achieve this program would be greatly appreciated
Technical Details
Message-ID:
<6h10eq$bp4@news.webspan.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4ba,8df6ea28749e1d00,start X-Google-Attributes: gid10d4ba,public From: "Juan" <juan1@webspan.net> Subject: operating systems project Date: 1998/04/14 Message-ID: <6h10eq$bp4@news.webspan.net> X-Deja-AN: 344133451 X-Report-Abuse-To: abuse@mail.webspan.net NNTP-Posting-Date: 14 Apr 1998 20:53:46 EDT X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Organization: Pentium200 Newsgroups: att.lang.c++