/r/systems

Photograph via snooOG

This is the home page of the /r/systems community on reddit.

This group is related to low-level programming issues involving the design and implementation of data structures and management techniques, compilers, operating systems and computer architectures. The hope is that people provide references to peer-reviewed work or strictly-analytical pieces.

We also have an IRC channel on irc.freenode.net, ##systems. If you don't have an IRC client, you may use a web-based client at http://webchat.freenode.net/?channels=%23%23systems

/r/systems

6,979 Subscribers

0

How do threads work?

Hello, I get confused by the concept of threads. I understand most CPU cores nowadays have multiple threads to allow for parallel execution of tasks at the kernel level and this is for the sake of efficiency which we love. However, I'm reading up on some JavaScript tutorials from MDN (great stuff btw, very well written) and I got onto the topic of async/defer scripts in HTML. So from my understanding, this tells the browser to download scripts in a thread separate from the HTML. Is this using threads from the CPU? Isn't JS single-threaded? Are these threads allocated from the system for the browser application as a share of the total number of threads available on the respective machine? Any resources/explanations are appreciated.

4 Comments
2024/03/24
02:13 UTC

1

Connecting 2 Garages

Not sure if this is the correct place but. I am helping my friend who is blind and makes content on youtube with setting up some streaming. He has two Garages, both with internet access. The computer is in one garage but want to have cameras set up in the other garage. One of the issues is trying to have airpods set up to the computer so that the chat log can be read out by the computer and he can hear and interact with viewers. What would be the solution to keep the airpods connected while walking from the garage with the computer, to the other garage out of bluetooth service?

1 Comment
2024/03/15
14:52 UTC

0

ERP slack community for chat

hi y'all, I've created an ERP slack channel for anyone who favors chat based communities or discussion as opposed to post based.

it's a place to:
- introduce yourself
- get help
- share recommendations

cheers

https://join.slack.com/t/slack-bpt4135/shared_invite/zt-2elmyn6vl-R~ApaoPK4qCOJnDRzofViQ

0 Comments
2024/03/09
19:26 UTC

1

Global Private Equity Investments in Systems Software Companies Experience Second Consecutive Year of Decline

0 Comments
2023/11/10
11:55 UTC

0

Are you still using “just” Local AD?

0 Comments
2023/10/29
23:06 UTC

0

Centaur server 7.0 max user limited reached.

Is there a way I can extend my user capacity or open a second group of users? Thank you

1 Comment
2023/08/14
14:19 UTC

0

How to clear correctly the readonly usb attribute?

Hi, i have a USB that was gifted from HP when i call for a customer support some day, i try to clear the readonly but nothing happen and in the properties there is no Security option.

https://preview.redd.it/zg5qwwiubt6b1.png?width=1920&format=png&auto=webp&s=dff852cda7737130c730ca5fe08399404cdaf535

https://preview.redd.it/p0edyf6pbt6b1.png?width=1920&format=png&auto=webp&s=7311add7df4fe69af70fcfb3cc0f40fa883ba881

1 Comment
2023/06/18
17:46 UTC

0 Comments
2022/11/18
21:58 UTC

3

Pointer to library usage

Probably a dumb question, but having never taken any compiler/OS course, I couldnt find any answer online. Say, I have a program, which calls a shared library API , and that needs a pointer to be passed, which the library will fill with data. So, in my func_a(), if I create a local variable, pass the address of this to the library, when the library tries to fill that pointer, how will it work? Because my basic OS knowledge was that, each program has its own virtual addr space, so passing my local variable' addr to that lib, and if the lib tries to dereference, how does addr translation work? Wouldnt the lib have its own virtual addr space and could conflict my local addr space?

void func_a()

{

struct local lcl;

get_lcl_filled(&lcl);

}

----- library;

void get_lcl_filled( struct local * p_lcl)

{

struct local temp;

strcpy(temp.name, "ABC");

p_lcl->id = 123;

strcpy(p_lcl->name, temp.name);

return;

}

2 Comments
2022/11/05
14:22 UTC

7

Primer on state-of-art in congestion control in modern data center networks

Everything I know about (TCP) congestion control in data center is quite old, having covered the basics in an undergraduate computer networking class. I also realize the state of the art has moved along quite a lot -- modern networks have multiple links, different topologies and load balance across them, ECN is more common place and algorithms based on BW-delay product, explicit admission control and RTT measurements are commonplace. Finally, I also realize that there are schemes and approaches that I probably don't even know of given I haven't followed this field closely.

