读书人

相干java的程序

发布时间: 2012-12-28 10:29:04 作者: rapoo

有关java的程序
Objective:
To write a program that will simulate a program execution to evaluate a computer system’s cache performance based on hit ratio and effective access time. Introduction:
Improving run-time performance is the main purpose behind the use of cache memory. A cache hit occurs when a word that is being referenced is found in the cache and the word is immediately forwarded to the CPU.
A cache miss occurs when the referenced word is not found in the cache and the entire block that contains the referenced word is read into the cache from main memory.
Hit ratio and effective access time are two measures that are used to characterize the performance of a cache memory.
The time per hit is the cache access time and the time per miss corresponds to the time to transfer a block of memory to the cache.
In addition to the sequence of memory locations a program accesses during execution, another factor that determines the performance of cache memory is how memory addresses are mapped to cache memory addresses.
Three schemes that have been developed for this purpose are: direct-mapped, set-associative mapped, and fully associative mapped.
For this project, you will write a program that will calculate the hit ratio and effective access time for a given program using the direct-mapped cache memory mapping scheme.
A program is defined by the sequence of memory locations it accesses. Description:
Input:
Your program should give the user the choice to configure the system, run a simulation using an input file, or quit.
To configure the system, the program should prompt the user for memory and cache configuration parameters:
Block/Cache line size (# of words)
Cache memory size (# of cache lines)
Cache access time (nsec)
Memory access time (nsec)
Given the above configuration, the program should then allow the user to run a simulation by first prompting the user for the filename representing a program.


An input file should be a text file containing integer values representing the sequence of memory locations the program accesses. You are expected to define the format of the input file your program will accept.
Output:
The program should calculate and display the resulting hit ratio and effective access time for the given input file.
Analysis:
Run simulations using different input files and different cache/memory configurations.
You are expected to tabulate and analyze your simulation results.



[解决办法]
各位高手好,我就是这个楼主,我刚注册的,不知道怎么补充问题,这个问题中的hit radio和 effective access time的公式在这个网址,
http://zhidao.baidu.com/question/497463943.html?quesup2
实在不好意思麻烦各位高手还要去这个网址看公式,这个网址楼主保证就对不是什么广告,也是楼主在百度知道提问的,可是到目前还没人回答,眼看着马上就要交作业了,麻烦各位帮帮忙吧
[解决办法]
不鼓励伸手党。楼主你自己看懂题目想考察什么了没有先。。。
[解决办法]

引用:
不鼓励伸手党。楼主你自己看懂题目想考察什么了没有先。。。


lz加油!
[解决办法]
引用:
不鼓励伸手党。楼主你自己看懂题目想考察什么了没有先。。。
不好意思,点错了,呜呜呜,它这个是不是说用Java写一个能够打开文件的程序,然后再这个文件中存储公式所用的变量呢,什么是configure the system
[解决办法]
null
[解决办法]
null

读书人网 >Eclipse开发

热点推荐