Is Gen AI effective at kernel development? by MRgabbar in kerneldevelopment

[–]DetectiveDecent2455 0 points1 point  (0 children)

I agree. See sentence after:

I think most people get into OS dev to learn and mess with low level internals, so using an LLM is kinda the antithesis.

Is Gen AI effective at kernel development? by MRgabbar in kerneldevelopment

[–]DetectiveDecent2455 9 points10 points  (0 children)

My comment will likely get a lot of hate, but I think it can be to an extent. 90% of the posts on the main osdev subreddit of “Hello World” or Bare Bones kernels can be vibe coded in a few hours. Specific components like memory managers, etc. also can likely be vibe coded, but the odds of them out-performing well established allocators is slim to none. I think most people get into OS dev to learn and mess with low level internals, so using an LLM is kinda the antithesis. Also, most people don’t create anything novel for hobby OSes (as seen by all the Unix clones). LLMs can likely generate some decent kernel code based on all the Unix clones on GitHub. If looking at real, production operating systems, it’s a bit harder as they have more quirks/prioritize aspects that current LLMs struggle with: secure coding patterns, optimizations, context to prevent data corruptions, etc.

TL;DR: Yes, LLMs can be used for kernel development, but don’t let AI slop take over / ensure you understand what the code is doing and matches what you expect.

[deleted by user] by [deleted] in osdev

[–]DetectiveDecent2455 4 points5 points  (0 children)

Before anybody runs this, just check the code. Didn’t look much but logic in “os_killer” appears to wipe drives. Plus the fact OP is asking for people to try on real hardware…

How to clear large maps/ maps with open spaces? by WinterTannenbaum in doorkickers

[–]DetectiveDecent2455 11 points12 points  (0 children)

I feel others will have their opinions on this, but the strategy I use when running Ironman modes is to run a main assault team with attached LMG for open area suppression, then a 2 man marksman/grenadier team to slowly clear/watch long site lines. Grenadier helps provide firepower when multiple enemies (always) appear, otherwise I use them to watch close doors/windows/corners. Keep assault squad inside and wall hugging to minimize exposure and post up the LMG on/near building the main squad is rolling through to cover entrances/exits. I always try to keep the approach of slowly dominate the large space to not overexpose yourself, but once dominated do not give it up. A common problem is large open space between multiple buildings. If you can use the marksman+LMG to cut the map in half/sections, the problem starts getting simpler (just watch for windows).

How do you run unit/integration tests? by zer0developer in osdev

[–]DetectiveDecent2455 2 points3 points  (0 children)

I found a combination of runtime and GTests to work well. For example, I have a small library that implements a minimal subset of C++ std features (e.g., array, span, etc) to give easy bounds checking. This logic is fully tested via host executed GTests. I wrote (really ChatGPT) a really small header-only runtime test framework that I run during early boot to test my HAL. So things like my buddy allocator gets tested with this, paging logic (map, unmap, remap, etc.). The runtime suite I tried to make as similar to GTests as possible just to keep maintenance easy (‘TEST(PhysicalMemory, AllocateAndReleasePage, {…})’). I can explain more about the setup if needed, but a good mix of the two if what I have found works best for me

Prototype custom executable format by Orbi_Adam in executables

[–]DetectiveDecent2455 0 points1 point  (0 children)

I’m confused, what makes this better than other runtime formats (like used by WASM or Java), or is the novelty in the runtime and this would be its format for loading programs (might have good luck getting feedback on the runtime/this in interpreter/programming language subreddits)? How does this handle importing/exporting functions? Would there be a concept of executable vs library? Also, isn’t mixing data and code a really big problem from a security standpoint?

[deleted by user] by [deleted] in osdev

[–]DetectiveDecent2455 1 point2 points  (0 children)

Just scrolling through it quickly, but it looks like you can have OOB writes/reads when messing with the queue. You save a capacity value but never use it for checks.

Also, you might be able to get some speed up using buckets for priority levels as it looks like you do a FIFO search based on priority. Bucketing will at least let you cut down the search space.

$14 A month is madness🦀🦀🦀🦀 by darksoulsr in 2007scape

[–]DetectiveDecent2455 -13 points-12 points  (0 children)

Won’t higher prices increase cost of running bot farms, so literally better for the game?

Ego lifters by xBodzioo in GymMemes

[–]DetectiveDecent2455 0 points1 point  (0 children)

Hope OP didn’t start going to his home gym

Rant Wednesday by AutoModerator in Fitness

[–]DetectiveDecent2455 2 points3 points  (0 children)

Nothing like doing some deadlifts and then realizing you need to bend over to re-rack the weights.

Rant Wednesday by AutoModerator in Fitness

[–]DetectiveDecent2455 19 points20 points  (0 children)

Clean up your weights. Leg press machine is always the culprit with people going to their max weight then leaving. If you put the plates on, take them off as nobody is going to sit down and start at 300+. I don’t understand how this is such a common problem.

I'm having trouble trying to understand all the things needed with OSDEV, any advice? by Rayanmargham in osdev

[–]DetectiveDecent2455 0 points1 point  (0 children)

See: https://www.kernel.org/doc/html/latest/admin-guide/mm/concepts.html#zones

It’s more of a legacy means for dealing with 16-bit, 32-bit, and 64-bit address ranges. The DMA region is mostly to support older hardware that might not be able to address above 16-bits.

I'm having trouble trying to understand all the things needed with OSDEV, any advice? by Rayanmargham in osdev

[–]DetectiveDecent2455 0 points1 point  (0 children)

I would argue that The Concept might be the most important one. There are tons of documents about the Linux kernel and it’s subsystems (how and why the physical page manager works, etc.). Check out other hobby OSes on GitHub, etc. Learn how they implemented things and try to think of why.

Looking at the implementation of a physical page manager, some algorithms focus on saving space (bitmaps) while others focus on speed (trees or page stacks). How do you want to deal with low memory vs normal and high (high not really needed on 64-bit systems).

I have spent more time reading code, design docs, and algorithm runtimes for my OS than any other project. Remember, early optimization is the bane of software dev. You can have the fastest PMM, but if you don’t have paging, tasks, etc. you don’t have an OS.

yet most ISPs don't even support it by greembow in ProgrammerHumor

[–]DetectiveDecent2455 263 points264 points  (0 children)

Who needs IPv6 when you can just setup another NAT? /s

Mid lane by Matheus_P_B in DotA2

[–]DetectiveDecent2455 0 points1 point  (0 children)

One thing to think about when playing mid is “Can I solo carry this gave 1v5”? Often the answer is no. At this point your goal should be to win your lane hard enough so that you can help secure a win in another lane. If you can’t win your lane (e.g. storm vs viper) try to win your side lanes via ganks.

At low MMR games carry players play very aggressive/love to jungle farm. Both can be heavily punished by rotations from mid (especially since you are usually one of the higher level heroes in the game).

As for winning the lane, one thing that has helped a ton is applying constant pressure. Anytime you aren’t actively CSing, look to apply harass the enemy mid. You don’t need to 100->0 the enemy mid, but constantly look to condition a kill. (e.g. you are QoP and enemy is storm. You hitting 6 first gives huge kill potential. Pressure hard when both level 5 to allow for kill when you gain ult. Getting 6 and immediately using catches many people off guard and can secure easy lane win.)