There seems to be a complex play between workloads, desired properties, network topologies and algorithms and I'm looking for anything a primer/summary/lecture notes/class on the underlying principles and concepts on which modern algorithms are being designed. Anything that would allow a person 20 years out-of-date to come up to speed in the developments that have happened in the last 20 years.

As a bonus I would also appreciate any links to papers/resources on how modern data center topologies are constructed and used (if any exist).

I realise there may not be a "one resource" but a series of papers; for those that follow this field, what would you recommend?

2 Comments
2022/09/23
18:10 UTC

2

Want a nice place to learn Cyber Security? Or do you prefer more programming? or even System Administration? Come join!

I've started a new Discord server for getting people more known in Coding, Hacking and System Administration. Now you can see this as a promotion, but I feel it could be a great start for helping people achieve their goals. It's free education and free help! There are already a couple of certified professionals in the server ready to help. Now we are not talking about youngsters, we are talking about adults ready to teach you what you are willing to learn. https://discord.gg/tMn4EVd5Dj < - this is the server, you can join if you are interested. It took a lot of work to build it up (especially the ranks..) Thank you for reading and hopefully you'll decide this is a good choice for you! And since we also for privacy, main-chat is bridged with matrix: https://matrix.to/#/!BOfwIdrLfIWKjcQJbH:matrix.org?via=matrix.org&via=t2bot.io

1 Comment
2022/09/18
14:13 UTC

13

What makes a ‘really good’ systems programmer

So I recently got interested in systems programming and I like it. I have been learning Go and Rust. I know to expand the potential projects I can do, it would useful to learn operating systems, distributed systems, compilers and probably take a computer systems class. Throughout the process I’d hopefully find what I like and dig deeper.

However, I don’t have an idea of what makes a decent systems programmer. I believe that it would be a good thing to have a sense of an ideal I can work towards. It doesn’t have to be objective. I think one would be useful to make me plan for my study and progress. Currently I just have project ideas which idk if it’s all I should do.

Maybe I have a skewed sense of what I should do in this space. I would appreciate any direction.

3 Comments
2022/07/30
01:16 UTC

4

If the scheduler sends interrupts constantly to context switch and to pass to another process, so why a certain process that consumes too much CPU can freeze the computer? Shouldn't scheduler go on with other processes equally? Why can it monopolize the CPU and freeze computer?

5 Comments
2022/05/24
06:44 UTC

5

Four doubts about threads and implementations in Linux and Windows

I studied that in Linux, user level threads are mapped 1:1 to kernel level threads, and threads have the same type of PCB that we are for processes. About Windows, what's the difference with Linux? I studied that Windows threads are mapped m:n with pools of worker threads. So:

  • Are the created threads just shown in the system process table (the table that contains all the pid and the pointers to the relative PCB in memory) like all the processes, or they aren't? If not, where are they stored? How can the scheduler decide if they are not in the system process table?
  • Since when I start a simple process, it is itself a thread (I can check it via ps command, and on Windows it should be the same), what's the difference between them? Is there a difference on how the system (Linux or Windows) see them? Or are they the same thing but the the "non-main" threads(the ones created within the process) share the same virtual address space with the main-thread(the process that created them)?
  • How are threads told to access only certain things, if they have the same "block map table" in the PCB since they have the same virtual address space (and thus could in theory access everything)? Who sets and sees the constraints? Where are these constraints written?
  • Does pthread library simply provides API that will create a kernel level thread starting from a user level thread(so 1:1 mapping), setting the relative priority(I can do it via pthread, but I don't know how this scheduling priority is handled) of the kernel level thread that will be seen by the kernel in scheduling act? Or maybe EVERY time the kernel level thread corresponding to one of my user level threads is scheduled, pthread MUST act as middleman and then there is this forced "bridge" and this overhead maybe because pthread library can manage scheduling things (again like I said before, when I start a thread with pthread, I can set some scheduling priority in my threads) so maybe it can dynamically choose which of its (pthread's) user level thread to run, when any of the kernel level thread of its (pthread's) is scheduled?
1 Comment
2022/05/08
09:41 UTC

Back To Top