I'm currently reading Brian Wards book: How Linux Works: What Every Superuser Should Know 2nd edition and I'm confused about step 3 in the context of the other steps:
1. The CPU (the actual hardware) interrupts the current process based on an internal timer, switches into kernel mode, and hands control back to the kernel.
2. The kernel records the current state of the CPU and memory, which will be essential to resuming the process that was just interrupted.
3. The kernel performs any tasks that might have come up during the preceding time slice (such as collecting data from input and output, or I/O, operations).
4. The kernel is now ready to let another process run. The kernel analyzes the list of processes that are ready to run and chooses one.
5. The kernel prepares the memory for this new process, and then prepares the CPU.
6. The kernel tells the CPU how long the time slice for the new process will last.
7. The kernel switches the CPU into user mode and hands control of the CPU to the process.
What does he mean preceding time slice as surely the tasks have been completed during the time slice in steps 1-2?
Hi all,
In my work, I'd like to spawn separate kernel threads (tasks) to execute syscall asynchronously. Specifically, a user thread issues a syscall, goes into kernel, save the syscall number and arguments somewhere in the kernel address space, but does not execute the syscall. A kernel thread which is different from the user thread, will fetch the syscall number and arguments to execute the syscall on behalf of the user thread.
But for file operations such as read, the kernel thread is not aware of the open files of the user threads. For example, if the user thread opens a file and get a file descriptor, then it issue a read() syscall. The kernel thread cannot execute the read() on behalf of the user thread by just using the file descriptor. Thus I need some way to allow the kernel thread share the open files information with the user thread, such that the kernel thread will have the context of the open file to execute read(). I tried to pass the files_struct of the user thread's task_struct to the kernel thread, but it didn't help, read() returns a EFAULT error.
Can anyone give me some suggestions on how to make a kernel thread share the open files with a user thread? Or more straightforward how to execute the read() syscall in the example above in kernel thread? Thank you very much!
--Louis
I have a USB fax modem, and it logs the following errors when turned on.
I know it is impossible to know for sure, but think it is hardware related? Any chance to salvage?
Also, what are the steps to start troubleshooting?
Thanks
Code:
Jan 17 14:38:26 devserver kernel: generic-usb 0003:0461:4D0F.0066: input,hidraw2: USB HID v1.11 Mouse [PixArt USB Optical Mouse] on usb-0000:00:1a.0-1.2/input0
Jan 17 14:38:41 devserver kernel: usb 3-1: new full speed USB device number 24 using xhci_hcd
Jan 17 14:38:41 devserver kernel: usb 3-1: device descriptor read/all, error -71
Jan 17 14:38:41 devserver kernel: usb 3-1: new full speed USB device number 25 using xhci_hcd
Jan 17 14:38:41 devserver kernel: usb 3-1: device descriptor read/all, error -71
Jan 17 14:38:41 devserver kernel: usb 3-1: new full speed USB device number 26 using xhci_hcd
Jan 17 14:38:41 devserver kernel: usb 3-1: device descriptor read/8, error -71
Jan 17 14:38:41 devserver kernel: usb 3-1: device descriptor read/8, error -71
Jan 17 14:38:41 devserver kernel: usb 3-1: new full speed USB device number 27 using xhci_hcd
Jan 17 14:38:41 devserver kernel: usb 3-1: device descriptor read/8, error -71
Jan 17 14:38:42 devserver kernel: usb 3-1: device descriptor read/8, error -71
Jan 17 14:38:42 devserver kernel: hub 3-0:1.0: unable to enumerate USB device on port 1
Hi everyone (i hope this is the right section)
Im trying to install the RT patch preempt_rt 3.18.9 im running Ubuntu 14.04 with kernel v 3.16
i installed the rt patch "patch-3.18.9-rt5.patch" and also a new kernel "3.18.9" i patched the patch file with
patch -p1 < patch-3.18.9.patch
but there is somthing i don't know about linking folders of old kernel and new kernel, i searched about it and found
rm -rf linux && ln -s /usr/src/linux-3.18.9 linux && cd /usr/src/linux
then
make oldconfig
then
make menuconfig
i selected Full preemptive kernel then
make
then this error
cc1: some warnings being treated as errors make[2]: * [kernel/locking/locktorture.o] Error 1 make[1]: * [kernel/locking] Error 2 make: *** [kernel] Error 2
So..... Any help?? can someone walk me through this
or any other real time patch, Thanx.. plzzzzzz
Hi guys prob a silly question...
i only just read now that linux kernel v4 was released about 11 days ago...can any distros upgrade there kernel to 4 or only specific ones?
Is there really a huge benefit in doing so?
should i just lookup the information in the distros web site?
Hi folks,
I'm trying to install the drivers for my "legacy" nvidia graphics card.
I've downloaded the file from nvidia's website to install the driver, but during the process I get this message...
Kernel header file ' /lib/modules/3.13.0-37-generic/build/include/linux/version.h ' does not exist .
The most likely reason is the kernel source files in ' /lib/modules/3.13.0-37-generic/build ' have not been configured.
Anyone know how to configure this file? I've been working on this for a few days now...it's getting old!
Thanks for your help.
Joe
lsmod is command to list loaded modules and I referred man page of lsmod that shows it refers to /proc/modules file. In terms of my os platform, Ubuntu, almost available modules are in /lib/module directory. I think OS kernel naturally loads modules in there. So, What does kernel refer to load modules at boot time?
Is there any files to be refereed for loading or mechanism can't know easily for end user?
hi
I have two code of user.c and kernel.c , i have compiled new kernel in my system , but i don't know how to compile these code.
may i use any IDE or GCC.
Hi! I have a failing disk and the kernel messages are the following:
Code:
Απρ 01 15:07:02 Arch kernel: ata1: lost interrupt (Status 0x50)
Απρ 01 15:07:03 Arch kernel: ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
Απρ 01 15:07:03 Arch kernel: ata1.00: failed command: WRITE DMA
Απρ 01 15:07:03 Arch kernel: ata1.00: cmd ca/00:08:20:32:6a/00:00:00:00:00/e4 tag 0 dma 4096 out
res 40/00:00:4b:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
Απρ 01 15:07:03 Arch kernel: ata1.00: status: { DRDY }
Απρ 01 15:07:03 Arch kernel: ata1: soft resetting link
Απρ 01 15:07:03 Arch kernel: ata1.00: LPM support broken, forcing max_power
Απρ 01 15:07:03 Arch kernel: ata1.00: LPM support broken, forcing max_power
Απρ 01 15:07:03 Arch kernel: ata1.00: configured for UDMA/133
Απρ 01 15:07:03 Arch kernel: ata1.01: configured for UDMA/133
Απρ 01 15:07:03 Arch kernel: ata1: EH complete
Απρ 01 15:09:19 Arch kernel: ata1: lost interrupt (Status 0x50)
Απρ 01 15:09:20 Arch kernel: ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
Απρ 01 15:09:20 Arch kernel: ata1.00: failed command: READ DMA EXT
Απρ 01 15:09:20 Arch kernel: ata1.00: cmd 25/00:20:e8:b2:fd/00:00:18:00:00/e0 tag 0 dma 16384 in
res 40/00:00:4b:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
Απρ 01 15:09:20 Arch kernel: ata1.00: status: { DRDY }
Απρ 01 15:09:20 Arch kernel: ata1: soft resetting link
Απρ 01 15:09:20 Arch kernel: ata1.00: LPM support broken, forcing max_power
Απρ 01 15:09:20 Arch kernel: ata1.00: LPM support broken, forcing max_power
Απρ 01 15:09:20 Arch kernel: ata1.00: configured for UDMA/133
Απρ 01 15:09:20 Arch kernel: ata1.01: configured for UDMA/133
Απρ 01 15:09:20 Arch kernel: ata1: EH complete
I have 2 disks: sda, sdb. Which disk is it referring to?
Thanks a lot
Hi everyone,
I'm planing to join the development team of Linux kernel. As the first step, I started to clone git repo of the linux-next that I found two contradictory tutorials:
https://www.kernel.org/doc/man-pages/linux-next.html
https://github.com/gregkh/kernel-tut...rnel_patch.txt
Which one should I follow?
Thanks.
Booting to CentOS Linux problem. I have an HP desktop PC with an AMD CPU and win8.1 installed on it with UEFI as the boot process. The CentOS7 DVD indicates that I have installed the CentOS successfully. When I boot the PC it does take me to a menu offering CentOS and Win8. Win 8 will boot correctly. However, when I try to boot to CentOS I get a screen that says “Kernel not found”. The boot loading process continues until it ultimately brings up a terminal login screen. When I try to login with my password and usr name it tells me that they are wrong. I suspect the Kernel not found is the real problem but I can't get into the CentOS program to see if GRUB or any of the other programs are missing or defective. So far I have not disabled the UEFI since I didn't think I needed to. Any suggestions?