Tuesday, November 22, 2011

Columbus

http://www.cafaoh.org/dotnetnuke/LivingGuide/tabid/97/topic/Entertainment/Default.aspx
Entertainment



俄州地处美国中西部,北邻密歇根州和伊利湖(Lake Erie在宾州之西,印第安那州之东,南接肯德基州。距离西边的芝加哥6小时车程,与东边的纽约有9个小时车程,南下到田纳西州的大雾山国家公园(Great Smoky Mountains National Park‎)驱车也只7个小时。俄州虽然比不上东西两岸繁华热闹,但是旅游资源颇为丰富:无大山大江却有丘壑泉瀑,且四季分明,春有桃花秋有菊,夏可登山冬滑雪,不失为居家乐业之地。
下面分类简单介绍一下俄州旅游景点及娱乐活动场所。 详细情况请在相关网站查看。http://experiencecolumbus.com/也是一个非常有用的信息网站。


第一部分:户外娱乐休闲
哥伦布大型团体活动: 
1。亚洲节 Asian Festival):俄州最大的亚洲文化盛会,每年初夏在富兰克林公园(Franklin Park)举行,有来自亚洲国家的各种小吃,文化展览和表演。
网址:http://asian-festival.org/index.do 
2。中国节(China day):每年二月左右在哥伦布中文学校由俄州多个华人社团举办的弘扬中华文化的展览和演出。另有棋牌羽毛球乒乓球等竞技比赛。
中文学校网址:http://www.columbus-occs.org/index.html 
3。俄州节 Ohio State Fair):每年七八月份在Ohio Expo Center举办的农牧业大型露天展览。
网址:http://www.ohiostatefair.com/osf/osf1.htm 
4。中秋或新年晚会:每年由俄亥俄州立大学(OSU)中国学者学生会主办的室内表演秀。
OSU学生会会网址:http://csssosu.org/w/Welcome_to_CSSS 
5。代顿航空展(Dayton Air Show):每年七八月份在代顿举办的大规模航空展,也是美国最大航展之一。可以看到大部分美国退役和现役机种。压轴戏是美国空军雷鸟飞行表演队或者海军蓝天使飞行表演队的表演。
网址:http://www.usats.org/ 
6。俄亥俄大学万圣节游行 Athens Halloween Block Party):每年万圣节在俄亥俄大学(Ohio Univ.)所在城市Athens市中心群众自发举行的大型聚会。据称有一至三万人参加这个化装游行。午夜12点达到高潮。
2008年万圣节游行介绍:http://www.ohio.edu/students/upload/Halloween_Guidelines_Flyer_2008.pdf
7. Short North Gallery hops, 1st Saturday of each month start in April until October.
http://www.shortnorth.org/
公园/主题公园/动物园 
1Cedar Point Amusement Park:世界最大的过山车游乐场之一,在距离克利夫兰市西一小时车程的Sandusky市对面伊利湖的一个小岛上。一度有世界最高的一座过山车。网址:http://www.cedarpoint.com/ 
2。Paramounts Kings Island: 哥伦布南1小时车程的一个室外游乐场。规模比Cedar Point Amusement Park要小得多,但是小而全,对于不想开车太久也不太想挑战自己的朋友来讲是个好去处。网址: http://www.pki.com/
 3。俄州野生动物园(The Wilds):哥伦布东一个半小时开放式野生动物园。可以坐敞蓬大客车在户外游览两个小时。可以看到长颈鹿,麋鹿,梅花鹿等多种鹿类,牛类,骆驮,犀牛,金钱豹等。开阔的丘陵,河流湖泊,风景很漂亮。网址: http://www.thewilds.org/
