上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 45 下一页

2012年1月2日

摘要: 简介对于一个规模为n的问题,若该问题可以容易地解决(比如说规模n较小)则直接解决,否则将其分解为k个规模较小的子问题,这些子问题互相独立且与原问题形式相同,递归地解这些子问题,然后将各子问题的解合并得到原问题的解。这种算法设计策略叫做分治法。分治法的基本思想任何一个可以用计算机求解的问题所需的计算时间都与其规模有关。问题的规模越小,越容易直接求解,解题所需的计算时间也越少。例如,对于n个元素的排序问题,当n=1时,不需任何计算。n=2时,只要作一次比较即可排好序。n=3时只要作3次比较即可,…。而当n较大时,问题就不那么容易处理了。要想直接解决一个规模较大的问题,有时是相当困难的。分治法的设计 阅读全文
posted @ 2012-01-02 22:24 yming0221 阅读(306) 评论(0) 推荐(0)

2011年12月26日

摘要: 什么是进程的饥饿和饿死?在一个动态系统中,资源请求与释放是经常性发生的进程行为.对于每类系统资源,操作系统需要确定一个分配策略,当多个进程同时申请某类资源时,由分配策略确定资源分配给进程的次序。资源分配策略可能是公平的(fair),能保证请求者在有限的时间内获得所需资源;资源分配策略也可能是不公平的(unfair),即不能保证等待时间上界的存在。在后一种情况下,即使系统没有发生死锁,某些进程也可能会长时间等待.当等待时间给进程推进和响应带来明显影响时,称发生了进程饥饿(starvation),当饥饿到一定程度的进程所赋予的任务即使完成也不再具有实际意义时称该进程被饿死(starve to de 阅读全文
posted @ 2011-12-26 15:19 yming0221 阅读(570) 评论(0) 推荐(0)

2011年12月23日

摘要: 实现如下:boolean flag[2]; int turn; void P0() { while(true) { flag[0]=true; turn=1; while(flag[1]&&turn==1) /* donothing*/ ; /*critical section*/ ; flag[0]=false; } } void P1() { while(true) { flag[1]=true; turn=0; while(flag[0]&&turn==0) ... 阅读全文
posted @ 2011-12-23 22:59 yming0221 阅读(670) 评论(0) 推荐(0)

2011年12月12日

摘要: Fromhttp://www.askmen.com/celebs/men/apr00/21_steve_jobs.htmlWhyis He famousFor more than 30 years, Steve Jobs flexed his imagination to change the ways thattechnologycan impact our lives. Through big ideas, bold imagination and innovative precision, Jobs grew the Apple brand that he co-founded from 阅读全文
posted @ 2011-12-12 23:13 yming0221 阅读(229) 评论(0) 推荐(0)
摘要: 原创作品,转载清标明http://blog.csdn.net/yming0221/article/details/7063262刚刚开始安装系统的时候使用的有线,在/etc/conf.d/net中设置了eth0网卡的启动和初始化,这样确实是简介,对于服务器还好说,对于IP经常变动和使用无线网络的笔记本用户可能就有点不太方便,所以这里安装NetworkManager。现在可以1、首先将/etc/conf.d/net中的网卡初始化去掉,让NetworkManager来管理网络。2、安装NetworkManageemerge net-misc/networkmanager3、安装KDE前端Netwo 阅读全文
posted @ 2011-12-12 13:38 yming0221 阅读(258) 评论(0) 推荐(0)

2011年12月11日

摘要: 原创作品,转载请表明在KDE桌面环境下,GTK应用程序的菜单默认情况下,gtk程序在kde下的界面一般都比较难看。修改字体和界面可以安装gtk-theme-switch,emerge gtk-theme-switch再安装gtk的一些theme,emerge gtk-themes-engine该软件包包含了一些基本的theme,不够已经够用。然后运行gtk-theme-switch来更换GTK主题。效果图如下 阅读全文
posted @ 2011-12-11 12:57 yming0221 阅读(235) 评论(0) 推荐(0)

2011年12月10日

摘要: 安装IBUS中文输入法遇到了问题,设置了环境变量后仍然无法在想谷歌浏览器等GTK程序中调用输入法,GOOGLE了一番,终于找到了原因。原来是自己的自己的make文件的设置为# These settings were set by the catalyst build script that automatically # built this stage. # Please consult /usr/share/portage/config/make.conf.example for a more # detailed example. CFLAGS="-O2 -march=noco 阅读全文
posted @ 2011-12-10 13:47 yming0221 阅读(396) 评论(0) 推荐(0)

2011年12月8日

摘要: For the biography, seeSteve Jobs (biography).Steve JobsJobs holding a whiteiPhone 4atWorldwide Developers Conference2010BornSteven Paul JobsFebruary 24, 1955[1][2]San Francisco, California, U.S.[1][2]DiedOctober 5, 2011(aged56)[2]Palo Alto, California, U.S.NationalityAmericanOccupationCo-founder, Ch 阅读全文
posted @ 2011-12-08 20:48 yming0221 阅读(863) 评论(0) 推荐(0)

2011年12月7日

摘要: First, enable the following options in the kernel, then build and install as normal. The deselected options are possible extras or alternatives, depending on your device. (The instructions below are for the traditional "b43" kernel driver. The kernel configuration for the new Broadcom &quo 阅读全文
posted @ 2011-12-07 22:28 yming0221 阅读(304) 评论(0) 推荐(0)

2011年12月5日

摘要: Gentoo 11.2默认为3.0.6内核,如果安装官方二进制NVIDIA显卡驱动,提示如下错误ERROR: If you are using a Linux 2.4 kernel, please make sure you either have configured kernel sources matching your kernel or the correct set of kernel headers installed on your system. If you are using a Linux 2.6 kernel, please make sur... 阅读全文
posted @ 2011-12-05 13:27 yming0221 阅读(372) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 45 下一页

导航