kernel

4GB/4GB Kernel VM Split

故事扮演 提交于 2019-12-30 22:54:07
问题 Friends, I saw this article by Ingo Molnar, a famous Linux Kernel enthusiast where he talks about 4GB/4GB split. In this article he says that with the 4G/4G patch, the kernel can be compiled in 4G/4G mode, in which case there's a full, separate 4GB VM for the kernel, and there are separate full (and per-process) 4GB VMs for user-space. My problem starts here: My assumption was that in a monolithic kernel like as in Linux, the kernel and user part of process shares same PROCESS ADDRESS SPACE.

Is an operating system kernel an interpeter for all other programs?

喜欢而已 提交于 2019-12-30 18:43:10
问题 So, from my understanding, there are two types of programs, those that are interpreted and those that are compiled. Interpreted programs are executed by an interpreter that is a native application for the platform its on, and compiled programs are themselves native applications (or system software) for the platform they are on. But my question is this: is anything besides the kernel actually being directly run by the CPU? A Windows Executable is a "Windows Executable", not an x86 or amd64

ubuntu14.04 upgrade fail initramfs-tools

和自甴很熟 提交于 2019-12-30 12:24:54
fedorayang@ynlhost:~$ sudo apt-get dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 7 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up initramfs-tools (0.103ubuntu4.7) ... update-initramfs: deferring update (trigger activated) Setting up linux-image-3.13.0-113-generic (3.13.0-113.160) ... Running depmod. update-initramfs: deferring update (hook will be called

How to parse large amount of data passed to kernel module through /proc file?

久未见 提交于 2019-12-30 08:14:43
问题 Edit: I have found seq_file that eases writing a lot of data from kernel to user-space. What I am looking for is the opposite; an API that facilitates reading a lot of data (more than one page) from user-space. Edit 2 : I am implementing a port of <stdio.h> as a kernel module that would be able to open /proc (and later, other virtual file systems) similar to FILE s and handle input and output similar to <stdio.h> . You can find the project here. I have found a LOT of questions on how the

Ubuntu 13.04有线连接异常

拟墨画扇 提交于 2019-12-30 04:17:24
最近安装了Ubuntu 13.04 64位版,发现有线连接经常会掉线,通常在连接上一段时间(或长或短)就无法上网,ping不通,但是ifconfig显示一切正常,重启NetworkManager也不行,必须拔掉网线重新插上才行,但是过一会依然会掉线。无线连接正常,在12.04/12.10下也没遇到过这个问题,请问该怎么解决呢? 我在launchpad.net上发了提问帖,里面有人建议我提交bug 于是我发了这个:https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1176370 , 目前是Confirmed 状态,但重要性什么的还没有评估,bug热度值是6。 如果你们有launchpad.net帐号(或者能不能顺手注册一个?)的话,不妨点进去上面给出的链接,点一下"this bug affects me",表明你也受这个bug影响,可以提升bug的热度(每影响多一个人,热度+6),也能够尽快引起ubuntu开发人员注意,尽早修复这个bug。 目前已确认是Linux内核(版本号3.7~3.9)的bug,所以12.10(Linux内核3.5)及之前的版本都没这个问题。 我已在Ubuntu在线开发社区平台launchpad提交bug report,bug report所在地址:https://bugs.launchpad.net

linux高级-系统优化

夙愿已清 提交于 2019-12-30 04:12:46
linux系统优化 文章目录 linux系统优化 系统资源限制优化 内核参数优化 系统资源限制优化 #cat /etc/security/limits.conf #root账⼾的资源软限制和硬限制 (Ubuntu需要添加上下两部分) root soft core unlimited root hard core unlimited root soft nproc 1000000 root hard nproc 1000000 root soft nofile 1000000 root hard nofile 1000000 root soft memlock 32000 root hard memlock 32000 root soft msgqueue 8192000 root hard msgqueue 8192000 #其他账⼾的资源软限制和硬限制 (centos系统只需要下面这一部分即可) * soft core unlimited * hard core unlimited * soft nproc 1000000 * hard nproc 1000000 * soft nofile 1000000 * hard nofile 1000000 * soft memlock 32000 * hard memlock 32000 * soft msgqueue 8192000

linux du command source code

帅比萌擦擦* 提交于 2019-12-30 04:03:13
问题 Where I can find the source code for du and other Linux utilities? 回答1: It is with the GNU CoreUtils package. 回答2: David is right. You can start with the entry point, du.c, in Savannah. Also, since it's free software under the GPL, you can also get it from your GNU/Linux distribution. E.g., on Debian or Ubuntu you can generally just do: apt-get source coreutils to get the source for the version installed. (EDIT by Novelocrat) For other commands, to find out what package they're in, you can

Virtual Webcam in C++

早过忘川 提交于 2019-12-30 02:29:13
问题 I want to write a new virtual webcam driver, which for example will take an AVI or live stream for example for screen and stream it as webcam source. I'll not have webcam really, I want to add a virtual webcam which streams desktop screen. I should write a webcam in kernel mode to do so ? If so, could you guide me to a sample webcam driver? If I should do it in DirectShow, how can I add a webcam device to list in webcams list in Control panel, so for example in Yahoo messenger, I can choose

What is EXPORT_SYMBOL_GPL in Linux kernel code?

坚强是说给别人听的谎言 提交于 2019-12-30 01:53:29
问题 What is EXPORT_SYMBOL_GPL in Linux kernel code? Below is a piece of code, which contains EXPORT_SYMBOL_GPL 62 struct resource *platform_get_resource(struct platform_device *dev, 63 unsigned int type, unsigned int num) 64 { 65 int i; 66 67 for (i = 0; i < dev->num_resources; i++) { 68 struct resource *r = &dev->resource[i]; 69 70 if (type == resource_type(r) && num-- == 0) 71 return r; 72 } 73 return NULL; 74 } 75 EXPORT_SYMBOL_GPL(platform_get_resource); That macro appears many a times in

Device driver to act as a virtual web camera

巧了我就是萌 提交于 2019-12-30 00:48:05
问题 I'm looking for writing virtual camera drivers. Does anybody has idea? Any book that would be helpful or any link. Adding more details: I have developed a device driver which saves the image to disk and the display uses the device driver to display the image. The performance does not seem good. The fns. that I have used are: //to capture GetDesktopWindow() CreateCompatibleBitmap() Save() //to display WM_MOUSEMOVE giving a call to capture and display every time but the display is not