Jajcus

joined 1 year ago
[–] [email protected] 81 points 9 months ago

Well behaving programs give control back to the kernel as soon as they are done with what they are doing. If they don't the control is forcefully taken away after some assigned time.

It looks something like this:

Something happens – e.g. a key is pressed – a process waiting for this event is woken up and gets e.g. 100ms to do it stuff. If it can handle the key press in 50ms, kernel notes it used 50 ms of CPU time and can give control to another process waiting for an event or busy with other work. If the key press triggered long computation the process won't be done in 100ms, the kernel notes it used 100ms of CPU time and gives control to other processes with pending events or busy with other work.
After one second the kernel may have noted:

Process A: used 50ms, then nothing, then 100ms, another 100ms and another 100ms
Process B: was constantly busy doing something, so it got allocated 6 * 100ms in that one second
Process C: just got one event and handled it in 50ms
Process D: was not waken at all

So total of 1000ms was used – the CPU was 100% busy
Of that 60% was process B, 35% process A and 5% process C.

And then that information is read from the kernel by top and displayed.

How does the OS even yank the CPU away from the currently running process?

Interrupts. CPU has means triggering and interrupt at a specific time. Interrupt means that CPU stops what it is doing and runs selected piece of kernel code. This piece of kernel code can save the current state of user process execution and do something else or restore saved execution of another process.

[–] [email protected] 3 points 9 months ago

If your browser or your OS insist on only trusting $1000 certificate, blocking access to most of the internet, then change the browser or OS. There is no grand authority telling which root certificates can be trusted. Yes, Google or Apple could scam their users this way if they wish to, but it would not make much sense for them. People would use something else.

[–] [email protected] 4 points 9 months ago

..and not even 'because I am never happy'. It is the melody that is nothing like happy and hearing it makes me unhappy.

[–] [email protected] 9 points 9 months ago (2 children)

I joined a local maker space and met great people, sharing similar interests. Surprisingly (to me when I joined) most seem to be over 40, like me, and there are as many women as men here.

[–] [email protected] 11 points 9 months ago (1 children)

Yeah 'make a better tea by making it taste less like a tea'. I have seen a lot of that from people who just don't like tea.

Though, for me that also include Brits, who spoil a good tea by adding milk ;-)

[–] [email protected] 22 points 9 months ago (1 children)

Have you ever worked with a computer with modern general-purpose OS like Linux and no RTC? It sucks. It is not strictly necessary, you can live without it, but you need workarounds for basic stuff timestamps in log files or in the file system. At least for a minute until NTP connection is established, but may be longer when internet connection is not available. And when routers are rebooted most often? When troubleshooting broken internet connection. This is also the time when properly timestamped logs could be useful.

And battery backed RTC is cheap. It doesn't fit on a Raspberry Pi board, but can easily fit into a router case. No excuse for omitting it.

[–] [email protected] 14 points 10 months ago (3 children)

This would only give more power to the remaining billionaires, who won't disperse money on their own. This is why it must be a systemic change and not a volunteer action.

[–] [email protected] 26 points 10 months ago

Bad zoning laws are bad. And these laws are really bad (forcibly separating 'business' and residential are makes no sense to me) , but completely deregulating that (like allowing residential building directly adjacent to a dangerous chemical plant or in a flood zone) would be as bad.

[–] [email protected] 3 points 10 months ago

URLs are definitely encrypted. What can be sent unencrypted are domain names and IP addresses. Which is not a problem when the host name is 'youtube.com', but is a bigger problem if it is 'the-terrorists.com'.

[–] [email protected] 8 points 10 months ago (1 children)

In Europe those often cover whole cities.

[–] [email protected] 3 points 10 months ago

Exactly the same in Polish (same spelling).

[–] [email protected] 16 points 11 months ago (1 children)

Isn't that their long national tradition? Like with paper technology, silk technology or porcelain technology?

view more: ‹ prev next ›