OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Mar 19, 2024 8:04 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3898 posts ]  Go to page Previous  1 ... 252, 253, 254, 255, 256, 257, 258 ... 260  Next
Author Message
 Post subject: Re: What does your OS look like? (Screen Shots..)
PostPosted: Thu Sep 22, 2022 6:47 pm 
Offline
Member
Member

Joined: Tue Feb 18, 2020 3:29 pm
Posts: 1071
devc1 wrote:
But whatever I had never tried to understand what is this hashmap. I just create linked lists

This proves my point. You are looking for performance at the micro level, which is the last place performance should be found at. You should first think about basic algorithms. A hashmap will beat a linked list in lookup intensive operations always. Now is a hashmap always faster? No. It's about using the simplest thing that will give you the best performance.
devc1 wrote:
but I would want to optimize the Schedule(), malloc() and free()

In those cases, don't optimized code, optimize the algorithm and then the code.
vvaltchev wrote:
Then, people start to do benchmarks and look for "low-hanging fruits" to optimize. That's way too late.

Yeah, that's a big problem these days.

My personal philosophy about performance is that instead of "premature optimization is the root of all evil", premature micro-optimization is the root of a lot of evil.
devc1 wrote:
I don't (...) know why Windows, languages such as python, and companies are making all these huge and vast performance losses.

Python is actually pretty fast and more than acceptable for some (e.g., I/O bound) applications. I do agree that Python is overused, however.
devc1 wrote:
You have a (...) multi-core 4000000000 GHz CPU powered with the latest SIMD technologies and you still can't make fast applications.

You need to know that CPU performance isn't nearly as significant in many applications these days as it was before. Most tasks (such as a web server, a web browser, and other things) are actually I/O bound, meaning that the CPU spends most of its time idle and most time is spent waiting around for memory or the disk, which is significantly slower than CPU. Judicious use of disk and memory is key to fast applications these days. Of course some application's performance is bound by the graphics card (3D rendering, video editors, video games) and others are still CPU-bound (primarily software compilation and scientific number crunching, but even the latter is being moved to GPUs. Look up GPGPU). But most of the time, the disk and memory is the bottleneck.

For info on judicious use of memory, look at this research paper:

https://people.freebsd.org/~lstewart/articles/cpumemory.pdf

P.S. Mods, could you please split off this discussion?

_________________
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg


Last edited by nexos on Tue Sep 27, 2022 2:26 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: What does your OS look like? (Screen Shots..)
PostPosted: Sat Sep 24, 2022 9:00 am 
Offline
Member
Member

Joined: Fri Feb 11, 2022 4:55 am
Posts: 435
Location: behind the keyboard
Quote:
optimize the algorithm and then the code.

That's what linked lists with the "bsf" (Bit Scan Forward) instruction do. Instead of looping on items, a simple 64 bit bitmap and the bsf instruction will simply sort a present entry. Such as pages, heaps...
Quote:
In those cases, don't optimized code, optimize the algorithm and then the code.

You're absolutely right.
Quote:
For info on judicious use of memory, look at this research paper

I already discovered it my self, I maximally try to minimize memory accesses in registers, using these methods my Scheduler was able to record a 5us per task switch on a pretty old laptop.

Devc1,


Top
 Profile  
 
 Post subject: Re: What does your OS look like? (Screen Shots..)
PostPosted: Sat Sep 24, 2022 12:59 pm 
Offline
Member
Member
User avatar

Joined: Fri Jun 11, 2021 6:02 am
Posts: 96
Location: Belgium
devc1 wrote:
I already discovered it my self, I maximally try to minimize memory accesses in registers, using these methods my Scheduler was able to record a 5us per task switch on a pretty old laptop.


That is not very fast at all. My barely optimized scheduler, in a microbenchmark, achieves 6µs in QEMU, 3µs on a laptop from 2013 and 7µs from 2012.

This post from 2006 measured context-switch times of an old Linux kernel on various CPUs. The fastest among them has a switch time of 0.89µs

This paper shows that the original L4 kernel achieved a 0.75µs context-switch time in 1997. Modern kernels apparently reduce this to 0.09µs on 32-bit x86.

_________________
My OS is Norost B (website, Github, sourcehut)
My filesystem is NRFS (Github, sourcehut)


Top
 Profile  
 
 Post subject: Re: What does your OS look like? (Screen Shots..)
PostPosted: Sun Sep 25, 2022 6:58 am 
Offline
Member
Member

Joined: Fri Feb 11, 2022 4:55 am
Posts: 435
Location: behind the keyboard
Even if it's a preemptive multiple-priority based scheduler ?
the laptop I am testing it on is from 2008 : ))

But you're right, my new 64-bit scheduler is just garbage. Because my algorithm seems not right, I'll learn more on these priority based scheduling algorithms.


Top
 Profile  
 
 Post subject: Re: What does your OS look like? (Screen Shots..)
PostPosted: Sun Sep 25, 2022 10:25 am 
Offline
Member
Member

Joined: Fri May 11, 2018 6:51 am
Posts: 274
Guys, it looks to me you're mixing up the time consumed by the scheduler to make a decision with the context-switch time. Those things are very different: the context-switch time is the time it requires to switch to the next task (save and store all the registers, page directory etc.), assuming that we already know exactly which one the next task will be. The time consumed by the scheduler to make the decision about which will be the next is a completely different thing.

_________________
Tilck, a Tiny Linux-Compatible Kernel: https://github.com/vvaltchev/tilck


