Wednesday, May 19, 2010

Resistance is futile. You will be simulated.

Resistance is futile. You will be simulated. was the text printed (using a Star Trek font) on a limited number of t-shirts we had printed when I worked at Virtutech. The simulator is called Simics, and is a full-system simulator capable of simulator entire computer systems with sufficient fidelity that the simulated software is not aware that it is being simulated.

Raymond Chen recently posted an entry on his excellent The Old New Thing blog, titled If you can detect the difference between an emulator and the real thing, then the emulator has failed. This made remember a fun challenge once held at a party at Virtutech after I had left the company (I don't remember the occasion). There were two black screens displaying a Linux command prompt. One of the screens was connected to a physical PowerPC board, and the other was connected to a simulated PowerPC board. The task was then to decide, using the only the command lines of the two machines, which machine was simulated and which one was not.

Doing "cat /proc/cpuinfo" only revealed that both systems where running on PowerPC hardware (the output was different, but then only the people setting up the challenge new exactly which PowerPC hardware was being used), and the simulation was fast enough to not reveal anything performance wise. Now, I happened to have some insider info allowing me to solve the problem: Simics does not (or did not then) have any USB-support, which meant that the "lsusb" command should provide some crucial hints. Quite correctly, the simulated machine did not have any USB-devices, while the real hardware had a number of USB-related devices. I'm not sure if I won the challenge or not, but I remember a bunch of people standing around the terminal discussing different ways of beating the system.

19 comments:

怡潔向霖 said...

A good medicine tastes bitter. ..................................................

怡君 said...
This comment has been removed by a blog administrator.
江冠彭珮李佳宏陽筠 said...
This comment has been removed by a blog administrator.
珍昕珍昕 said...
This comment has been removed by a blog administrator.
江美娟江美娟 said...
This comment has been removed by a blog administrator.
姿柯瑩柯dgdd憶曾g智曾 said...

看到好文章心情就很好 ^^............................................................

劉明倫劉明倫 said...

死亡是悲哀的,但活得不快樂更悲哀。. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

吳庭 said...

It is no use crying over spilt milk.............................................................

陳璇竹陳璇竹 said...

人生有些波折,才能有些成長,所以不論順逆,凡是成長、成功的助緣,都應該心存感激。..................................................

張志亦劉美玲 said...

聰明人之所以不會成功,是因為他們缺乏了堅忍的毅力。.......................................................

賴成貞陳韻邦 said...

老天爺賦予了強者的能力,就是要他比弱者多擔待.......................................................

熙又陽辰 said...

Pay somebody back in his own coin...................................................................

凱許倫 said...

Make yourself necessary to someone..................................................................

麗文剛文剛文剛玲 said...

知識可以傳授,智慧卻不行。每個人必須成為他自己。. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

峻胡邦慧v帆 said...

心平氣和~祝你也快樂~~............................................................

翊翊翊翊張瑜翊翊翊 said...

培養健全孩子最好的方法是父母先成為健全的人。......................................................................

麗王王珠 said...

請繼續發表好文!加油加油再加油!............................................................

石JaquelynS_Whitesi白 said...

若有人問你成功時會不會記得他 試問若你失敗時他會不會記得你......................................................................

王怡迪 said...

君子立恆志,小人恆立志。................. ................................................