Skip to main content

Questions tagged [kernel]

Code that is intended to run in an operating system kernel or kernel module

Filter by
Sorted by
Tagged with
1 vote
0 answers
114 views

(See the previous and initial iteration.) This time I have incorporated some improvement points made by G. Sliepen: driver.cpp: ...
coderodde's user avatar
  • 32.3k
8 votes
1 answer
552 views

(See the second and next iteration.) Intro I have this GitHub repository. Basically, it does not do anything fancy: it has a byte buffer of 1Kb size, and it intercepts ...
coderodde's user avatar
  • 32.3k
2 votes
0 answers
101 views

...
anoncr's user avatar
  • 21
4 votes
2 answers
360 views

I wrote a small LKM that opens the /proc/cpuinfo file, reads it line by line, and attempts to the cpu model name. If the function fails to extract the cpu model ...
766F6964's user avatar
  • 901
4 votes
1 answer
546 views

Here is the plan: a slab takes up 1 page and it has PGSIZE / blocksize amount of blocks the minimum blocksize is 8 bytes, otherwise the pointer to the next block ...
runningupthatroad's user avatar
2 votes
1 answer
404 views

I have made a simple round robin scheduler that switches between threads in ptable array. Currently it's only for 1 CPU, so there are no locks at the moment. But ...
runningupthatroad's user avatar
1 vote
1 answer
364 views

Virtual Memory manager that has functions, mappage, unmappage, remappage If the physical ...
runningupthatroad's user avatar
3 votes
1 answer
370 views

Bitmap page allocator that scans the bitmap linearly looking for size amount of pages. Everytime it founds a free page, it check if the next ...
runningupthatroad's user avatar
3 votes
1 answer
285 views

UEFI bootloader. It reads the file kernel.elf on the disk image, reads through the program headers, copies the LOAD segments into memory, and finally calls ...
runningupthatroad's user avatar
2 votes
0 answers
91 views

I'm writing memory manager for my toy operating system and I would like to get some feedback. There is physical memory manager, which uses bitmap, virtual memory manager which uses buddy algorithm for ...
Mateusz's user avatar
  • 21
2 votes
0 answers
328 views

I ported the Physical Memory Manager from Vinix into C for a little OS I'm working on. I'd love to get some feedback. Here's my code: ...
Rayan's user avatar
  • 21
1 vote
1 answer
413 views

I am asked to implement the following part of code into kernel code. Actually, I have tried but not sure about the std::array. This is the original code for the ...
user247399's user avatar
2 votes
2 answers
261 views

So I've started writing an OS to know how they work, and I came up with the following makefile to compile it. The reason I used a makefile is because I wanted to see everything it was doing and have ...
rajdakin's user avatar
4 votes
2 answers
180 views

My hobby is Unix-like operating systems. Recently I began writing my own sel4-based Posix compliant OS. Here's the code for internal signal handling functions which presents a kind of backend to help ...
Сергей Волкович's user avatar
4 votes
0 answers
82 views

I have been testing a number of kernel builds and I decide to have a go at writing some Python code. The idea is to select which kernel to boot on the next reboot. I could have done it in Bash but ...
Sniggum's user avatar
  • 41
5 votes
1 answer
305 views

My Linux kernel version is Linux version 5.0.0-29-generic I'm currently learning how to write kernel modules for Linux and implemented this simple module which ...
St.Antario's user avatar
2 votes
0 answers
60 views

I wrote a function, read_fox_rcu() for getting an element from RCU-protected list in a linux device driver. read_fox_rcu() reads ...
H. Jang's user avatar
  • 259
2 votes
0 answers
126 views

I wonder if it's possible to optimize this code in CUDA. Could I get any hints how to? Equivalent algorithm runs faster in Matlab for me, but there I'm doing matrix operations. Compution I'm not ...
yourstruly's user avatar
5 votes
1 answer
1k views

I've written a kernel module (tested on Raspberry Pi) to use a rotary encoder as a volume control. The Linux source tree already contains a driver for rotary encoders so I've just piggybacked off of ...
James Kent's user avatar
4 votes
1 answer
136 views

I am developing a C++ kernel, and I've got the need for manipulating huge data structures before the task-scheduler runs - it means in a non-preemptive environment. For this, I have developed a read-...
Shukant Pal's user avatar
7 votes
2 answers
699 views

I recently needed to generate a series of unique random numbers (non-repeated) within a bounded range inside of the Linux kernel. The code I came up with is below. I'd appreciate any feedback -- again,...
tonysdg's user avatar
  • 367
7 votes
1 answer
159 views

The boot loader that I'm designing is just simply going to setup (A) Stack, (B) Segment registers (C) Load remainder of track for specified device. Conventionally, this could have been up to 4 floppy ...
Shift_Left's user avatar
  • 1,010
11 votes
1 answer
311 views

I'm now posting the second semi-complete part of my operating system makefile. The kernel itself is currently incomplete, so don't be surprised by the small size of the makefile. When the kernel ...
u185619's user avatar
  • 937
4 votes
1 answer
1k views

I have written an implementation of memcpy function and I want to know how good is it and if it gets the most out of the processor capabilities or not. The reason ...
u185619's user avatar
  • 937
11 votes
1 answer
2k views

I'm am writing a Linux kernel driver for HD44780 LCDs connected via I2C bus. In my last change I tried to decouple low-level code (which talks to the device via I2C) from device's logic (printing ...
m.g.'s user avatar
  • 111
5 votes
1 answer
201 views

I'm trying to learn more about kernels, so naturally I started to program one. I'm using tutorials from here. Right now I have modified the printf() that was ...
proeng's user avatar
  • 97
7 votes
1 answer
371 views

I've ported some standard library facilities like vector, algorithm, etc. to my kernel so I can code in C++ instead of C. This is one of them. I'm looking for concerns regarding: Performance Safety ...
user52304's user avatar
14 votes
2 answers
2k views

As the title says, the objective is to free a binary tree without using the stack or allocating memory. This was required for a kernel module where resources were limited. Result has a complexity of \...
Loki Astari's user avatar
  • 97.9k
3 votes
2 answers
3k views

Since the resources I found to learn are generally out-of-date, I'm having to read a lot of documentation, which makes the learning process somewhat haphazard. The module makes a simple character ...
manasij7479's user avatar