4。辛辛那提动植物园 Cincinnati Zoo & Botanical Garden ):在辛辛那提城区内,据说是美国第5大动物园,走马观花看的话也要一两个钟头。号称每年一百二十万人参观,有动物500种,植物3000种。网址: http://www.cincinnatizoo.org/
5。古亚河卡国家公园(Cuyahoga Valley National Park):在克利夫兰南面20英里处的俄亥俄州唯一一个国家公园,是2000年建立的第57个美国国家公园,每年吸引300万人参观。是户外徒步旅行或者秋天观赏红叶的好地方。
网址: http://www.nps.gov/cuva/
 6。Hocking Hill State Park: 哥伦布市南面60英里处的州立公园,属于韦恩国家森林(Wayne National Forest)的一部分,隶属Hocking郡。公园里著名景点有老人洞(Old Man's Cave),雪松瀑(Cedar Falls),余灰洞(Ash Cave)及多个悬崖峭壁。
网址: http://www.hockinghills.com/ 
7。摩西干州立公园 (Mohican State Park):哥伦布东北一个半小时车程的摩西干州立公园是摩西干州立森林公园(Mohican State Forest Park)的一部分,以前是印第安人的狩猎区。有了望塔,廊桥,河谷,大坝,是徒步旅游的好地方。
网址: http://www.ohiodnr.gov/parks/mohican/tabid/769/Default.aspx 
8。 罗干湖州立公园(Lake Logan State Park):位于哥伦布东南一个小时车程的罗干湖州立公园是徒步旅游和钓鱼的好去处。
网址:http://www.stateparks.com/lake_logan.html 
其他旅游名胜 
1。普提因岛(Put-in-bay):克利夫兰西伊利湖上的一个小岛。湖景优美,岛上酒吧众多,有各种水上活动,是休闲的好地方。
网址: http://www.put-in-bay.com/ 
2。阿米西人聚居地(Amish County阿米西人以简朴的生活方式,衣着和拒绝现代文明而闻名于世。俄州则是阿米西人主要聚居地之一。阿米西人从西到东分布在Ashland,Loudonville, Millersburg Berlin等郡县。除了参观阿米西人的文化风俗外,有机会也可品尝阿米西特色的食品。
网址: http://en.wikipedia.org/wiki/Amish 
3。克里夫腾峡谷自然保护区(Clifton Gorge State Nature Preserve):哥伦布西55英里的克里夫腾峡谷自然风光优美,是徒步旅游的好地方。
网址: http://www.ohiodnr.com/Home/preserves_main/clifton/tabid/882/Default.aspx
 4。滑雪场所:在俄州有两个著名的滑雪场地,在西面的疯河(Mad River)及北面的银岭(Snow Trail)。皆距哥伦布1个小时车程。是初中级滑雪及snow tubing爱好者娱乐的最佳去处。 
 第二部分:室内娱乐休闲
 - 博物馆 
1。美国空军国家博物馆(National Museum of the United States Air Force):在代顿市的美国空军博物馆是美国最大的飞机博物馆。陈列有几乎所有类型,年代的美国本土制造的军用飞机和部分民用飞机,以及部分外国飞机。拥有飞机400余架。是了解美国乃至世界军用飞机发展及现状的最佳场所。 
2。艺术文化博物馆:在辛辛那提和克利夫兰都有一些中等规模的文化艺术博物馆。这里就不一一介绍。有兴趣的朋友可以到它们的网站上了解。
           Columbus Museum of Art offers FREE admissions:
           http://www.columbusmuseum.org/
辛辛那提:
Cincinnati Museum Center (Museum of Natural History  Cincinnati Historical Society)
网址: http://www.cincymuseum.org/
Cincinnati Art Museum网址: http://www.cincinnatiartmuseum.org/ 
克利夫兰:
Cleveland Rock & Roll Hall of Fame网址: http://www.rockhall.com/
Cleveland Museum of Art网址: http://www.clevelandart.org/index.aspx
 其他地区:
Toledo Museum of Art网址: http://www.toledomuseum.org/    
Canton Pro Football Hall of Fame网址: http://www.profootballhof.com/ 
 - 水上公园 
Zoombezi Bay Waterpark:在哥伦布动物园旁边,室外 网址: http://www.zoombezibay.com/default.aspx
Fort Rapids Water Park:在哥伦布市东南,室内 网址: http://www.fortrapids.com/
CoCo Key Water Resort:哥伦布市东,室内,开车50分钟
网址: http://www.cocokeywaterresort.com/Locations/newarkoh/index.aspx
the Beach Water Park:在辛辛那提的MASON郡,哥伦布市西南,室外,开车一个半分钟
网址:http://thebeachwaterpark.com/cgi-bin/WebObjects/PWDA.woa/wa/loadPage?pageId=6023

- Gallery Hoop

每个月的第一周的礼拜六晚上五点开始,是哥伦布有名的Gallery Hoop。Gallery Hoop 在Short North 上, 街两边的店和私人的Gallery 都开放。当天气好的时候,很多人都会参与到这个活动落。每当这个时候,街道上穿梭着来来往往的人群,好不热闹。 这里的店都很有特点,有卖独立设计人设计的服装,有特别前卫的家具用品, 更有私人收藏品的展馆。当然坐落在街道两边的酒吧,茶吧,冰淇淋店都会人满为患。现在就在此介绍一下几个特别受欢迎的休息消费的地方。在Short North 的中间有一家特别有特色的餐厅, North Star,这所餐厅最大的特色是所有的原料都是有机食品,有很多适合素食主义者的餐点。价格合理,8-12 美元不等。特色菜有蔬菜汉堡,特别可口美味。当天气好的时候,很多人坐在室外的遮阳伞下用餐。晚上的时候每个桌子上都放着蜡烛,很有情调。特别值得一提的是,餐点是由服务生呈上的,但是和其他的餐厅不一样,毋需给小费。在这样有情调的地方用完餐了以后,继续向北走两个接口,在街道的左边就是Jeni’s Ice-cream。这家冰淇淋店是以其各种各样,稀奇古怪的口味的冰淇淋而成名的。当然在这个时候,队伍通常是排到了门外边。还有一家茶馆也是很受欢迎,叫做 Zen Chi。老板是一对年轻的华人。一走进店里,立刻能体会到老板用心的布置,感觉一下子回到国内,非常有中国风情。这里的食品都非常可口,但是份量偏少,价格相比之下比较贵。茶的品种非常齐全,口味正宗,而且价格合理。

Thursday, June 23, 2011

Mac OS X SSD tweaks

Windows 7 and SSD

There’s a lot of excitement around the potential for the widespread adoption of solid-state drives (SSD) for primary storage, particularly on laptops and also among many folks in the server world. As with any new technology, as it is introduced we often need to revisit the assumptions baked into the overall system (OS, device support, applications) as a result of the performance characteristics of the technologies in use. This post looks at the way we have tuned Windows 7 to the current generation of SSDs. This is a rapidly moving area and we expect that there will continue to be ways we will tune Windows and we also expect the technology to continue to evolve, perhaps introducing new tradeoffs or challenging other underlying assumptions. Michael Fortin authored this post with help from many folks across the storage and fundamentals teams. --Steven

Many of today’s Solid State Drives (SSDs) offer the promise of improved performance, more consistent responsiveness, increased battery life, superior ruggedness, quicker startup times, and noise and vibration reductions. With prices dropping precipitously, most analysts expect more and more PCs to be sold with SSDs in place of traditional rotating hard disk drives (HDDs).

In Windows 7, we’ve focused a number of our engineering efforts with SSD operating characteristics in mind. As a result, Windows 7’s default behavior is to operate efficiently on SSDs without requiring any customer intervention. Before delving into how Windows 7’s behavior is automatically tuned to work efficiently on SSDs, a brief overview of SSD operating characteristics is warranted.

Random Reads: A very good story for SSDs

SSDs tend to be very fast for random reads. Most SSDs thoroughly trounce traditionally HDDs because the mechanical work required to position a rotating disk head isn’t required. As a result, the better SSDs can perform 4 KB random reads almost 100 times faster than the typical HDD (about 1/10th of a millisecond per read vs. roughly 10 milliseconds).

Sequential Reads and Writes: Also Good

Sequential read and write operations range between quite good to superb. Because flash chips can be configured in parallel and data spread across the chips, today’s better SSDs can read sequentially at rates greater than 200 MB/s, which is close to double the rate many 7200 RPM drives can deliver. For sequential writes, we see some devices greatly exceeding the rates of typical HDDs, and most SSDs doing fairly well in comparison. In today’s market, there are still considerable differences in sequential write rates between SSDs. Some greatly outperform the typical HDD, others lag by a bit, and a few are poor in comparison.

Random Writes & Flushes: Your mileage will vary greatly

The differences in sequential write rates are interesting to note, but for most users they won’t make for as notable a difference in overall performance as random writes.

What’s a long time for a random write? Well, an average HDD can typically move 4 KB random writes to its spinning media in 7 to 15 milliseconds, which has proven to be largely unacceptable. As a result, most HDDs come with 4, 8 or more megabytes of internal memory and attempt to cache small random writes rather than wait the full 7 to 15 milliseconds. When they do cache a write, they return success to the OS even though the bytes haven’t been moved to the spinning media. We typically see these cached writes completing in a few hundred microseconds (so 10X, 20X or faster than actually writing to spinning media). In looking at millions of disk writes from thousands of telemetry traces, we observe 92% of 4 KB or smaller IOs taking less than 1 millisecond, 80% taking less than 600 microseconds, and an impressive 48% taking less than 200 microseconds. Caching works!

On occasion, we’ll see HDDs struggle with bursts of random writes and flushes. Drives that cache too much for too long and then get caught with too much of a backlog of work to complete when a flush comes along, have proven to be problematic. These flushes and surrounding IOs can have considerably lengthened response times. We’ve seen some devices take a half second to a full second to complete individual IOs and take 10’s of seconds to return to a more consistently responsive state. For the user, this can be awful to endure as responsiveness drops to painful levels. Think of it, the response time for a single I/O can range from 200 microseconds up to a whopping 1,000,000microseconds (1 second).

When presented with realistic workloads, we see the worst of the SSDs producing very long IO times as well, as much as one half to one full second to complete individual random write and flush requests. This is abysmal for many workloads and can make the entire system feel choppy, unresponsive and sluggish.

Random Writes & Flushes: Why is this so hard?

For many, the notion that a purely electronic SSD can have more trouble with random writes than a traditional HDD seems hard to comprehend at first. After all, SSDs don’t need to seek and position a disk head above a track on a rotating disk, so why would random writes present such a daunting a challenge?

The answer to this takes quite a bit of explaining, Anand’s article admirably covers many of the details. We highly encourage motivated folks to take the time to read it as well as this fine USENIX paper. In an attempt to avoid covering too much of the same material, we’ll just make a handful of points.

  • Most SSDs are comprised of flash cells (either SLC or MLC). It is possible to build SSDs out of DRAM. These can be extremely fast, but also very costly and power hungry. Since these are relatively rare, we’ll focus our discussion on the much more popular NAND flash based SSDs. Future SSDs may take advantage of other nonvolatile memory technologies than flash.
  • A flash cell is really a trap, a trap for electrons and electrons don’t like to be trapped. Consider this, if placing 100 electrons in a flash cell constitutes a bit value of 0, and fewer means the value is 1, then the controller logic may have to consider 80 to 120 as the acceptable range for a bit value of 0. A range is necessary because some electrons may escape the trap, others may fall into the trap when attempting to fill nearby cells, etc… As a result, some very sophisticated error correction logic is needed to insure data integrity.
  • Flash chips tend to be organized in complex arrangements, such as blocks, dies, planes and packages. The size, arrangement, parallelism, wear, interconnects and transfer speed characteristics of which can and do vary greatly.
  • Flash cells need to be erased before they can be written. You simply can’t trust that a flash cell has no residual electrons in it before use, so cells need to be erased before filling with electrons. Erasing is done on a large scale. You don’t erase a cell; rather you erase a large block of cells (like 128 KB worth). Erase times are typically long -- a millisecond or more.
  • Flash wears out. At some point, a flash cell simply stops working as a trap for electrons. If frequently updated data (e.g., a file system log file) was always stored in the same cells, those cells would wear out more quickly than cells containing read-mostly data. Wear leveling logic is employed by flash controller firmware to spread out writes across a device’s full set of cells. If done properly, most devices will last years under normal desktop/laptop workloads.
  • It takes some pretty clever device physicists and some solid engineering to trap electrons at high speed, to do so without errors, and to keep the devices from wearing out unevenly. Not all SSD manufacturers are as far along as others in figuring out how to do this well.

Performance Degradation Over Time, Wear, and Trim

As mentioned above, flash blocks and cells need to be erased before new bytes can be written to them. As a result, newly purchased devices (with all flash blocks pre-erased) can perform notably better at purchase time than after considerable use. While we’ve observed this performance degradation ourselves, we do not consider this to be a show stopper. In fact, except via benchmarking measurements, we don’t expect users to notice the drop during normal use.

Of course, device manufactures and Microsoft want to maintain superior performance characteristics as best we can. One can easily imagine the better SSD manufacturers attempting to overcome the aging issues by pre-erasing blocks so the performance penalty is largely unrealized during normal use, or by maintaining a large enough spare area to store short bursts of writes. SSD drives designed for the enterprise may have as high as 50% of their space reserved in order to provide lengthy periods of high sustained write performance.

In addition to the above, Microsoft and SSD manufacturers are adopting the Trim operation. In Windows 7, if an SSD reports it supports the Trim attribute of the ATA protocol’s Data Set Management command, the NTFS file system will request the ATA driver to issue the new operation to the device when files are deleted and it is safe to erase the SSD pages backing the files. With this information, an SSD can plan to erase the relevant blocks opportunistically (and lazily) in the hope that subsequent writes will not require a blocking erase operation since erased pages are available for reuse.

As an added benefit, the Trim operation can help SSDs reduce wear by eliminating the need for many merge operations to occur. As an example, consider a single 128 KB SSD block that contained a 128 KB file. If the file is deleted and a Trim operation is requested, then the SSD can avoid having to mix bytes from the SSD block with any other bytes that are subsequently written to that block. This reduces wear.

Windows 7 requests the Trim operation for more than just file delete operations. The Trim operation is fully integrated with partition- and volume-level commands like Format and Delete, with file system commands relating to truncate and compression, and with the System Restore (aka Volume Snapshot) feature.

Windows 7 Optimizations and Default Behavior Summary

As noted above, all of today’s SSDs have considerable work to do when presented with disk writes and disk flushes. Windows 7 tends to perform well on today’s SSDs, in part, because we made many engineering changes to reduce the frequency of writes and flushes. This benefits traditional HDDs as well, but is particularly helpful on today’s SSDs.

Windows 7 will disable disk defragmentation on SSD system drives. Because SSDs perform extremely well on random read operations, defragmenting files isn’t helpful enough to warrant the added disk writing defragmentation produces. The FAQ section below has some additional details.

Be default, Windows 7 will disable Superfetch, ReadyBoost, as well as boot and application launch prefetching on SSDs with good random read, random write and flush performance. These technologies were all designed to improve performance on traditional HDDs, where random read performance could easily be a major bottleneck. See the FAQ section for more details.

Since SSDs tend to perform at their best when the operating system’s partitions are created with the SSD’s alignment needs in mind, all of the partition-creating tools in Windows 7 place newly created partitions with the appropriate alignment.

Frequently Asked Questions

Before addressing some frequently asked questions, we’d like to remind everyone that we believe the future of SSDs in mobile and desktop PCs (as well as enterprise servers) looks very bright to us. SSDs can deliver on the promise of improved performance, more consistent responsiveness, increased battery life, superior ruggedness, quicker startup times, and noise and vibration reductions. With prices steadily dropping and quality on the rise, we expect more and more PCs to be sold with SSDs in place of traditional rotating HDDs. With that in mind, we focused an appropriate amount of our engineering efforts towards insuring Windows 7 users have great experiences on SSDs.

Will Windows 7 support Trim?

Yes. See the above section for details.

Will disk defragmentation be disabled by default on SSDs?

Yes. The automatic scheduling of defragmentation will exclude partitions on devices that declare themselves as SSDs. Additionally, if the system disk has random read performance characteristics above the threshold of 8 MB/sec, then it too will be excluded. The threshold was determined by internal analysis.

The random read threshold test was added to the final product to address the fact that few SSDs on the market today properly identify themselves as SSDs. 8 MB/sec is a relatively conservative rate. While none of our tested HDDs could approach 8 MB/sec, all of our tested SSDs exceeded that threshold. SSD performance ranged between 11 MB/sec and 130 MB/sec. Of the 182 HDDs tested, only 6 configurations managed to exceed 2 MB/sec on our random read test. The other 176 ranged between 0.8 MB/sec and 1.6 MB/sec.

Will Superfetch be disabled on SSDs?

Yes, for most systems with SSDs.

If the system disk is an SSD, and the SSD performs adequately on random reads and doesn’t have glaring performance issues with random writes or flushes, then Superfetch, boot prefetching, application launch prefetching, ReadyBoost and ReadDrive will all be disabled.

Initially, we had configured all of these features to be off on all SSDs, but we encountered sizable performance regressions on some systems. In root causing those regressions, we found that some first generation SSDs had severe enough random write and flush problems that ultimately lead to disk reads being blocked for long periods of time. With Superfetch and other prefetching re-enabled, performance on key scenarios was markedly improved.

Is NTFS Compression of Files and Directories recommended on SSDs?

Compressing files help save space, but the effort of compressing and decompressing requires extra CPU cycles and therefore power on mobile systems. That said, for infrequently modified directories and files, compression is a fine way to conserve valuable SSD space and can be a good tradeoff if space is truly a premium.

We do not, however, recommend compressing files or directories that will be written to with great frequency. Your Documents directory and files are likely to be fine, but temporary internet directories or mail folder directories aren’t such a good idea because they get large number of file writes in bursts.

Does the Windows Search Indexer operate differently on SSDs?

No.

Is Bitlocker’s encryption process optimized to work on SSDs?

Yes, on NTFS. When Bitlocker is first configured on a partition, the entire partition is read, encrypted and written back out. As this is done, the NTFS file system will issue Trim commands to help the SSD optimize its behavior.

We do encourage users concerned about their data privacy and protection to enable Bitlocker on their drives, including SSDs.

Does Media Center do anything special when configured on SSDs?

No. While SSDs do have advantages over traditional HDDs, SSDs are more costly per GB than their HDD counterparts. For most users, a HDD optimized for media recording is a better choice, as media recording and playback workloads are largely sequential in nature.

Does Write Caching make sense on SSDs and does Windows 7 do anything special if an SSD supports write caching?

Some SSD manufacturers including RAM in their devices for more than just their control logic; they are mimicking the behavior of traditional disks by caching writes, and possibly reads. For devices that do cache writes in volatile memory, Windows 7 expects flush commands and write-ordering to be preserved to at least the same degree as traditional rotating disks. Additionally, Windows 7 expects user settings that disable write caching to be honored by write caching SSDs just as they are on traditional disks.

Do RAID configurations make sense with SSDs?

Yes. The reliability and performance benefits one can obtain via HDD RAID configurations can be had with SSD RAID configurations.

Should the pagefile be placed on SSDs?

Yes. Most pagefile operations are small random reads or larger sequential writes, both of which are types of operations that SSDs handle well.

In looking at telemetry data from thousands of traces and focusing on pagefile reads and writes, we find that

  • Pagefile.sys reads outnumber pagefile.sys writes by about 40 to 1,
  • Pagefile.sys read sizes are typically quite small, with 67% less than or equal to 4 KB, and 88% less than 16 KB.
  • Pagefile.sys writes are relatively large, with 62% greater than or equal to 128 KB and 45% being exactly 1 MB in size.

In fact, given typical pagefile reference patterns and the favorable performance characteristics SSDs have on those patterns, there are few files better than the pagefile to place on an SSD.

Are there any concerns regarding the Hibernate file and SSDs?

No, hiberfile.sys is written to and read from sequentially and in large chunks, and thus can be placed on either HDDs or SSDs.

What Windows Experience Index changes were made to address SSD performance characteristics?

In Windows 7, there are new random read, random write and flush assessments. Better SSDs can score above 6.5 all the way to 7.9. To be included in that range, an SSD has to have outstanding random read rates and be resilient to flush and random write workloads.

In the Beta timeframe of Windows 7, there was a capping of scores at 1.9, 2.9 or the like if a disk (SSD or HDD) didn’t perform adequately when confronted with our random write and flush assessments. Feedback on this was pretty consistent, with most feeling the level of capping to be excessive. As a result, we now simply restrict SSDs with performance issues from joining the newly added 6.0+ and 7.0+ ranges. SSDs that are not solid performers across all assessments effectively get scored in a manner similar to what they would have been in Windows Vista, gaining no Win7 boost for great random read performance.

Wednesday, June 08, 2011

osx86 for thinkpad x31 revisit

Ethernet (PRO 10/100 PE)

just download this kext to /System/Library/Extensions/AppleIntel8255x.kext

http://www.insanelymac.com/forum/index.php?showtopic=14840&pid=604374&mode=threaded&start=0#entry604374

Install instruction in the zipped file


Wifi
Proset 2100 still in development (maybe ceased)

Saturday, June 04, 2011

Google Codejam 2011 Round 2 problem C

Problem

This is to find the number of "Prime powers p^m, m = 0 or m >= 2, thus excluding the primes" in http://oeis.org/A025475 , from 1 to n.

Here is the brief reason:
Max waiter calls: # prime and prime powers.
Min waiter calls: # primes.
So the spread of the two is the sequence as above.

I didn't expect that the number of elements when n=10^12 is still so small.

Sunday, May 15, 2011

Screen Recording on Windows

http://camstudio.org/
On Mac, you can use QuickTime to record the screen.

Saturday, May 14, 2011

Private Cloud System

Thinking of building my own cloud storage solution.

For a cloud storage system, usually there are two kinds of clients:
1. Complete sync. All data are seamlessly synced between the server and client.
2. Sync on demand. Only files/data to be used are downloaded and updated for the user. This usually happens on mobile devices where the storage size is small.

For a server, it would be good if there are some features in it:
1. revision history. You can trace back the data.
2. version control. This is common for multiple users. A problem occurs when two users check in the same file with their own modification. The system should be able to identify the check-out time.

Some people have posted their solutions:
rsync: http://fak3r.com/geek/howto-build-your-own-open-source-dropbox-clone/
sparkleshare: This seems a promising open source solution. http://sparkleshare.org/
some more: http://thefinalcastle.com/tag/virtual-private-server

--
Update:
There are some solutions that are already in market and are nearly free:
1. http://www.tonido.com/
2. http://www.pogoplug.com/

Update 2:
1. Use plugapps for these devices
2. 破解 pogoplug:
http://www.beimeicn.com/Space/u=3M/m=blog/p=347411/s=nature_green/lang=schinese.html

Wednesday, March 16, 2011

CacheSet

Seems it can clear file cache under Windows.

Tuesday, January 04, 2011

CPU Affinity


#include

cpu_set_t mask;
CPU_ZERO(&mask);
CPU_SET(0, &mask);
CPU_SET(2, &mask);
result = sched_setaffinity(0, sizeof(mask), &mask);