D
D
Daniel2021-03-25 01:38:00
Programming
Daniel, 2021-03-25 01:38:00

Green thread implementation example?

What is the implementation of green streams in virtual machines or anywhere (in similar languages, not all sorts of lisps), for the life of me, but I can’t understand the code from 1000 files.
Exactly how to write it anywhere without cheating. .
How to write a thread scheduler, more precisely, what you need to have, know, a complete list for this. Type its own memory area, its own Virtual Machine. It's all already there. More than 100 opcodes with all types of addressing. The project is purely for fun.
Do I understand correctly that you need to implement an interrupt system and a thread scheduler, or you can write without it (and I didn’t find the word IRQ interrupt in the source codes of the virual box, maybe I was looking badly). And in general, imitation of interrupts, purely at first glance, will have a bad effect on performance). Plus, I want to do everything in 1 thread, without cheating anywhere, and not going beyond the scope of my code area, and interrupts from external devices need their own threads)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-03-25
@vabka

It's not Java but still.
200 line explanation of lightweight threads in Rust

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question