Multi Programming - Computerphile

Поділитися
Вставка
  • Опубліковано 1 січ 2025

КОМЕНТАРІ • 235

  • @kwanarchive
    @kwanarchive 5 років тому +103

    Computerphile single handedly keeping the dot matrix paper industry alive.

  • @totlyepic
    @totlyepic 5 років тому +18

    You have no idea how happy you've made me by finally increasing the number of actual computer science videos on this channel. You guys are doing a great job.

  • @jamesgrimwood1285
    @jamesgrimwood1285 5 років тому +78

    One of the most interesting parts of my Computer Science degree was learning about operating systems by stepping through the Minix source. Although things are more complex now with multi-core CPUs because now more than one thing (or more than one bit of the same thing) can run at the same time.

    • @kaitlyn__L
      @kaitlyn__L 5 років тому +3

      @@existenceisillusion6528 and now it powers the Intel Management Engine!

  • @pukkandan
    @pukkandan 5 років тому +203

    Why you eating my processes? No wonder my pc keeps crashing

    • @kattenelvis1778
      @kattenelvis1778 5 років тому +26

      Wait until he starts accepting cookies

    • @ADEzor
      @ADEzor 5 років тому +4

      @@kattenelvis1778 great. Now my coffee is all over the place. 😂

    • @delusionnnnn
      @delusionnnnn 5 років тому

      Because they're delicious. The black one obviously tastes like ... choosing my words carefully here ... licorice. It didn't stand a chance. Too delicious.

  • @mannyknowles
    @mannyknowles 5 років тому +3

    Exquisitely presented. That UA-cam plaque in the background is well-deserved. Computerphile remains one of my favorite channels.

  • @konstantinrebrov675
    @konstantinrebrov675 5 років тому +80

    An example of Multi Programming: I'm watching this video while I wait for my code to compile.

    • @JDines
      @JDines 5 років тому +12

      No. That's Multitasking. Multiprogramming would be if you were multitasking watching FOX News and a commercial at the same time.

    • @kokki1452
      @kokki1452 5 років тому

      @@JDines lol

  • @theharbingerofconflation
    @theharbingerofconflation 5 років тому +52

    Killing them.. I remember having a conversation about host process management from an OS perspective in a café once. Told a guy semi-loudly "Remember that we also need to kill all the children of the host" (referring to child processes) "Before we kill the host."
    Coffee lady came by asking whether she has to call the cops on us or whats going on.

  • @Nayus
    @Nayus 5 років тому +5

    The concept of showing it with the different Dr. Bagley clones is brilliant! and not easy to do!

  • @jmalmsten
    @jmalmsten 5 років тому +25

    "... unless the process is just very boring and just kills itself..."
    That's a bit... harsh?
    (Yeah, I know, it's perfectly usual programming lingo. :) )

  • @beachboardfan9544
    @beachboardfan9544 5 років тому +9

    Gettin pretty fancy with the editing!

  • @majcherek128
    @majcherek128 5 років тому +27

    Concurrency is not parallelism

    • @dipi71
      @dipi71 5 років тому +4

      Indeed. »Read the 1978 CSP paper -- it’s deep and wise« (Rob Pike about C.A.R. Hoare’s seminal paper »Communicating Sequential Processes«).

  • @spikeevans1488
    @spikeevans1488 5 років тому +44

    Very good video. I'd like to suggest looking at I/O scheduling. Both windows and linux can become very unresponsive if doing heavy I/O. I've seen cases, even on a very powerful PC, where responding to a mouse click can take many seconds during heavy I/O (disk backup, file downloads etc). Perhaps look at the various scheduling algorithms and their pros and cons.

    • @OverKillPlusOne
      @OverKillPlusOne 5 років тому +2

      Spike Evans Linux default I/o scheduler is utter pile of trash. I don’t know what use cases it works well for but anything interactive is nearly impossible under high I/o load unless you change the I/o scheduler. Windows the usual issue is swapping (not enough physical RAM)

    • @spikeevans1488
      @spikeevans1488 5 років тому +2

      @@OverKillPlusOne I think that the mouse and keyboard should have priority over all else. I don't believe windows is a RAM issue. I have and 8 core 16 thread CPU with 32 gig of ddr4 ram. I think, I don't know for sure, there is a single I/O queue that's the problem. In any case, it's my computer and when I click the mouse or type it should listen to me.

    • @kaitlyn__L
      @kaitlyn__L 5 років тому

      @@spikeevans1488 Yeah, this is a very big problem. Even when there's not a huge lockup, modern OSes have measurably higher delay on typing or mousing than in the 90s, and the delay was even lower in the 80s.

    • @kaitlyn__L
      @kaitlyn__L 5 років тому

      @@OverKillPlusOne the use cases it work well for is basically just as a headless server. So that probably explains why it's so much more accepted in the server industry than the home computer industry still.
      It would be nice if Linux could adapt its priorities based on whether you're using a GUI or not. Like if your home rig is also being a NAS for your laptop, you might want it to prioritise the file transfer if the screen has gone to sleep. If you're watching stuff on your laptop you're not likely using the desktop. And if you're on the desktop, why would you stream stuff to your laptop? So a file transfer could go 10% slower and you wouldn't mind because you're using the desktop at that time.

    • @OverKillPlusOne
      @OverKillPlusOne 5 років тому

      @@kaitlyn__L Dayjob involves running thousands of Linux based servers. On anything I/O taxed we have to change the default scheduler else things like databases get crippled because of I/O staying in the queue for multiple seconds when you reach I/O limits (like on the older fleet of hard drive based database servers). The default deadline scheduler has two queues, a read and a write, and will starve the write queue blocking the world up under heavy I/O. Linux has completely separate handling for other I/O events.

  • @Roxor128
    @Roxor128 5 років тому +7

    I remember hearing about an incident involving MacOS's cooperative multitasking.
    Every now and then a network full of macs would stall, then get flooded with packets. It was eventually narrowed down to a specific machine and when the admin went and investigated, nothing seemed to be out of the ordinary. After a few occurrences of this, the admin sat down and watched the user at work. Sometimes when working with the mouse (might have been drawing), he'd hold the mouse button down for much, much longer than was normal, and with the input handler being tied up on the long mouse press would result in nothing else in the computer getting to run, including the network stack. As a result, no packets were passed on from the machine in question and the buffer would just fill up, resulting in a flood when the user released the button and the network stack got some processing time again. A gentle word with the user not to hold the mouse button down so long fixed the problem.
    Don't know if it's true or if I remembered all the details correctly. I didn't have any luck tracking down the original before making this post.

    • @kaitlyn__L
      @kaitlyn__L 5 років тому

      Reminds me of the however-many-mile email problem story.

    • @Roxor128
      @Roxor128 5 років тому

      @@kaitlyn__L Ah, the 500-mile email. I remember that one. Caused by mail software having a default timeout of only a few milliseconds, wasn't it?

  • @TheAnkMan
    @TheAnkMan 5 років тому +1

    Steve is one of my favourite profs and Computerphile. Also loving the array of vintage computers in the background. Hmm, talking about that: he should do an episode only about them. Show every of them and give a brief history and hardware specs.

  • @kortaffel
    @kortaffel 5 років тому +21

    You deserve an oscar for this!

  • @RyanFernandezz
    @RyanFernandezz 5 років тому +3

    This was a really fun idea for the editing of the video Sean, great job!

  • @georhodiumgeo9827
    @georhodiumgeo9827 5 років тому +10

    My mind is blown.
    I just can’t believe they made that exact same shirt in two colors.

  • @lohphat
    @lohphat 5 років тому +14

    So a 12 core CPU gets you to the diabeetus faster then.
    Got it.

  • @yoloswaggins2161
    @yoloswaggins2161 5 років тому +7

    Example of multi-programming: while I'm watching this my evil clones are taking over the world.

  • @maxtaylor3531
    @maxtaylor3531 5 років тому +4

    You guy’s are missing out. When Bagley gave us this lecture we also got to eat the jelly babies.

    • @ArumesYT
      @ArumesYT 5 років тому

      Yeah, but you only had one Bagley.

    • @maxtaylor3531
      @maxtaylor3531 5 років тому +1

      ArumesYT we had all the Bagley. He exists in a 4 dimensional state across all of space and time and we only see a three dimensional projection of him. His true wisdom is beyond our comprehension. Ancient writings suggest he derives his power from Diet Coke.

  • @CoolJosh3k
    @CoolJosh3k 5 років тому +2

    Will there be a video on hyperthreading?

  • @ujjal147
    @ujjal147 5 років тому +2

    Looking forward to both future videos!

  • @MrJezster
    @MrJezster 2 роки тому

    I have not seen this type of printer paper since 1993 when we used to load it into Honeywell DPS7 mainframe chain printers. Love this channel so much, really interesting.

  • @SteveGouldinSpain
    @SteveGouldinSpain 5 років тому +20

    So penny dropped moment.. with 'process explorer' in Windows you can change the priorty of a program. So presumably then that is the pre-emptive part of the OS figuring out how much time to allocate to each one, no? Now I'm going to have to go buy jellies!

    • @bersl2
      @bersl2 5 років тому +20

      Almost. The priority value Windows lets you assign is used as one input by the scheduler to decide when and how long a program runs, but that algorithm has a lot of other internal parameters that users can't (and almost certainly wouldn't want to) directly touch.

    • @prontosolutions4370
      @prontosolutions4370 5 років тому +1

      you needed this vid to figure that out?

    • @SteveGouldinSpain
      @SteveGouldinSpain 5 років тому +19

      @@prontosolutions4370 sorry dude, I'm a Unix guy just trying to figure this stuff out. Didin't realise I was going to be called out by people like you who clearly know everything!

    • @bytefu
      @bytefu 5 років тому +16

      @@prontosolutions4370 Somebody at some point needs something to figure something out. That's how it works.

    • @sundhaug92
      @sundhaug92 5 років тому +2

      @@SteveGouldinSpain Kinda similar to nice (and ionice)

  • @SupaKoopaTroopa64
    @SupaKoopaTroopa64 5 років тому +3

    This is the most clear explanation I've ever herd for this topic!

  • @Masterbutler123
    @Masterbutler123 5 років тому +3

    Loving the production value haha

  • @Hypersteff89
    @Hypersteff89 5 років тому

    Got it, but doesn't the OS need a running process to handle other processes as well? If so, how does it manage to first suspend itself and then run another process?

  • @TheAnkMan
    @TheAnkMan 5 років тому

    Dr Steve Bagley I still propose a new episode (episodes) you would give some information of the array of vintage computers showing up in your videos behind your back. Please explain what they are, in which year they were introduced into the marked of the 1980s and what impact they had back in the time.

  • @johncampbell4389
    @johncampbell4389 5 років тому +1

    Handling interrupts are important because some will manage the context switching. A “hard” real-time system, where EVERY interrupt runs the scHeduler which likely forces a context switch... which means there are fewer CPU cycles available to crunch numbers.

    • @johncampbell4389
      @johncampbell4389 5 років тому

      On a non-real-time system, most interrupts get serviced and then the Control is passed back to the previously running process.
      In a real-time system, EACH INTERRUPT MAY CHANGE WHICH PROCESS GET CONTROL NEXT, so, after the interrupt is processed, the scHeduler is run to determine which process needs to cope with the most recent interrupt. The scHeduler takes extra time over and above the usual context switch. The higher the interrupt rates, the more frequently the scheduler is run, taking up cycles “regular” processes may be burning.
      I have run across people who think a process is so important it needs to be run during an interrupt... and, so, the system had problems. Some folks have no idea how priorities need to be set.
      In a usual (non real-time) scheduler, priority will float up and down based upon whether a process uses it’s time slice or not. If the whole slice is used, the process’ priority will drop,, giving it a longer time slice next time. Likewise, if it does some kind of I/O syscall, the priority will be bumped up and the time sslice (quantum) will be shortened. I/O bound processes float “up” in priority and compute bound processes float down. This implements a form of “fairness”.
      In a real-time system, priorities are set and do not change and you need to plan out ahead of time which processes get what kind of priority. (Don’t ask, this is a long and sordid story where I had a lot of resistance from the “key” programmer as I tried to get a FORTH-coded application into a Unix (well, LynxOS) system; I was the considered as the “young punk” at the time and everything I knew about OS internals was “just dogma”.)

  • @kaitlyn__L
    @kaitlyn__L 5 років тому

    I knew how co-operative multi tasking worked but not preemptive. That always seemed to get glossed over as just "the operating system takes control". Very cool that it bounces between processes very quickly just to keep things even.
    It seems to me like that bouncing would make it easier to run on multiple cores/CPUs, is that right? Assuming the memory address of the program can be accessed by both of course. Like, it's already divided up into slices in the preemptive model, so how difficult would it be to have a second CPU take from, say, the back of the runnable pile every time too?
    Just thinking about how the token bouncing and everything took up a lot of overhead in the Christmas video.

  • @igoralmeida9136
    @igoralmeida9136 5 років тому +1

    Does asyncronous code work in a similar way to multitasking in Operating Systems, but instead of switchig processes in the CPU you switch blocks of code executing in the main thread?

    • @G5rry
      @G5rry 5 років тому

      Not in the main thread, but yes, an asynchronous task may run in a separate thread. This allows the main thread to continue while that task is running.

  • @hirakmondal6174
    @hirakmondal6174 5 років тому +1

    A new concept from computerphile.. *_I LOVED IT_*

  • @ZachTangen
    @ZachTangen 5 років тому

    Was mechanical interrupt a thing because of single-core CPUs? If only one process can be run at a time and if that got hung up, you would need a way to kill the program. Or is that understanding wrong?

  • @dstarfire42
    @dstarfire42 5 років тому

    Could you guys do a video (if you haven't already) about how hyperthreading works and what makes it different from the multi-tasking you're talking about here?

  • @Kaaputenen
    @Kaaputenen 5 років тому

    Bit of a weird trippy out-of-body experience with Prof. Bagley. Good video, cheers.

  • @hyperspeed1313
    @hyperspeed1313 5 років тому

    What’s going on in the close up shots of the page? Looks like an algorithm is trying to stitch the image together

  • @airjuri
    @airjuri 5 років тому +2

    pre-emptive multitasking... Looks like Amiga and its operating system was 10 years ahead of everything else back in 1985.

  • @zea_64
    @zea_64 5 років тому +1

    How does the OS make sure to not contaminate the accumulator/registers when it forcefully takes control from the program so as to not break whatever it's calculating?

    • @Tahgtahv
      @Tahgtahv 5 років тому +2

      Each process has an area in its context where those are stored. It needs to do this regardless of whether it's done cooperatively or preemptively. How exactly this is accomplished varies from one architecture to another.

    • @Conenion
      @Conenion 5 років тому

      @Conner McKay
      Whenever a context switch happens, all registers have to be saved.

    • @orlovsskibet
      @orlovsskibet 5 років тому

      @LueLou wow I didn't know that. I hoped that part would've been covered in the video, but it sounds like it will come soon in another one 😊

  • @filipstevanovic6460
    @filipstevanovic6460 5 років тому

    What about Multi threading?

  • @TimothyKist
    @TimothyKist 5 років тому +7

    Exceptional video! Explains it very well using some cool techniques :)

    • @colin-campbell
      @colin-campbell 5 років тому +1

      It’s like Boris Johnson had an illegitimate child.

  • @ecdhe
    @ecdhe 5 років тому +3

    I shall add that preemptive multi-tasking is possible because modern CPUs (x86 and ARM alike) have a clock mechanism. The OS instruct the CPU to run a clock and generate an interrupt every X milliseconds. The OS also register their own handler when this interrupt occurs. So all the OS has to do is to wait for the CPU to stop any execution, switch to kernel mode and call the OS handler which then calls the OS scheduler.

    • @ArumesYT
      @ArumesYT 5 років тому +3

      What do you consider to be "modern"? The Amiga was capable of pre-emptive multitasking using interrupts, using a CPU released in 1979.

  • @Kaeresh
    @Kaeresh 5 років тому

    Wouldn't the state of the program move from CREATE to RUNABLE instead of straight to RUNNING? Or is there something I'm missing?

  • @server642
    @server642 5 років тому +3

    This is such a cool way to visualize multitasking, both in the way the video was done at first and also with the diagram and candies! I loved it! I think I’ll show this to one of my instructors at my college and see if he’ll use it as a demonstration video for one of his classes.
    On a side note, the instructor I had for that class, before he retired, demonstrated multitasking by having students at the front of the class as processes and he would act as the OS and would tell the students to switch places as per the control-passing and timer-interrupt methods.

    • @DaveWhoa
      @DaveWhoa 5 років тому +2

      but you can't eat humans

    • @server642
      @server642 5 років тому +1

      Dave S Exactly! That’s why this is superior!

  • @aDifferentJT
    @aDifferentJT 5 років тому +1

    Why doesn’t create go straight into runnable?

    • @AntonioNoack
      @AntonioNoack 5 років тому

      When you're starting a process ( as a process ), you give control to the OS anyways, so it doesn't matter. It can take out the process which is currently running.

    • @GilTheCohen
      @GilTheCohen 5 років тому

      On create other stuff is happening, like memory allocation. Also, new processes might have a different priority than other waiting processes. For example, an OS might decide to run processes with the lowest priority coefficient (a function of priority and waiting time). A new process can make the scheduler favor it over a slightly lower priority coefficient.

  • @CodeCommand
    @CodeCommand 5 років тому

    make a video on hard drive data and securely wiping them

  • @Gruggo
    @Gruggo 5 років тому

    Question: How does the OS keep track of it's interrupt clock, if it doesn't currently have control of the CPU?
    I remember learning about interrupts back in high school, but it was a long time ago, and it was a pretty rudimentary explanation.

    • @ArumesYT
      @ArumesYT 5 років тому +3

      Interrupts can be both hardware and software. The CPU can have an internal clock (or even rely on an external one) to send a periodic interrupt signal to one of its input pins (or something similar). This interrupt moves control back to the OS.

  • @StankyPickle1
    @StankyPickle1 5 років тому

    Thank you for this video! I think it very clearly explains the key concepts. With regard to the preemptive multiprocessing, how is the external interrupt handled? Is it done on a hardware or software level? Also, how is the external interrupt frequency chosen? Can it be adjusted? If a process encounters a regular interrupt, does it override the external interrupt?
    Sorry, I have lots of questions. Maybe a better question: where should I go to learn more details about this topic?

    • @schifoso
      @schifoso 5 років тому +2

      When the interrupt is received by the processor, it saves the state of the current process and jumps to the code that's been assigned to handle the interrupt.

  • @sebastianbocaccio408
    @sebastianbocaccio408 5 років тому

    Hello! Someone can tell me how the cpu knows how to move a blocked task to the runnable status without running that task? Thanks

    • @kaitlyn__L
      @kaitlyn__L 5 років тому +1

      It's only "blocked" because the program was waiting on the OS to do something. The OS itself knows when it's finished that thing, and moves the task to the other pile. The task itself does not "perceive" a difference between blocked and runnable, it's entirely the OS's organisational structure and nothing more.

    • @sebastianbocaccio408
      @sebastianbocaccio408 5 років тому

      @@kaitlyn__L Thanks, you are very kind!

  • @jesper2455
    @jesper2455 5 років тому +1

    I love this channel so much. Thanks for another great video.

  • @astiaves
    @astiaves 5 років тому

    This looks nice but, does not the OS also run on the CPU? How does it manage CPU usage for other processes while also using the CPU?

    • @alexmeyer2394
      @alexmeyer2394 5 років тому +1

      Kernel sets an external timer, then passes control to the user process. Once the time is up, the timer sends an interrupt to the CPU, which in turn executes kernel code (i.e. the scheduler). Rinse and repeat.

  • @xkcd000
    @xkcd000 2 роки тому

    No bears were harmed for this video🤣

  • @isabellabihy8631
    @isabellabihy8631 5 років тому

    Has anyone worked with closet-sized watercooled computers in the nineties? There was a feature on the operating system MVS that was TSO, the time sharing option, where the operating system gave time slices to runnable programs. Other transaction based systems, did their own scheduling. Disclaimer: that's how I understand it, before anyone bashes me.

  • @محمدالزعبي-ن9ظ
    @محمدالزعبي-ن9ظ 5 років тому

    Steve, the ultimate process termiantor.

  • @WIImotionmasher
    @WIImotionmasher 5 років тому +2

    Giving me flashbacks to OS class

  • @LifeSizeTeddyBear
    @LifeSizeTeddyBear 5 років тому +3

    yay for ZX Spectrum tape loading colours/sounds (even though it wasn't capable of multitasking when loading from tape, given that it used CPU timing to decode the tape audio)

  • @nO_d3N1AL
    @nO_d3N1AL 5 років тому +4

    Nice editing

  • @sstshivam
    @sstshivam 5 років тому

    Thanks for the video! Looking forward to the scheduling and context switching videos. :)

  • @badnessofhour
    @badnessofhour 5 років тому +1

    so if i write a threaded program, does the computer see it as multiple processes?

    • @mgeorgescu
      @mgeorgescu 5 років тому

      A thread is not a new process, a process has at least one thread though,at least one execution path in other words, yea you could see a thread like a process but it is more lightweight, also that thread is scheduled by your code and not by OS's scheduling algorithm in general.

    • @neumdeneuer1890
      @neumdeneuer1890 5 років тому

      Mikey Nice answer but I would like to add that it is still the os that schedules the threads (even though you have limited influence, for example you can tell the os to wait for the execution of all the threads usually by using a function called join() before proceeding with the execution of the father process)

    • @G5rry
      @G5rry 5 років тому

      Threads are sometimes referred to as "lightweight processes". Context switches are expensive between processes, but switching between threads is much quicker. Threads within the same process still share the same memory space as well as other things common to the process they belong to.

  • @Arnaz87
    @Arnaz87 5 років тому +4

    This video is nice, I'm usually not super exited about this professor's videos because I'm not into hardware stuff (os stuff is interesting though), but this one is really creative and original and interesting.

  • @frosty3579
    @frosty3579 5 років тому

    Nice editing work!

  • @recklessroges
    @recklessroges 5 років тому +2

    Sean impersonating MS-DOS 4.00 "File? What file?"

    • @dafoex
      @dafoex 5 років тому

      As opposed to Unix:
      He's a file, he's a file, _you're a file,_ I'm a file! Are there any more files I should know about?

  • @thodorisevangelakos
    @thodorisevangelakos 2 роки тому

    Actually incredible explanation, thank you!

  • @Furiends
    @Furiends 5 років тому +2

    "A modern operating system like UNIX" >.>

  • @thisisthefoxe
    @thisisthefoxe 5 років тому +2

    I've learned more in those 12 min. than in 3 months of Uni.. thx!

  • @leanvlogs
    @leanvlogs 5 років тому

    Thanks for the english CCs

  • @TechyBen
    @TechyBen 5 років тому +2

    "The process is completely unaware there is another program running." What Intel told you not to specter that to happen? ;)

    • @programorprogrammed
      @programorprogrammed 5 років тому

      "not to specter that to happen?"?

    • @TechyBen
      @TechyBen 5 років тому

      @@programorprogrammed Very poor joke on "expect that to happen". :P

    • @YourTVUnplugged
      @YourTVUnplugged 5 років тому

      @@TechyBen Yea they did not spectre anyone to find out, but then they went with the nuclear option and then had a public meltdown! :P lol

  • @Norsilca
    @Norsilca 5 років тому

    0:29 seconds in: "Now obviously we can't." Great, good to know, nice video!

  • @dunda563
    @dunda563 5 років тому +5

    What a very comprehensive video, and an explanation for how the OS can escape even infinite loops! I've been wondering how that is possible since forever.

    • @TheMixedupstuff
      @TheMixedupstuff 5 років тому +4

      Yep. Most proccesors have a programmable timer that fires interrupts for exactly this purpose.

    • @olik136
      @olik136 5 років тому +2

      What I have learned is that I need an external interrupt to exit the infinite loop of looking at my phone- open the same useless apps- decide it is a waste of time- open youtube on my pc- start watching something- decide it is a waste of time- take my phone.........

  • @CarstenGermer
    @CarstenGermer 5 років тому +2

    What kind of sweets are you using / eating in this vid? (edit for clarification: I got what kind but not the brand / name ^_^)

    • @DrSteveBagley
      @DrSteveBagley 5 років тому +2

      Jelly Babies. Those were made by Bassetts but other sweet manufacturers are available.

    • @CarstenGermer
      @CarstenGermer 5 років тому

      @@DrSteveBagley Got to get this or similar for my upcoming workshop on SOA. Great and inexpensive idea!

  • @superjugy
    @superjugy 5 років тому

    Can you run the videos in series instead of in parallel? It will be very funny to see how you guys had to record the sequence out of order so that after editing it makes sense XD.
    Also, where is the unboxing!? I was promised an unboxing video. XD

    • @ximalas
      @ximalas 5 років тому +2

      That process died of starvation. Poor scheduling algorithm and/or implementation.

  • @emredikmen276
    @emredikmen276 4 роки тому

    Thank you very much for the Turkish subtitle

  • @stanhope75
    @stanhope75 5 років тому

    Ah, now I get what they were trying to teach me during my computer science course.

  • @dsal3389
    @dsal3389 5 років тому

    so now I wonder how asynchronous programming works

  • @alanjenkins1508
    @alanjenkins1508 5 років тому

    Perhaps you should mention the "runnable" state is actually a first in, first out scheduling queue.

  • @w0ttheh3ll
    @w0ttheh3ll 5 років тому

    awesome video, needs more views

  • @WineScribble
    @WineScribble 5 років тому +2

    Love your channel - so much great information. Also Objectivity. The best youtubes!

  • @Furiends
    @Furiends 5 років тому

    Outside of process scheduling and context switching is also watchdog timers which is why a problem thats just while(true) {} doesn't freeze your entire computer. To take the jelly baby analogy further in fact the OS itself is one of the jelly babies. OSes tend to take into account how much time a process was using a system call into the OS and consider that part of its task time.

    • @ArumesYT
      @ArumesYT 5 років тому

      Not necessarily, some processors have separate "super" (OS) and "user" (applications) states, with their own separate stacks and/or registers. So the OS isn't just a jelly baby then.

  • @woodywoodlstein9519
    @woodywoodlstein9519 5 років тому

    Just like time sharing in the old days.

  • @DaveWhoa
    @DaveWhoa 5 років тому

    process termination is yum

  • @philipmrch8326
    @philipmrch8326 5 років тому +1

    Wow what a great video! Looking forward to videos about the other topics he mentioned.

  • @logangraham2956
    @logangraham2956 5 років тому

    this is true on a single core processor but i haven't seen any single core processors since like 2000

    • @mgeorgescu
      @mgeorgescu 5 років тому

      If the processor has more that one core doesn't mean that this isn't true. This is actually how processes are scheduled.

    • @Byter09
      @Byter09 5 років тому +1

      It is basically the same for multi-core processors, just with n running states. So let's say 4 cores. That'll result in 4 running states and they all share the connections to blocked and runable states. You can easily see how that'll speed things up :)

    • @logangraham2956
      @logangraham2956 5 років тому

      @@Byter09 so basically ... for muilti core just replace "cpu" with "core" , :)

    • @ArumesYT
      @ArumesYT 5 років тому +1

      @@logangraham2956 Make that a scalar core. Super scalar cores with SMT architecture on the other hand are a different story again.

    • @ArumesYT
      @ArumesYT 5 років тому +1

      A lot of microcontrollers are still single core. And AMD launched their Athlon X2 in 2005, not 2000.

  • @giancarloandrebravoabanto7091
    @giancarloandrebravoabanto7091 5 років тому

    this topic is use to known as concurrency

  • @HoSza1
    @HoSza1 5 років тому

    Today cpus have multiple cores and even some sneaky computers have multiple cpus. Indeed multiple tasks are running in a realtime real parallel fashion.

  • @brantwedel
    @brantwedel 5 років тому

    First 1, then 2, then 3 ... In the next video I expect to see 4 Steves on a screen!

  • @PASTRAMIKick
    @PASTRAMIKick 5 років тому +2

    I like the round robin process scheduler

  • @patrickgoetz
    @patrickgoetz 2 роки тому

    Again, brilliant!!

  • @JohnMichaelson
    @JohnMichaelson 5 років тому +2

    Awesome vid! I've heard of jelly babies before but never seen them, thank you! Oh and the computer stuff was cool too I guess.
    (please accept that in the spirit intended, I've run out of words to appreciate the time you all spend making these!)

  • @bbq1423
    @bbq1423 5 років тому

    Have been wondering about this for eons.

  • @AndreAmorim-AA
    @AndreAmorim-AA 5 років тому

    Is that why we call ACM magazine ACM Queue? Btw, since Moore's law will end in 2025 is it possible to look at the mother's board and try to programming taking on account PCI latency (cacm vol.60, No.4, page 48-54 Attack of the killer Microseconds) ?

  • @CasberG_
    @CasberG_ 5 років тому +3

    Video is nice , i got much information. Thanks for it.
    But I want to request that , please add some programming videos also.i liked whatever u teach

  • @mathgeniuszach
    @mathgeniuszach 5 років тому

    ooooh there's candy on the desk

  • @Wolfcubware
    @Wolfcubware 5 років тому +2

    I want some jelly babies now damnit

  • @AdamHawkesDeveloper
    @AdamHawkesDeveloper 5 років тому

    10:32 A modern OS like...Windows NT? There hasn't been a version of NT for quite a while! At least, not with that _name_ .

    • @samuel7998
      @samuel7998 5 років тому +3

      afaik, all modern windows versions are based on Windows NT. So not really with the same name, but deeply inside they are still Windows NT.

    • @YourTVUnplugged
      @YourTVUnplugged 5 років тому +1

      Well if that got you giggling, prepare to have a sock put in your mouth: Browse to C:\Windows\System32 directory... hit 'n' and scroll down to ntoskrnl.exe
      Yes that's right NT OS Kernel, you've been using the Windows NT Operating System Kernel all this time and you didn't even know it! ;)

    • @YourTVUnplugged
      @YourTVUnplugged 5 років тому +2

      P.S. If you weren't aware the system actually loads that at boot time and that's what runs during the lifetime of the OS, that IS the kernel it's using... And that's where you have to patch patchguard out from if you for whatever reason want to remove it, and that's where all the kernel APIs reside also. Calling any API that needs to interact with the kernel, ends up in a call to a kernel mode API within ntoskrnl.exe (It's called 'exe' but it's not really an exe like a normal usermode application it IS THE KERNEL!)

  • @JDines
    @JDines 5 років тому

    Operating Systems don't wait for the process to hand control back. This is how Windows 3.1 used to do things, and is why a single errant program could hang the computer. Simply running a program with an infinite loop would bring the whole system down! Modern Operating Systems use a Programmable Interrupt Timer to take control of the CPU back from the process and programs can block these but must be careful to only do this for the duration of atomic operations.
    Furthermore, it is called multi-tasking by people who write Operating Systems professionally. I have been in the Software Development field and have never once heard a Software Engineer refer to the Operating System as a "Multi-Programming" OS. It is a Multitasking OS.
    Please do not "learn" from this guy, who is clearly a "Computer Scientist" who hasn't spent a day of his life working in Software Development.

  • @NullPointer
    @NullPointer 5 років тому

    1:46 Five nights at computerphile

  • @sandeeptech8
    @sandeeptech8 5 років тому

    Great! I understood that idea.

  • @aitchpea6011
    @aitchpea6011 5 років тому

    This is called "the interesting bit" and we'll do another video about that. Twice.

  • @scotts9202
    @scotts9202 3 роки тому

    great stuff, thanks

  • @1vader
    @1vader 5 років тому

    Now I have to go and buy some sweets ...

  • @IIARROWS
    @IIARROWS 5 років тому

    OK, so terminating processes makes you fat.
    I should stop terminating processes, I'll tell my nutritionist at the next visit.