How to execute SPEC95 benchmarks in Simplescalar?

Let us see how to run the SPEC95 benchmarks (little endian) namely compress95, anagram, go, cc1 and perl in Simplescalar simulator software. Each and every benchmark has a corresponding input file that specifies the input to the program and an output file which we can use to verify if our test was successful. Also we will be writing the output of our simulation to a file with a .out extension and we will be printing the execution trace with all the run statistics to a file with a .trace extension.

The little endian version of the benchmarks and the input and output files can be download from the below location. After extracting the archive,  place the folder BenchMarks_Little in the simplesim-3.0 folder of your simplescalar installation folder. All the benchmarks shall be executed from the simplesim-3.0 directory.

BenchMarks_Little.tar.gz

compress95:

The below command will execute the compress95 benchmark and print the output to compress95.out and log the execution trace to compress95.trace in the Results folder

./sim-outorder BenchMarks_Little/Programs/compress95.ss < BenchMarks_Little/Input/compress95.in  2> BenchMarks_Little/Results/compress95.trace > BenchMarks_Little/Results/compress95.out

go:

The below command will execute the go benchmark and print the output to go.out and log the execution trace to go.trace in the Results folder

./sim-outorder BenchMarks_Little/Programs/go.ss 50 9 BenchMarks_Little/Input/2stone9.in  2> BenchMarks_Little/Results/go.trace > BenchMarks_Little/Results/go.out

anagram:

Before executing the anagram program place the words file from the Input folder in the simplesim-3.0 directory. The below command will execute the anagram benchmark and print the output to anagram.out and log the execution trace to anagram.trace in the Results folder

./sim-outorder BenchMarks_Little/Programs/anagram.ss words < BenchMarks_Little/Input/anagram.in  2> BenchMarks_Little/Results/anagram.trace > BenchMarks_Little/Results/anagram.out

cc1:

The below command will execute the cc1 benchmark and print the output to 1stmt.s in the Programs folder and log the execution trace to cc1.trace in the Results folder

./sim-outorder BenchMarks_Little/Programs/cc1.ss -O BenchMarks_Little/Input/1stmt.i 2> BenchMarks_Little/Results/cc1.trace

perl:

Before executing the perl program place the perl-tests.pl file from the Input folder in the simplesim-3.0 directory. The below command will execute the perl benchmark and print the output to perl.out and log the execution trace to perl.trace in the Results folder

./sim-outorder BenchMarks_Little/Programs/perl.ss < perl-tests.pl 2> BenchMarks_Little/Results/perl.trace > BenchMarks_Little/Results/perl.out

References:

http://www.simplescalar.com/
http://www.igoy.in/simplescalar-installation-made-simple/
http://users.ece.gatech.edu/~hamblen/4100/course/simplescalar/Spec95%20Benchmark%20Command%20Lines.htm
http://www.spec.org/osg/cpu95/

The MegaPixel (MP) Rating of a Digital Camera

The resolution of a digital camera is perceived to be proportional to its pixel count. A digital image is nothing but a continuous arrangement of pixels or picture elements. Resolution is expressed as the number of horizontal pixels multiplied by the number of vertical pixels (E.g. 1600x1200 => 1.92 MP). Digital cameras record visual image with the help of CCD or CMOS sensors and each pixel of the output image on screen will map to a specific pixel on the image sensor in the digital camera.

Digital Camera Resolution Formula MegapixelDigital Camera CCD CMOS PixelMegapixel Resolution Myth

In order to improve the resolution, one tends to simply increase the pixel count. The more the number of pixels the more details the image will provide and the more it will resemble to the real world image. But for a given image or sensor area, increasing the number of pixels tends to saturate at a certain point and further increase in pixels doesn't mean much to the human eye. A common man will not be able to accurately identify the difference in quality of a usual 10cm x 15cm photograph taken by digital cameras having resolution greater than 5 MP. But higher pixel count will be beneficial only when you are trying to generate a bigger picture from a smaller one or when you are trying to crop a particular portion of the picture and try to enlarge it.

There are some common misinterpretations of resolution which a camera manufacturer might try to exploit. Since resolution is more like a square function (length x height), gain in pixel count will not be directly related to resolution gain. Also some pixels on a digital camera sensor will be used for other compensation mechanisms and not really for capturing the image. Companies may include this overhead in order to bump up the pixel rating. In color displays such as LCD screens, subpixel rendering is used in which a single pixel will be composed of a three sub pixels (R, G & B) and so the pixel count should never be exaggerated. The size of the camera sensor also plays a part in deciding resolution, sharpness and image quality for digital cameras having the same pixel rating apart from other factors like lens quality, sensitivity of the image sensors, optical zoom capability, shutter speed, etc.

Triangulation/Trilateration in GPS

Global Positioning System (GPS) has made a tremendous impact in our life and has become immensely popular in recent times. GPS receivers are omnipresent and the applications of GPS extend beyond technology purposes. At the core of this wonderful technology is a simple mathematical/geometrical concept called trilateration or triangualation. Imagine you are lost one day and you don't even know if you are on the northern or southern hemisphere. All that you have is a GPS device with you to locate yourself.

