GIDForums  

Go Back   GIDForums > Computer Programming Forums > C Programming Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 27-Apr-2008, 21:04
daichi123 daichi123 is offline
New Member
 
Join Date: Apr 2008
Posts: 5
daichi123 is on a distinguished road

need help with cache assignment~!


Hello people,

I have this assignment due in a few days and I am having trouble understanding and approaching it...starting from Part 1 below...

Part 1:

Create an address stream with good spatial locality but bad temporal locality called SpatialStream.txt. Next, create a stream that has good temporal locality but bad spatial locality called TemporalStream.txt. Each stream must have at least 100 accesses in it.

// What do they mean by creating an address stream with 100 accesses in it???
I have somewhat an idea of what spatial and temporal locality is but don't know how to interpret it to an address stream.. please help!

Part 2:

1.

Begin by writing a simple cache simulator in cache.c. This direct-mapped cache receives the cache size and line size for initialization.
2.

Write a simulator for the cache in cachesim.c. The simulator runs by reading in from a file. This file contains the address stream the cache sees. Each address is an integer, written in ascii characters. Each address represents an access into the cache. The simulator reports the # of accesses and miss rate at the end of the simulation.
3.

Run the simulation on each address stream with the following cache configurations:

Cache Size Line Size
64 4
64 2
64 1
128 4

Deliverables:

1. TemporalStream.txt
2. SpatialStrem.txt
3. Make two graphs - one that graphs the different address streams with varying sizebut constant line size, and another that graphs the different address streams with varying line size but constant size. Graph the miss rates.
4. cache.c
5. cachesim.c

Thank you everyone! Any help will be greately appreciated!
  #2  
Old 28-Apr-2008, 08:49
fred fred is offline
New Member
 
Join Date: Apr 2008
Posts: 3
fred is on a distinguished road

Re: need help with cache assignment~!


i also have no idea
  #3  
Old 06-May-2008, 17:40
Peter_APIIT Peter_APIIT is offline
Regular Member
 
Join Date: May 2007
Location: Malaysia
Posts: 400
Peter_APIIT is on a distinguished road

Re: need help with cache assignment~!


First and foremost, i also don't know what is spatial locality but bad temporal locality and good temporal locality but bad spatial locality but this may help.

http://www.cs.uiuc.edu/homes/snir/PDF/Temporal%20and%20Spatial%20Locality.pdf

Create 100 accesses in each stream - I just guess may be create at least minimum 100 character.

Stream is raw bytes.

Address stream - may be head of the stream because array has constant pointer(Same concept).

I hope this help.
__________________
Linux is the best OS in the world.
  #4  
Old 07-May-2008, 21:07
daichi123 daichi123 is offline
New Member
 
Join Date: Apr 2008
Posts: 5
daichi123 is on a distinguished road

Re: need help with cache assignment~!


thanks peter! unfortunately the assignment was due last week... but again, thanks!
 

Recent GIDBlogLast Week of IA Training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cache Simulator...PLZ HELP!! NatsoumiMaya C Programming Language 0 25-Apr-2008 03:32
C program for Cache Memory Simulation based on UNIX C ravi119 C Programming Language 2 30-Nov-2006 14:01
Re: Alternative PHP Cache (APC) admin Web Hosting Forum 0 04-May-2006 23:41
help direct mapped cache lovec++ Computer Software Forum - Windows 0 18-May-2004 21:11
what is the use of L1 and L2 cache? meet_raman Computer Hardware Forum 4 01-May-2004 12:45

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 15:43.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.