OS Context Switching - Computerphile

  Рет қаралды 108,806

Computerphile

Computerphile

4 жыл бұрын

How does an operating system juggle different programs? Dr Steve Bagley explains Context Switching.
EXTRA BITS: • EXTRA BITS: More on Co...
/ computerphile
/ computer_phile
This video was filmed and edited by Sean Riley.
Computer Science at the University of Nottingham: bit.ly/nottscomputer
Computerphile is a sister project to Brady Haran's Numberphile. More at www.bradyharan.com

Пікірлер: 155
@MichaSpielt
@MichaSpielt 4 жыл бұрын
Strange how you always upload these videos just after I wrote my exam about the topics
@vipsylar6370
@vipsylar6370 4 жыл бұрын
Hahaha
@TraitorVek
@TraitorVek 4 жыл бұрын
Academia
@nicholaszenos6180
@nicholaszenos6180 4 жыл бұрын
I have an os exam that covers this stuff next week so lucky me
@tritrinh568
@tritrinh568 4 жыл бұрын
May I read? :)
@fletcherreder6091
@fletcherreder6091 4 жыл бұрын
How did you post this from a week in the future?
@proudsnowtiger
@proudsnowtiger 4 жыл бұрын
Once did a pre-emptive (interrupt driven) multitasking teeny tiny kernel in Z80 that could do a complete process switch in < 400 T-states. A thing of beauty. This was about four years after anyone would want a multitasking Z80 system, so the project got canned, but just for a moment is was deeply satisfying.
@blahchop
@blahchop 4 жыл бұрын
Nice
@lucidmoses
@lucidmoses 4 жыл бұрын
Back in the DOS - 8088 days I did my own cooperative multi tasking inside a C program by allocating memory for another stack and doing some fancy fiddling with the BP pointer and such. It was a supper fast context switch. Basically just push the BP to the appropriate stack and then return. The return would return you to the other thread.
@Chriva
@Chriva 4 жыл бұрын
Never done anything that advanced but I must admit I've cheated with the return-trick on a few processors to save space. Really neat to branch that way when you have full control (obv not convention conformant) :)
@lucidmoses
@lucidmoses 4 жыл бұрын
@@Chriva Yeah, this level of tinkering isn't really needed any more.
@frechjo
@frechjo 4 жыл бұрын
@@0x90h He said "cooperative multitasking", you are thinking preemptive multitasking. It probably switched on specific calls, no need for timer interrupts.
@mikefochtman7164
@mikefochtman7164 4 жыл бұрын
Learned a lot about this topic on SEL's MPX OS. Combined real-time 'hard' priority switching and 'round-robin' priorities. Was pretty interesting setup and could 'peek' in various OS structures.
@nico-s29
@nico-s29 4 жыл бұрын
Props to the guy animating the drawings
@trevinbeattie4888
@trevinbeattie4888 4 жыл бұрын
Will you be doing a video on virtual memory management? This was a big step in processor evolution from the MC68000 to MC68030 (and probably other CPU's ;) ) which has a direct relationship with context switching, as the OS not only needs to swap the register set but also the page translation tables.
@joelvanin
@joelvanin 4 жыл бұрын
Excellent time I am just learning it this week, love this channel
@SupaKoopaTroopa64
@SupaKoopaTroopa64 4 жыл бұрын
This is the Computerphile video I've always been waiting for!
@artiem5262
@artiem5262 4 жыл бұрын
In the DEC VAX instruction set, there are (privileged) instructions for saving process context and loading process context. At least for the first few releases of DEC's VAX/VMS operating system, there were two instances of save process context, and one instance of load process context in the OS core. Yes, VAX is probably the epitome of complex instruction sets!
@MrMalchore
@MrMalchore 4 жыл бұрын
These videos make it sound so simplistic. But if you tried to read Linux source code...grab the asprin.
@skrrBOP
@skrrBOP 4 жыл бұрын
This video is explaining the simplest context switch, it's obvious that Linux is much more complex.
@erikawwad7653
@erikawwad7653 2 жыл бұрын
use an ide, they make it so much easier
@SimGunther
@SimGunther 2 жыл бұрын
@@erikawwad7653 To load in that much source code? Better luck with pen and paper hand debugging than loading in 3GB of source code with all that indexing!
@erikawwad7653
@erikawwad7653 2 жыл бұрын
@@SimGunther I'm sure lazy indexing is a thing
@dsedchenko
@dsedchenko 4 жыл бұрын
Thank you for the video! Can you make please a video about how protection rings and how process isolation is working?
@cmdlp4178
@cmdlp4178 4 жыл бұрын
Could you go deeper into the interrupt mechanism, which was mentioned at the end. I want to understand what happens on multi core processors
@dannynewman82
@dannynewman82 4 жыл бұрын
Good vid man. Really informative 😀
@franchello1105
@franchello1105 4 жыл бұрын
I built something like this for my final project in Operating Systems in college.
@lidorbenshimol1838
@lidorbenshimol1838 2 жыл бұрын
hello, I would like to know if Threads effect Context Switch Also, if they do, does it mean that the more Threads there is --> More Context Switch will be?
@ailuros_
@ailuros_ 4 жыл бұрын
I would love even more if this video had english subtitles :| btw, great video! thx
@pierreabbat6157
@pierreabbat6157 4 жыл бұрын
I've seen the way to save and restore context on the CDC 6600 (18-bit address registers, 60-bit data registers, no stack). It is quite involved and tricky. One register has to be saved a bit at a time before it can be used to save the others.
@perschistence2651
@perschistence2651 4 жыл бұрын
I did not understand some things. What is the difference between "SWI 3" and "SWI 4"?
@marlandkennedy7747
@marlandkennedy7747 4 жыл бұрын
Where were you when I was taking operating system class. Well you might not have been born when I took it.
@EvertBorghgraef
@EvertBorghgraef 4 жыл бұрын
Which is the original video that he is referring to in the beginning?
@lawrencedoliveiro9104
@lawrencedoliveiro9104 4 жыл бұрын
9:09 You’ve already said that the registers seen by the OS kernel are not the same as those seen in user mode, even though they have the same names. So presumably the OS has access to special instructions for accessing the user-mode registers, in order to do this save/restore (and no doubt other purposes like obtaining arguments and returning results for SWI calls)?
@zeektm1762
@zeektm1762 3 жыл бұрын
The same registers are being used. I'm unsure of his explanation. The same registers are being used throughout however the previoisly running tasks has a frozen copy of the state the registers were in at that processes time stored in memory.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 3 жыл бұрын
No, the registers have the same names, but kernel mode has its own separate registers. This avoids having to save/restore registers when switching modes.
@phoenix2464
@phoenix2464 4 жыл бұрын
Dr Steve, always making making us hungry for more. literally.
@crtxl
@crtxl 4 жыл бұрын
A like from me because of the Ataris in the background.
@JerehmiaBoaz
@JerehmiaBoaz 4 жыл бұрын
"APR RO, iString" should be ADR R0, iString
@IceMetalPunk
@IceMetalPunk 4 жыл бұрын
Thank you. I was confused; I was like, "Wait, what's the APR opcode? How is it different from ADR?" I Googled it and couldn't find anything about APR, so I concluded it was a typo. But man, that's 3 minutes of my Googling life I'll never get back :P
@HenryHoneyBadger
@HenryHoneyBadger 4 жыл бұрын
Yeah saw this too, beat me to it.
@blahchop
@blahchop 4 жыл бұрын
@@IceMetalPunk lol
@aVeryHandsomeWall
@aVeryHandsomeWall 4 жыл бұрын
I stumbled upon your channel and the name remembers me of sciencephile the AI :( But great video :)
@su8z3r03
@su8z3r03 Жыл бұрын
Is context switching the same as process switching ??
@BusAlexey
@BusAlexey 4 жыл бұрын
I'm kind of new to this, but what if we have two video-playing programs running at the same time? by the logic that only one thing can be running, aren't we going to see constant glitches on both videos as it tries to do them?
@Chriva
@Chriva 4 жыл бұрын
Still switching. The hardware is using a lot of tricks (like buffering, dma, hardware decoding etc) These days we also have more cores that can spread the load and switching but it worked just as well on a single core back in the "stone age" :) Video isn't actually played frame-by-frame in that sense. Same goes for audio. Just imagine the micro stutters if you had to manually push a sample value 44.1/48 (or higher) thousand samples a second to the sound card/onboard audio :P
@vincei4252
@vincei4252 4 жыл бұрын
There is process level context switching and thread level context switching. It is done extremely quickly so from a humans perceptual perspective you wouldn't notice. In a windowed OS having two games running in two different windows regardless of how many physical processors there are is perfectly fine. The operating system knows that there are two programs running and isolates them from each other.
@myrrdyn
@myrrdyn 4 жыл бұрын
Without considering double buffering and other tricks, a video playing at 60 fps means that you have 1/60 seconds = 16.6 ms to process one frame, so if your video decoder takes less than that there is no problem.
@trevinbeattie4888
@trevinbeattie4888 4 жыл бұрын
Neither program would (or should) have direct access to the video hardware. That's one of the functions of the OS - to manage programs' access to devices. In a simple system, only one program would get to display its video and the other would block waiting for the video device to become available. In modern windowing systems, the display process (e.g. X Window System) has control of the video output, and programs send their video streams to it to arrange and display as the window system sees fit.
@acommenter
@acommenter 4 жыл бұрын
what is the video being referred to at 8:50-9:00 ?
@James-ln6li
@James-ln6li 4 жыл бұрын
I came here to ask the same question.
@VivekYadav-ds8oz
@VivekYadav-ds8oz 3 жыл бұрын
I've been persistently confused about how is an OS really written? malloc(), free() all call OS's subroutines to allocate space, the stack-heap architecture is also imposed by the OS, then how does one manage all this when they're writing the OS themselves? How do they allocate memory? How do they make space before their program starts (stack for temp variables and heap), if the language itself assumes this would be provided by the OS?
@lapatatadelplato6520
@lapatatadelplato6520 Жыл бұрын
They would do much of that in assembly. In assembly, all one needs to do is define all of the memory to be an array you can allocate, and then switch control over to C. From there, you would write your own Malloc and free, and everything else. Lookup Baremetal programming in C
@dariokartal9453
@dariokartal9453 Жыл бұрын
That is one cool shirt! It's got spiraling galaxies, rockets, the planet Earth, Saturn, stars... I have a similar one with just random white dots, but yours is it.
@LewisCowles
@LewisCowles 4 жыл бұрын
Thusly describing the problem with context switching and maintaining hardware & software state parity in application layer, which is why kernel-space exists. Kernel space does not cleanly fix this, it just defers from program code, allowing it to be thinner and SWI {n}. By inferring that the driver will be better equipped than an application to maintain state we get less rigid applications which work across hardware due to conforming to specifications such as OpenGL {x} compatibility. Anyone using unsupported hardware on Linux, Window or Mac has seen the issues of this decision though. Things either don't work if you switch the focused application and switch back, or devices do not work, etc. HMP > SMP all day long
@KangJangkrik
@KangJangkrik 3 жыл бұрын
Question: how does CPU store its context into HDD when S4 ACPI state (hibernate) fired?
@gregoryfenn1462
@gregoryfenn1462 3 жыл бұрын
That’s way too specific; not related to this video. You had better just Google it.. maybe stack overflow can help you
@KangJangkrik
@KangJangkrik 3 жыл бұрын
@@gregoryfenn1462 well... yes, but if I satisfied by google search then I don't have to comment here. And second, there must be a mechanism to store context state somewhere at swap region. So that still related to the video.
@cmdlp4178
@cmdlp4178 4 жыл бұрын
Machine code, but also compiler builtins could be used.
@peppybocan
@peppybocan 4 жыл бұрын
I wonder how is the context switching done on the real-time OS.
@jdm8963
@jdm8963 4 жыл бұрын
I'm sure it will be in a simpler way to deal with time restrictions.If anyone can tell.
@Chriva
@Chriva 4 жыл бұрын
The usually use one of the chips timers to perform the switching. (notice how you rarely have access to all the hardware timers) :) I honestly don't know the details how they create threads and whatnot but the switching itself is usually triggered by a timer.
@steefant
@steefant 4 жыл бұрын
it's not different apart from that the list of threads and PCB are/might be simpler. the process of switching context takes of course some time and thus increases the lower bound of reaction time the OS can guarantee. however, this is fairly fast in comparison to other more complex tasks of an OS. the timing of preemption can be controlled by setting up a timer if need be (e.g., to make sure a periodic task gets run/started at exactly its set period).
@trevinbeattie4888
@trevinbeattie4888 4 жыл бұрын
The main difference is in deciding when to switch and which process gets priority. As mentioned in the video, ordinary operating systems can either switch when the application relinquishes the CPU or on a regular timer. Additionally, the OS may do a context switch in response to an interrupt from an external event, which can change a process'es state from waiting to ready. In a RTOS, emphasis is put on process priority in the process list, so if the highest-priority process was already running the OS won't switch it out; but if a higher priority process becomes ready, the OS will switch to it right away.
@salerio61
@salerio61 4 жыл бұрын
Why would you think it would be different? The hardware interrupt is the thing lacking on the Arduino :( I've 30 years as a design engineer on r/t embedded systems from the GEC4000 onwards if you want to ask. That processor was as real-time as it gets.
@MrSigmaSharp
@MrSigmaSharp 4 жыл бұрын
Is this how hibernation works? If so how os preserves itself?
@Xilefian
@Xilefian 4 жыл бұрын
I've been programming exactly this kind of stuff recently for an embedded platform
@BankShotter
@BankShotter 4 жыл бұрын
That's really cool!
@bytefu
@bytefu 4 жыл бұрын
Some kind of Cortex-M, I presume?
@konstantinrebrov675
@konstantinrebrov675 4 жыл бұрын
Can we have a video about FPGAs and how they work?
@glynwatkins9968
@glynwatkins9968 4 жыл бұрын
no interrupts in the program??
@pfefferle74
@pfefferle74 4 жыл бұрын
"SWI" is the software interrupt instruction in ARM assembly - the equivalent to "INT" in x86 assembly.
@FredrikRambris
@FredrikRambris 4 жыл бұрын
Does CPUs generally have instructions for dumping and loading all registers or does the programmer need to write code to dump each register one by one?
@schifoso
@schifoso 4 жыл бұрын
For a context switch, the CPU or OS should be preserving the registerers. For function calls, the programmer must preserve register values that may be destroyed, unless the value is supposed to be destroyed such as when the register will contain a return value.
@SethPentolope
@SethPentolope 4 жыл бұрын
Generally yes, mostly. Sometimes some registers are expected to not be saved though, so in those cases you wouldn’t want to. Depends on the calling convention and sometimes veneers that the assembler/linker might want to generate and use for memory offsets. With the ARM assembler I am using currently, I can type “push {r1,r2,r3}” to push those three registers to stack (pop is the same syntax) and I can specify any number of registers for that to happen for. I think there is an x86/x64 instruction for it, but I don’t know it off top of my head.
@GordonAitchJay
@GordonAitchJay 4 жыл бұрын
With the Motorola 68k you can copy/restore all the data and address registers with one Move Multiple Registers instruction. For example: movem.l d0-a6,-(sp) ; copy to stack movem.l (sp)+,d0-a6 ; copy back from stack
@Flankymanga
@Flankymanga 4 жыл бұрын
Guys can you make a video about Formal methods in software development context?
@casperes0912
@casperes0912 4 жыл бұрын
If you're interested in that you may want to look at CompCert, the mathematically proven compiler
@vertexedgeface3141
@vertexedgeface3141 4 жыл бұрын
^ Also functional programming using pure functions.
@ELYESSS
@ELYESSS 4 жыл бұрын
I know this. I dunno why I am still watching
@noizy514
@noizy514 4 жыл бұрын
I want to eat jelly candies now. :(
@rhoharane
@rhoharane 4 жыл бұрын
I also want that shirt.
@olaff667
@olaff667 4 жыл бұрын
very nice mdma crystals
@iStormUK
@iStormUK 4 жыл бұрын
By eating the jellybaby he caused windows to bluescreen. Protip: Never eat those VXDs no matter how tasty they are!
@albertbatfinder5240
@albertbatfinder5240 4 жыл бұрын
How does the OS do things (compare things, count, move things about, whatever) without clobbering a client program’s registers? I mean, the OS is just another program, isn’t it? Is it context switching itself in and out? How would it ever get back in, if it were out?
@vk3fbab
@vk3fbab 4 жыл бұрын
Depends on the architecture. In ARM the supervisor program or OS gets its own set of registers in hardware. In other architectures the OS might need to be careful by storing registers on entry. You could also hack by saying the OS uses these registers much like calling conventions for function calls. Context switching is similar to how function calls work on processors that stack registers for you just different processes.
@schifoso
@schifoso 4 жыл бұрын
That's what the whole video is about. The registers of the program/thread are preserved in memory before the values of the new processors registers are loaded from their saved state.
@wmrieker
@wmrieker 4 жыл бұрын
timerinterrupt: push registers on stack point a register to current pcb (current pcb held in static memory location) save stack pointer in that pcb you now have all registers to figure out which process is next point a register at new pcb (same static memory location as above) load stack pointer from that pcb pop registers from stack rti
@AstAMoore
@AstAMoore 4 жыл бұрын
The TL;DR version: PUSH AF PUSH BC PUSH DE PUSH HL . . . do some stuff . . . POP HL POP DE POP BC POP AF RETI
@janhetjoch
@janhetjoch 4 жыл бұрын
TL;DW*
@BicyclesMayUseFullLane
@BicyclesMayUseFullLane 4 жыл бұрын
lol Z80 now do ARM and amd64 😁
@az09letters92
@az09letters92 4 жыл бұрын
That's just a simple interrupt handler... not pre-emptive multitasking.
@HenryHoneyBadger
@HenryHoneyBadger 4 жыл бұрын
ARM doesn't have the concept of push/pop/return instructions. It has pseudo stack operations.
@martin.pokorny
@martin.pokorny 4 жыл бұрын
Hah, I recognize this. I'm learning Z80 assembly (seriously). I'm new in assembly and Z80 is relatively simple.
@MrSpikegee
@MrSpikegee 4 жыл бұрын
@3:24 small typo: APR op-code instead of ADR
@MatthewHarrold
@MatthewHarrold 4 жыл бұрын
The Doctor played by Tom Baker has a huge influence on modern culture. I don't care if it was intentional or not. The influence has been detected, it's out there, there's no putting it away. Lovely.
@DrSteveBagley
@DrSteveBagley 4 жыл бұрын
You may well think that, but I couldn't possibly comment…
@MrXoury
@MrXoury 4 жыл бұрын
The missile knows where it is . . .
@RustyTube
@RustyTube 4 жыл бұрын
Yes, but you not only have to save/restore R2 but also D2. Otherwise the Death Star will explode during the context switch.
@sonisphere098
@sonisphere098 4 жыл бұрын
yes
@romanabeiro9181
@romanabeiro9181 3 жыл бұрын
i need subtitles, por favor
@Vinxian1
@Vinxian1 4 жыл бұрын
This video would have been great before I had to make a port for my microcontroller in FreeRTOS ;P
@quill444
@quill444 4 жыл бұрын
It resembles simple Push & Pop Stack within plain Assembler or Machine Code. - j q t -
@aleshiukas
@aleshiukas 4 жыл бұрын
Why NOP ?
@iabervon
@iabervon 4 жыл бұрын
I think he's got the NOP in the wrong place. I'm pretty sure it's supposed to be after setting the PC to the task's next unexecuted instruction, and is there because the processor loads the next instruction while it's executing the current one. With a branch, it discards the instruction that it loaded while it was executing the branch, but just setting the PC misses that hardware, so it's going to execute the instruction from the OS code that's right after the context switch code as if it were an instruction of the program it's switching to, while it loads the next instruction in the program. So you just make that instruction a NOP, so it doesn't do anything weird.
@JPBennett
@JPBennett 4 жыл бұрын
Related and interesting: Hyper-threading (SMT) is essentially hardware accelerated context switching.
@Chriva
@Chriva 4 жыл бұрын
Nah, they're letting other threads execute instructions with unused parts of the chip (almost impossible to use every single part of a processor with one single instruction). While one is doing an addition, another thread could use the fpu or read from memory etc
@philsburydoboy
@philsburydoboy 4 жыл бұрын
@@Chriva Yeah, Christian is right. Hyperthreaded CPU "threads" have their own independent set of registers, but share a set of instructions. There is just some logic implemented to make sure they aren't ever running the same instruction at the same time. You might be thinking multi-threading, but that is only sometimes true. The amount of context switching you have to do is (naively speaking) #threads/#CPUs. If you had 4 threads and 4 CPUs, you don't need any context switching.
@cfsmart
@cfsmart 4 жыл бұрын
Called ARM Assembly Language.
@ethandavis7310
@ethandavis7310 2 жыл бұрын
says he's going to write in machine code, begins writing assembly
@jimjohn2652
@jimjohn2652 4 жыл бұрын
So, if all the 'simultaneous' processing are being done by the OS, then in principle it should be possible to compile any sort of heavy load program into a bootable image that will execute without any of the OS interrupts, random memory accessing and switching. I wonder how much faster a given program would run in this scheme compared to it being run from an OS.
@damilolarandolph8523
@damilolarandolph8523 3 жыл бұрын
I was looking for javascript vids and ended up here, I feel sad now
@strategist32
@strategist32 4 жыл бұрын
*clicked on video thinking it was talking about adjusting from the feel of one OS to the feel of another OS on the fly* I see now that I was very wrong.
@TraitorVek
@TraitorVek 4 жыл бұрын
R1 Has No Choice
@vbnm193
@vbnm193 4 жыл бұрын
Just learned this in uni lol
@Chriva
@Chriva 4 жыл бұрын
You can change the timer on Linux. No idea about Windows and crapOS. I wonder how much performance is wasted on the switching? I mean it has to dump register contents and whatnot on the stack to be able to restore it. I know you can save a lot of performance with low-level stuff by minimizing memory access and branches. would be fun to get a benchmark of a desktop system somehow
@ShinyQuagsire
@ShinyQuagsire 4 жыл бұрын
I believe there was a paper which estimated about 20% performance loss due to context switching. Though, it depends on the threading model and number of cores. A cooperative threading model would prevent a computation-intensive task from being interrupted and more cores decreases the chance of cores being congested and/or caches having to be flushed/invalidated to transfer the thread to a non-busy core.
@casperes0912
@casperes0912 4 жыл бұрын
Why would you mention Windows twice?
@Chriva
@Chriva 4 жыл бұрын
@@casperes0912 You know what I meant, iSheep ;)
@Chriva
@Chriva 4 жыл бұрын
@@ShinyQuagsire Do you perhaps know of where it can be read? (I believe you, it's just I'm not having any luck with Google lol) I find this stuff interesting to read about :)
@steefant
@steefant 4 жыл бұрын
desktop operating systems for some time now do not use timers and regular wakeup periods if that's what you are talking about. this is called tickless.
@INeedAttentionEXE
@INeedAttentionEXE 4 жыл бұрын
So that's what HDC means when I want to get a window
@MrEnsiferum77
@MrEnsiferum77 Жыл бұрын
0:52 Garbage collector visualized
@tobortine
@tobortine 4 жыл бұрын
STM 14,12,12(13) Anyone?
@MorningStarChrist
@MorningStarChrist 4 жыл бұрын
Goron
@pvc988
@pvc988 4 жыл бұрын
r16 and r17 ;)
@chickenjason123
@chickenjason123 4 жыл бұрын
Press F for Intel
@dosomething3
@dosomething3 4 жыл бұрын
“Context switching“ is just shorthand for “CPU context switching“.
@Originalimoc
@Originalimoc 4 жыл бұрын
Please enable your auto-sub(English)!!!
@zes3813
@zes3813 3 жыл бұрын
wrg
@bonniedean9495
@bonniedean9495 4 жыл бұрын
kjd
@lalalalexie
@lalalalexie 4 жыл бұрын
yeah but the illusion IS TERRIBLE
@BoPplle
@BoPplle 3 ай бұрын
사탕 맛있어보인다
@Aemilindore
@Aemilindore 4 жыл бұрын
WhatsApp, what is it? its not secure. Thanks for reading.
@adaptare
@adaptare 4 жыл бұрын
Fiiiirst. Finally.
@Metinator1
@Metinator1 4 жыл бұрын
nah you are third only
@iminni3459
@iminni3459 4 жыл бұрын
nope
@adaptare
@adaptare 4 жыл бұрын
Damn haha
@Chriva
@Chriva 4 жыл бұрын
I've fallen for it a few times too lol. Congrats for being one of the first people anyhow :P
@dannynewman82
@dannynewman82 4 жыл бұрын
First
@semibiotic
@semibiotic 4 жыл бұрын
Boring. Don't ever try to tell all things at once. That's silly. In order to underdtand details of context switching, you need first to clearly understand how CPU works (regs, memory, stack), how it handles IRQ, how interrupt handler must preserve program state (unless CPU makes that for it) ... And only after that, one could actually understand how interrupt handler or syscall could switch between proceses (and how that's made in different CPUs). There is no any sense to do that you do. People who doesn't have required knowlege just wouldn't remember anything, others - would be annoyed to listen looong and crumpled explanations of elementary things (intead of get to know something new). That's time waste.
@UltrMarine
@UltrMarine 4 жыл бұрын
15 minutes are too long for a video.. You can easily explain cx in 4-5 minutes.
@danielgeci4513
@danielgeci4513 4 жыл бұрын
nobody cares what a guy using 2 imacs has to say
'Accidental' CrossCompiler - Computerphile
15:13
Computerphile
Рет қаралды 109 М.
Piccolo OS: What is Context Switching?
17:56
Gary Explains
Рет қаралды 23 М.
Don’t take steroids ! 🙏🙏
00:16
Tibo InShape
Рет қаралды 25 МЛН
How does an OS boot? //Source Dive// 001
50:22
Low Byte Productions
Рет қаралды 363 М.
Self Compiling Compilers - Computerphile
12:56
Computerphile
Рет қаралды 156 М.
How AI 'Understands' Images (CLIP) - Computerphile
18:05
Computerphile
Рет қаралды 130 М.
How Ray Tracing Works - Computerphile
20:23
Computerphile
Рет қаралды 26 М.
Has Generative AI Already Peaked? - Computerphile
12:48
Computerphile
Рет қаралды 465 М.
What is virtual memory? - Gary explains
11:28
Android Authority
Рет қаралды 291 М.
Porting Compilers - Computerphile
12:12
Computerphile
Рет қаралды 35 М.
Multiple Processor Systems - Computerphile
14:52
Computerphile
Рет қаралды 152 М.
Interrupts, ISR, Context Switching| RTOS| Embedded Systems
26:03
Easy Electronics
Рет қаралды 18 М.