To start off, you are situated somewhere on the surface of the earth (Now don't tell that the earth is not a perfect sphere). Your GPS device receives position and time (sent) information from GPS satellites and the distance is calculated based on the standard distance-time formula given the fact that radio signals from GPS satellites travel roughly with the speed of light. The key problem here is that you don't know the direction but you only know the distance from a satellite.





Consider the blue sphere as the earth E. We are trying to locate a point P on the surface of the earth.

When your GPS device calculates the distance x from satellite say S1, you know that you might be located anywhere on the surface of a sphere of radius x with S1 as the centre. But you don't know in which precise angle you are located in the 360 degrees. Now when your GPS device gets hold of another satellite S2 and calculates the distance y from it, you can apply the geometric principle that spheres intersect in a perfect circle to narrow down your position to somewhere on the perimeter of a circle. Now, the point at which this circle intersects with the earth should give your location on earth. Now when your GPS device calculates the distance z from a third satellite S3, the sphere of radius z with S3 as centre will intersect the circle of intersection of the other two spheres at two points. Only one of those two intersection points will actually lie on the surface of the earth and the other point will lie in space. The point on the surface of the earth will give your location on earth.

GPS satellites transmit time information derived from high accuracy atomic clocks but the GPS receivers cannot afford such high precision clocks. There are several factors that might introduce errors in GPS like clock inaccuracies, rounding errors, multipath and atmospheric effects, etc. Since the earth is also not a perfect sphere, GPS receivers generally look to four or more satellites to compute the precise location.

AppFabric Caching (aka Velocity Caching) - Microsoft .NET

Caching is an essential component to speed up any web application by minimizing the number of trips to the actual database. AppFabric Caching or Velocity caching is a distributed caching system that leverages the caching infrastructure available across a cluster of cache servers efficiently to enhance application performance as well as scalability. The secret behind the effectiveness of appfabric caching lies in the fact that duplicate data is not cached by the cache cluster because whenever data is requested by any client, it is first looked up in the unified logical cache and if available the data that reaches the client can be from the physical cache memory of any of the servers in the cluster.
Appfabric Velocity Caching Architecture Design Overview Diagram

Velocity caching is implemented in a synchronized tier and the service can be accessed across the network with the cache servers in the cluster running the process (DistributedCache.exe). Even though several cache servers contribute to the shared cache memory, there is a common gateway for data to enter and exit in the form of a centralized and shared cache. The distributed cache is handled in code with the help of simple get and put methods that will retrieve, insert, update or delete data items in the unified logical cache as a whole. The programmer is not worried about the internal implementation or the physical location of cached data in the cluster.

Notable Aspects:
  • Each server in the cluster stores the session object data in its RAM and does not write it to disk for obvious reasons
  • No code change or new code has to be incorporated by the programmer and all that is needed is to change a configuration setting in order to activate velocity caching
  • Distributed caching means multiple web servers can each run an instance of the same application which helps in load balancing
  • Both web server (IIS) and cache server (Appfabric) can be deployed on a single application server running on Windows Server OS
  • Turning on the high-availability feature helps mitigate situations when a server in the cluster goes down by storing a synchronous secondary copy of the data item on a different server
One of the key challenges for the implementation of velocity caching involves managing parallel access to data that changes rapidly and velocity caching offers different concurrency models suitable for the concerned application. Controlling access to sensitive data among the clients is another challenge which is controlled by limiting access to such data with encryption or restricted accounts. Appfabric caching attempts to maximize the benefits from the underlying computer infrastructure with the help of a distributed yet shared architecture to provide value for both application developers and end users. Things can only get better from here.

Lava A9 Mobile Phone - Personal Review

Lava A9 India 3.2MP Camera Review

Lava A9 Dual Sim Phone is a handsome instrument with an assortment of useful features and applications at an affordable price. The phone looks solid with a hard metal body and a smooth keypad which gives an elegant appearance to the phone. Lava A9 comes with a 3.2MP camera that lets you take pictures and shoot videos but the image quality is very poor and doesn't live up to the expectations of a 3.2MP camera. The zooming option is also limited and the camera is a big let down in A9. There is 64MB internal phone memory and the phone will support up to 8GB Micro SD Cards. Listening to music on this phone is not a pleasant experience on the loud speaker but the audio quality is slightly better while hearing it on the ear phone. FM reception is also not satisfactory.

Having said the above glitches in the phone, Lava A9 is otherwise an excellent phone with an impressive profile. The phone comes with both EDGE and GPRS support enabling you to connect with the internet through the pre-installed Opera Mini web browser. Nimbuzz is a refreshingly new application that comes pre-installed with Lava A9 with which you can make calls or chat with your friends over the internet sans the conventional call charges. The phone with a user friendly interface has all the features we expect including bluetooth, java games, Ebook reader, Email support, MP3/MP4 Player, etc. Apart from the usual audio and video recorder the phone also lets you record streaming FM audio in any of the three formats WAV/AWB/AMR. You can also search your contacts with phone number as the search criterion which is handy at some situations. You can also integrate the phone with your PC with the help of Lava A9 PC Suite that can be downloaded from LavaMobiles.com website. Apart from the camera and loud speaker anomalies, LAVA A9 is a good looking phone with powerful features and provides value for money.

Samsung Corby S3653 - Mobile Phone Review

Samsung Corby S3653 Review FeaturesI had a chance to handle this phone after my friend bought it last week. As far as the design is concerned, holding the phone in my palms was a bit awkward considering the width (56.5 mm) of the phone but it is an advantage when it comes to a bigger screen experience. The phone with a plastic body is light weight but still sturdy and looks plain and simple. From the design perspective there is a dedicated keypad lock/unlock button on the right side. Virtual keypad means minimum buttons on the front panel and maximum screen size. The capacitive touchscreen performs well and the interface is intelligently designed for easy navigation of menu items. The menu icons can be docked on the left side for quick access or pulled out from the menu which spans 3 pages that can be easily flicked through. The 2MP camera shoots well in good lighting conditions and the single finger image zoom option is handy while viewing pictures. The phone has a gamut of applications and widgets to integrate with the internet and the social networking world. The sound quality is good and watching videos in a wide screen is comforting as well.