Top
 Profile  
 
 Post subject: Re: What does your OS look like? (Screen Shots..)
PostPosted: Sun Sep 25, 2022 11:00 am 
Online
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
What’s this discussion got to do with what anyone’s OS looks like?


Top
 Profile  
 
 Post subject: Re: What does your OS look like? (Screen Shots..)
PostPosted: Sun Sep 25, 2022 1:07 pm 
Offline
Member
Member

Joined: Fri May 11, 2018 6:51 am
Posts: 274
iansjack wrote:
What’s this discussion got to do with what anyone’s OS looks like?
Nothing at all. Actually, we even asked if a moderator could move the discussion to a dedicated topic as it was good per se. I know we shouldn't continue it here but you know... one comment leads to another and so on.

_________________
Tilck, a Tiny Linux-Compatible Kernel: https://github.com/vvaltchev/tilck


Top
 Profile  
 
 Post subject: Re: What does your OS look like? (Screen Shots..)
PostPosted: Sun Sep 25, 2022 4:34 pm 
Offline
Member
Member

Joined: Fri Feb 11, 2022 4:55 am
Posts: 435
Location: behind the keyboard
Paused all my kernel development to Fight with 2D Algebra : )

- bezier curve connected with 4 points (in red), the gaps will be filled with LineTo() function.
- Rasterized shape (in blue)

Seems like next technology isn't it ? :)
An innovation in the design of OSes haha,

Image


Top
 Profile  
 
 Post subject: Re: What does your OS look like? (Screen Shots..)
PostPosted: Mon Sep 26, 2022 10:41 am 
Offline
Member
Member

Joined: Sat Nov 21, 2009 5:11 pm
Posts: 852
Symbolic debugging, and playing with 3D on an Intel 82845G GPU for which I can't find the manual. Fun fact, commands with errors cause the GPU to freeze and I haven't found a way to clear the error without resetting.


Attachments:
gos2609.jpg
gos2609.jpg [ 117.72 KiB | Viewed 9310 times ]
WIN_20220926_17_55_18_Pro.jpg
WIN_20220926_17_55_18_Pro.jpg [ 57.47 KiB | Viewed 9310 times ]
Top
 Profile  
 
 Post subject: Re: What does your OS look like? (Screen Shots..)
PostPosted: Tue Sep 27, 2022 2:24 pm 
Offline
Member
Member
User avatar

Joined: Fri Aug 07, 2015 6:13 am
Posts: 1134
Loading programs from the disk and running them in user mode + process/thread garbage collector thread + programs can finally crash and terminate without bringing the whole system down.
I also implemented exiting so programs no longer execute garbage after their execution is done.
Working on argument passing, ELF support, synchronization primitives and virtual 8086 threads as we speak...


Attachments:
multitasking stuff.png
multitasking stuff.png [ 16.74 KiB | Viewed 9225 times ]

_________________
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 08, 2022 7:12 am 
Offline
Member
Member
User avatar

Joined: Mon Mar 05, 2012 11:23 am
Posts: 616
Location: Germany
Lately I fixed many, many terrible kernel bugs; improved overall performance and worked on some UI components like scrollable areas and layouting.

Attachment:
0.10.1.jpg
0.10.1.jpg [ 69.97 KiB | Viewed 9022 times ]

_________________
Ghost OS - GitHub


Top
 Profile  
 
 Post subject: Re: What does your OS look like? (Screen Shots..)
PostPosted: Sat Oct 08, 2022 7:36 am 
Offline
Member
Member
User avatar

Joined: Mon Jun 05, 2006 11:00 pm
Posts: 2292
Location: USA (and Australia)
Your UI looks great, max!

I've ported Skia to my OS, but using identical logic, so my UI still looks the same.

_________________
My OS is Perception.


Top
 Profile  
 
 Post subject: Re: What does your OS look like? (Screen Shots..)
PostPosted: Sat Oct 08, 2022 8:15 am 
Offline
Member
Member
User avatar

Joined: Mon Mar 05, 2012 11:23 am
Posts: 616
Location: Germany
AndrewAPrice wrote:
Your UI looks great, max!
Thanks! :) Did a little fine-tuning but mostly I've been working on the interface that other processes use to create/control components, still a lot to do

_________________
Ghost OS - GitHub


Top
 Profile  
 
 Post subject: Re: What does your OS look like? (Screen Shots..)
PostPosted: Mon Oct 17, 2022 3:18 pm 
Offline
Member
Member

Joined: Thu May 06, 2010 4:34 am
Posts: 116
Location: Leiden, The Netherlands
Image
Image
:) Xorg (or rather, Kdrive/Xfbdev) running on my OS, hosting TWM.

_________________
posnk ( a simple unix clone )
twitter profile - security research, die shots and IC reverse engineering, low level stuff


Top
 Profile  
 
 Post subject: Re: What does your OS look like? (Screen Shots..)
PostPosted: Tue Oct 18, 2022 2:34 am 
Offline
Member
Member
User avatar

Joined: Mon Mar 05, 2012 11:23 am
Posts: 616
Location: Germany
Peterbjornx wrote:
:) Xorg (or rather, Kdrive/Xfbdev) running on my OS, hosting TWM.
That wallpaper is burning my eyes :mrgreen: But awesome to see something like Xorg running. How big are the requirements for that?

_________________
Ghost OS - GitHub


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3898 posts ]  Go to page Previous  1 ... 252, 253, 254, 255, 256, 257, 258 ... 260  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], iansjack and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group