Færdiggjort

first fit and LRU algorithms (OS)

Note that each page is 100 bytes in length and the job is allocated 3 frames (i.e. f0..f2) in memory. "First-fit" placement strategy is used to place a new page in memory and "LRU" replacement strategy is used to replace an old page from memory.

## Deliverables

The objective of this assignment is to give you an opportunity to simulate some of the operations normally found in a paged computer system. The assignment is to write a program in C++ to simulate the following operations: (1) reference: used to indicate that a virtual address in a program is referenced. command: r a where r = reference, a = virtual address. The virtual address range is 0 .. 999. (2) print: used to print the contents of page table or memory. command: p x where p = print, x = p or m. If x = p, the contents of page table are displayed on the screen. If x = m, the contents of memory are displayed on the screen. Note that each page is 100 bytes in length and the job is allocated 3 frames (i.e. f0..f2) in memory. "First-fit" placement strategy is used to place a new page in memory and "LRU" replacement strategy is used to replace an old page from memory. You can use any data structures you like to implement the program. You can also use either the clock value approach or the stack approach to implement the LRU replacement algorithm. But it is required that you use only the LRU replacement algorithm to replace pages. The following shows a scenario of running the program, where user's input data is represented in boldface: >cpsc435p3 {an executable file} program starts running ....... please enter a command:r 276 please enter a commnad:r 18 please enter a command:r 281 please enter a command:r 987 please enter a command:r 695 please enter a command:r 409 please enter a command:p p page 4 is in frame 0 page 6 is in frame 1 page 9 is in frame 2 please enter a command:p m frame 0 contains page 4 frame 1 contains page 6 frame 2 contains page 9 please enter a command:q >

## Deadline information

10/30/2001

Evner: C programmering, Ingeniørarbejde, MySQL, PHP, Software Arkitektur, Software Testning

Se mere: lru program, use of data structures, use of algorithms in programming, use of algorithms, use of algorithm in programming, used structures, the algorithms, stack programming, stack in data structures, stack data structures, reference in computer programming, programming structures, programming job address, programming data structures in c, programming and data structures, programming and algorithms, programming and algorithm, program algorithms, os x programming, os programming

Om arbejdsgiveren:
( 73 bedømmelser ) United States

Projekt ID: #2830029

Tildelt til:

hardwiredvw

See private message.

$12 USD in 14 dage
(19 bedømmelser)
4.8

4 freelancere byder i gennemsnit $41 på dette job

vw139994vw

See private message.

$34 USD in 14 dage
(60 bedømmelser)
4.5
realgoodteam

See private message.

$85 USD in 14 dage
(12 bedømmelser)
3.5
dinario

See private message.

$34 USD in 14 dage
(16 bedømmelser)
3.1