2007年11月17日

摘要: 最近我在想一个系列的构思,可能已经有人想过了或者已经出现类似的产品,只是随便想到的,我的构思大致是这样…… 阅读全文

posted @ 2007-11-17 08:03 QT_pixy 阅读(358) 评论(1) 推荐(0)

摘要: 关于Operating System建立thread的程序,多个thread共享一个circular buffer,按照一定的顺序对这个buffer进行操作。因为每个thread写入之后要sleep一段时间,然后把CPU分配到其他thread上。我这个程序可以正确运行,但是如果thread非常多,共同操作一个buffer,系统运行速度就会很慢。可能是因为CPU在多个thread之上不停的转换造成的。 阅读全文

posted @ 2007-11-17 05:07 QT_pixy 阅读(862) 评论(4) 推荐(0)

摘要: 这个程序需要建立多个thread,然后使用shared memory来进行数据共享。This program takes 3 command line arguments; the first two are expected to be non-negative integers, the third, the name of a file (the file may or may not exist). 阅读全文

posted @ 2007-11-17 04:57 QT_pixy 阅读(442) 评论(0) 推荐(0)

摘要: 学习Operating System的底层机制对于进行底层开发的人员来说很重要,下面这个简单的程序是关于fork process的练习。Write a C program that takes 3 command line arguments and treats the first 2 like commands and the 3rd as a filename. 阅读全文

posted @ 2007-11-17 04:48 QT_pixy 阅读(505) 评论(0) 推荐(0)

摘要: 关于字典的程序,可以在字典中增加单词,每个单词可以有最多10个翻译,可以从字典中删除单词。这个程序的特点就是使用malloc操作内存。大家知道C语言中操作内存是很高效但很危险的,很容易出现内存泄露(memory leak).这个程序需要用struc来在内存中建立结构。如果要练习对内存进行操作和struc的使用,这个程序是非常好的练习题目。最后,我使用unix下的内存检测工具来检查是否存在错误的内存操作。好的程序是能够合理的尽量节约的使用内存,所以这个程序限制了内存的最大使用量。 阅读全文

posted @ 2007-11-17 04:29 QT_pixy 阅读(688) 评论(0) 推荐(0)

摘要: 这个程序功能很简单,但具体要求非常多。考虑到程序的严谨性所以要针对所有可能出现的情况进行处理。第一次进行test cases测试的时候一大半的test cases都没有通过,进行分析修改后以下程序通过所有的test cases. 因为限制只能用部分C的function,所以要求较高的逻辑思维能力。 阅读全文

posted @ 2007-11-17 04:04 QT_pixy 阅读(319) 评论(0) 推荐(0)

摘要: Square Root Function: This function returns the square root of a number passed in $f0. Returned number is stored in f0. This method works recursively without need for storing previous variables. 阅读全文

posted @ 2007-11-17 03:53 QT_pixy 阅读(2955) 评论(0) 推荐(0)

摘要: This program reads a valid date (3 integers being date (d), month (m), year using the Zeller's algorithm described below: 阅读全文

posted @ 2007-11-17 03:50 QT_pixy 阅读(412) 评论(0) 推荐(0)

摘要: 计算机自从其诞生之日起,它的主要任务就是进行各种各样的科学计算。文档处理,数据处理,图像处理,硬件设计,软件设计等等,都可以抽象为两大类:数值计算与非数值计算。作为研究计算机科学技术的人员,我们大都对计算数学对整个计算机科学的重要性有一些了解。 阅读全文

posted @ 2007-11-17 03:39 QT_pixy 阅读(355) 评论(0) 推荐(0)

摘要: When you run your Java programs which contain one or more classes, you may get some strange problems or errors. Not all errors are made by syntax fault. 阅读全文

posted @ 2007-11-17 03:34 QT_pixy 阅读(226) 评论(0) 推荐(0)


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3