• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey,
i have a problem but dont know where to start

i want to construct a program which manages a 0.25kb cache
i want to write a class organising the cache using direct mapping and one using fully associative

the program takes address references in the range 0 .. 1023
and determines whether a given address reference is a hit or miss.
It also computes the Miss rate every time a miss is encountered
and at the end displays of the cache contents.

it also assumes that the address holds 8 bytes

any help/pseudo code would be much appreciated

thanks
 
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by johnathan smith:
...any help/pseudo code would be much appreciated

thanks



Okay,....



there is more work to be done, first of which is problem re-statement - possibly letting the OO camp have a clean shot at your problem definition b4 beginning work.

//eof

[ April 29, 2007: Message edited by: Nicholas Jordan ]

Edit: direct mapping and one using fully associative

But a map is usually able to sort by some controllable order:

[ May 27, 2007: Message edited by: Nicholas Jordan ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic