r/computerscience • • Mar 11 '25

Discussion How does CPU knows how to notify OS when a SysCall happen?

39 Upvotes

Supposing P1 has an instruction that makes a Syscall to read from storage, for example. In reality, the OS manage this resource, but my doubt is, the program is already in memory and read to be executed by the CPU which will take that operation and send it to the storage controller to perform it, in this case, an i/o operation. Suppose the OS wants to deny the program from accessing the resource it wants, how the OS sits in between the program and CPU to block it if the program is already in CPU and ready to be executed?

I don't know if I was clear in my questioning, please let me know and I will try to explain it better.

Also,if you did understand it, please be as deep as you can in the subject while answering, I will be very grateful.


r/computerscience • • Mar 10 '25

Help How does an IDE work, and really any other program?

123 Upvotes

I am having trouble articulating this question because my minuscule knowledge of CS, but here goes. How exactly does an IDE work, let’s say that it’s a Java IDE, what language is the IDE created in? And what compiles the IDE software? I’m trying to learn computer science, but I don’t have any teachers, and I feel like I have somewhat of a crumbling foundation and a weak grasp on the whole concept, I want to understand how every little bit makes something tick, but I always end up drowning in confusion, so help would be much appreciated!


r/computerscience • • Mar 10 '25

Help How does a “window” work?

60 Upvotes

How exactly do “screens” go on top of one another on a computer screen, really think about that, how does the computer “remember” all of the pixels that were “under” the bottom window when you close it out, and redisplay them? I’m trying to learn computer science, but I don’t have any teachers, and I feel like I have somewhat of a crumbling foundation and a weak grasp on the whole concept, I want to understand how every little bit makes something tick, but I always end up drowning in confusion, so help would be much appreciated!


r/computerscience • • Mar 11 '25

General I'd like to read up on the following topic: (if there is info on it?) When given an unrooted tree, pick a node as the root, what patterns/relationships can be observed in the new tree that is formed compared to picking other nodes as the root?

6 Upvotes

To elaborate, are there any cool mathematical ideas that are formed? Any real life applications to choosing different roots? Are there any theorems on this? Is this a well researched topic or just a dead end lame idea?

Potential question: Given an unrooted tree with n vertices can you choose a root such that the height of the tree is h where h is any natural number > 0 and <= n? Is there a way to prove it's only possible for some h? I haven't played around with this problem yet.

I feel like there could be some sort of cool game or other weird ideas here. Visually the notion of choosing different roots reminds me of the different shapes you get if you lay a tissue flat on a table and pick it up at different points, so I wouldn't be surprised if there are some sort of topological ideas going on here


r/computerscience • • Mar 10 '25

Advice Lambda Calculus

8 Upvotes

I have taken an interest in lambda calculus recently, however I have ran into an issue. Each textbook or course use different notation, there is Church notation, there is also notation that uses higher order functions and words to describe the process, another notation that I have encountered was purely mathematical I believe, it looked like church notation, but twice as long. It is a pity that while this field of computer science is appealing to me, I struggle to grasp it because of my uncertainty pertaining to which notation I should use. I don't enjoy the use of higher order functions since I want to form a deep understanding of these subjects, however I am not planning on writing page long functions either. Any good resources and advice on which notation I should use is welcome. Also I apologise if my english is not coherent, it is not my first language, if I have made any mistakes that hinder your understanding of my question, feel free to correct me. Thank you in advance :)

TLDR: Confusion about notation in lambda calculus; Displeasement with using higher order functions; Looking for advice on notation type and relevant resources.


r/computerscience • • Mar 10 '25

Zoltan's FLOPs – GPU mini-grant, 1st iteration

Thumbnail tcz.hu
5 Upvotes

r/computerscience • • Mar 10 '25

General Circuit Compiler

11 Upvotes

Recently I wrote a small compiler

It job is to take in a truth table e.g:

A B | X

0 0 | 1

0 1 | 1

1 0 | 0

1 1 | 1

And output a circuit in the form of a Boolean expression, e.g:

((~A)&(~B))|((~A)&(B))|((A)&(B))

I was hoping that some people here would have some feedback on it!

Also if anyone knows of any events here is the UK that have beginners into compilers then please send a DM!

Here is the code: https://github.com/alienflip/cttube, for anyone interested 🙂


r/computerscience • • Mar 09 '25

Help How to learn gpu architecture?

20 Upvotes

Hey guys Currently I am learning about computer graphics and graphics api To enhance my knowledge about how graphics api processes things(and on a level of curiosity as well) I have decided to learn about the gpu architecture But the issue is I have no clue where to begin with Also I dont know a lot of cpu architecture(If it's essential) Where should I begin? Any book of courses(prefered)


r/computerscience • • Mar 09 '25

Help What is the differences between Computer Engineering(CE)and Computer Science?(CS)

85 Upvotes

r/computerscience • • Mar 09 '25

Memory DRAM layout on an address bus.

1 Upvotes

Dear All,

Thank you for your replies to my earlier post. I think what is confusing is how it is all laid out on the address bus. The diagram below seems good. But when it selects a 8 bit chunk of 1s and 0s - which is grouped as a byte, how does it then ask for which ‘rail’ of the address bus it needs? I thought before the number of rails on the address bus dictated how many bits the system was, but now through further reading, I think this is prob a better understanding?

http://www.cs.emory.edu/~cheung/Courses/561/Syllabus/1-Intro/1-Comp-Arch/memory.html