Program, Interrupted - Computerphile

Поделиться
HTML-код
  • Опубликовано: 12 янв 2017
  • In day to day life interruptions are annoying, but in computing they're essential. James Fowkes explains using an Arduino.
    EXTRA BITS: • EXTRA BITS: Program, I...
    Dijkstra's Algorithm: • Dijkstra's Algorithm -...
    Thanks to Nottingham Hackspace
    / 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

Комментарии • 253

  • @anon8109
    @anon8109 7 лет назад +222

    - Knock knock!
    + Who's there?
    - The interrupting interrupt.
    + The interru...
    - Just a sec while I deal with something that's suddenly come up.
    - ...
    - Please proceed.
    + pting Interrupt who?

    • @thinkfast8662
      @thinkfast8662 7 лет назад +3

      HAHAHAH BEST JOKE OF 2017 OMG VERY FUNNY JOHN

    • @umnikos
      @umnikos 7 лет назад +1

      Very funny summary of the video

    • @arooobine
      @arooobine 7 лет назад +3

      Give this person a cookie!!!

    • @adamkatav9752
      @adamkatav9752 4 года назад +1

      This is what STI instruction is for

    • @HECKproductions
      @HECKproductions 3 года назад +2

      that is literally genius

  • @jamesadfowkes
    @jamesadfowkes 7 лет назад +237

    At a few points in this video I said "8 bytes" where I meant "8 bits". Damn it all.

    • @jamesadfowkes
      @jamesadfowkes 7 лет назад +55

      I got nervous and talked too fast.

    • @iAmTheSquidThing
      @iAmTheSquidThing 7 лет назад +69

      +James Fowkes You did seem a bit nervous. But you also seem like a natural teacher who answers questions very clearly. Talking to a camera is always weird and unnerving to begin with.

    • @Shockszzbyyous
      @Shockszzbyyous 7 лет назад +10

      don't worry it happens to everyone :D

    • @arooobine
      @arooobine 7 лет назад +3

      Don't worry I had the video playing at double speed anyway so I just blamed the fast talking on that. ;)

    • @user-iu1xg6jv6e
      @user-iu1xg6jv6e 7 лет назад +1

      I hope it's not you who subscribed to feministfrequency channel.

  • @grantmagee
    @grantmagee 7 лет назад +40

    Goodness! I'm working on a digital art Arduino installation and that attachInterrupt function was EXACTLY what I needed to finish my work. Your timing on this video could not have been more perfect. Thank you kindly!

  • @69k_gold
    @69k_gold Год назад +17

    I love the fact that James actually showed human demonstration of interrupts throughout the video

  • @DataCab1e
    @DataCab1e 7 лет назад +25

    Show of hands: Who else remembers the days of manually configuring IRQs when installing PC hardware?

  • @orrinnaylor3681
    @orrinnaylor3681 7 лет назад +1

    Fantastic. Programming tip videos like this are awesome. I would love to see more of them.

  • @firepower01
    @firepower01 8 месяцев назад +2

    This is a great demonstration. Definitely helped me understand this concept better.

  • @DinoWinoSaur
    @DinoWinoSaur 7 лет назад +8

    I just learnt this yesterday in my OS class. Awesome.

  • @stub1116
    @stub1116 7 лет назад +4

    Nice video, but how does the cpu react with Non-Maskable-Interrupts, when compared to programmable interrupts?

  • @ze_rubenator
    @ze_rubenator 7 лет назад +61

    Interrupts are no longer part of Magic The Gathering. They were initially "faster" than instants, but it lead to a whole lot of confusion, so they were scrapped in favour of a stack system.

    • @jort93z
      @jort93z 7 лет назад +2

      man i miss the good old "play as an interrupt."

    • @AndersGustafsson87
      @AndersGustafsson87 7 лет назад

      Ze Rubenator The blue countetspell deck i no longer viable eh?

    • @ze_rubenator
      @ze_rubenator 7 лет назад +2

      Sure it is, you just have to play the interrupts as if they were
      instants. I believe Counterpell, Power Sink and other cards like them
      are still being printed as instants.

    • @BloCKBu5teR
      @BloCKBu5teR 7 лет назад

      Add 3 mana of any single color to your mana pool. Tapping this artifact can be played as an interrupt aether revolt is awesome btw

  • @golarac6433
    @golarac6433 7 лет назад +4

    interupts were heavely used in 8 bits systems. For example, on a NES or C64 you didn't have to check for collision between sprites, the video chip can cause an interrupt when it draws 2 sprites and they overlap

  • @probE466
    @probE466 7 лет назад +4

    5:54 : It very much does not save anything in registers, you push your registers on the stack, build a new stackframe, and then execute your code.

  • @Ovenman940
    @Ovenman940 7 лет назад +4

    Please can you do something on DMA and RTOSes?

  • @AndrewReeman_RemD
    @AndrewReeman_RemD 7 лет назад +1

    Great video! Thanks for making it :D

  • @The1wsx10
    @The1wsx10 7 лет назад

    if you want to time something, how can you subtract the time taken by interrupts?

  • @mbright69
    @mbright69 7 лет назад +1

    Which model laptop is on the desk there?

  • @romanemul1
    @romanemul1 7 лет назад +58

    I wish to see video about pointers

    • @cgme7076
      @cgme7076 7 лет назад +1

      romanemul1 :: Pointers are to access memory, and are a programming concept, not really a concept these guys will upload on. They cover broader topics. Here's a quick intro to points.
      On the left side of an equals sign, when declaring the name of a variable, give the variable the asterisk sign to tell the compiler you want to create a pointer (this will create a variable that can store the address of another variable or the value at that location): looks like: int* p = *anotherVar;
      then, on the other side of the equals sign, the asterisk means "address of" which gives you the literal adress of the variable on the disk: int *myP = *variableAlreadyDeclared
      the ampersan sign is used on the left side, if you are creating a "reference to" variable. what this does, is mimicks the address and value of another variable: int &referenceVar = myVariable (no asterisk for declaration, only variable name)
      now, the ampersan on the other side of the equals sign, is for getting the value, at a memory location. so if you get the address in a previous declaration, all you have to do is use the ampersan, and the value from that address will be stored in this variable:
      recent declaration: int *myPointer = *anotherVariable;
      new declaration: int myCopiedValue = &(myPointer);
      This may look very confusing, so go online and see if you can find an in-depth tutorial (I've found many, so it should be too hard)... HOPE THIS HELPED!

    • @soranuareane
      @soranuareane 7 лет назад +3

      CGMe: I think you have it backwards. & is address-of, * is dereference.
      int x = 4;
      int* ptr_to_x = &x; // Make a pointer to x
      int copy_of_x = *ptr_to_x; // Copy the value of x to copy_of_x

    • @kaizen9451
      @kaizen9451 7 лет назад

      I was suspicious of the syntax int* p = * anotherVar and tried to compile under Visual Studio 2015 - Visual C++ 19.0 and failed. As far as I'm aware, the legal syntax for pointer declaration and initialization is int* p = &anotherVar?
      *anotherVar is not "address of", & is. In using *anotherVar, you are deferencing the pointer i.e. requesting the value pointed to by 'anotherVar'. But since 'anotherVar' isn't even a pointer you'll get compiler warnings.
      Edit: I also think +romanemul1 request for a video regarding pointers is well justified. After all, we've had search algorithms. Not search as in the broader principles of searching, but Dijkstra's algorithm - a very specific algorithm.
      Edit 2: I also don't think it's justified to call pointers a concept. We have abstract data types which are by definition concepts. Not pointers?

    • @djdedan
      @djdedan 7 лет назад +3

      pointers are memory addresses :-) best way to understand pointers is to do some asm :-)

    • @JuddMan03
      @JuddMan03 7 лет назад

      BlinkY what if anotherVar is a pointer to a pointer?

  • @Frrk
    @Frrk 7 лет назад

    So I programmed on an arduino last year but I never used interrupts for button presses because you couldn't debounce them in code...could I have used interrupts anyway?

  • @LeRouxBel
    @LeRouxBel 7 лет назад

    Wait a minute, did you use Processing on that video ? At around 1 min, that kinda looked like the Processing editor.

  • @LazyMcCrazy
    @LazyMcCrazy 7 лет назад

    You made it very easy to understand! Thank you

  • @felixblanke8076
    @felixblanke8076 7 лет назад

    Do you really import Club Mate into the UK? :D
    (Box in the upper left corner, 6:20)

  • @Seegalgalguntijak
    @Seegalgalguntijak 7 лет назад

    Is that a Cinnamon desktop on the Lenovo laptop? Or is it Gnome2/MATE?

  • @network_king
    @network_king 7 лет назад +3

    Is this the same as an IRQ?

  • @DataStorm1
    @DataStorm1 7 лет назад +1

    the 500ms "delay" loop, means that the button cannot be read during that 500ms, hence it not always responding, for it was inside the 500ms loop.

    • @hellterminator
      @hellterminator 7 лет назад +2

      Thanks for repeating what was said in the video!

  • @solomontan1524
    @solomontan1524 7 лет назад

    Does the "hardware buffer" the guy mentioned at 3:39 refer to the FIFO buffer?

  • @JFrameMan
    @JFrameMan 7 лет назад

    how do interrupts actually work on the hardware level? wouldn't the cpu need to poll the button anyway to find out if it should interrupt or not?

  • @davidsweeney111
    @davidsweeney111 7 лет назад +1

    This is so cool, Im going to the library to get a book on this! Thanks!

    • @kensmith5694
      @kensmith5694 7 лет назад

      Yes, it is extremely cool. To keep it simple he left out a bit about returning to the program. The software may decide not to do that right now. It may have all the context information for a different chunk of code and swap to it. This lets you effectively have two programs (or more) on the machine. This is how advanced OSes go back and forth between many tasks to give the effect of them all running.

  • @George__4l5a
    @George__4l5a 19 дней назад

    Playfully, congratulations, your Sales Incentive payment confirmation is officially through the magical processing chamber!

  • @Tfin
    @Tfin 7 лет назад +14

    Unringing all the notification bells, because YT is spamming me.

    • @Rififi50
      @Rififi50 7 лет назад +16

      What's the point of these anyway? "Subscriptions" seems to show all uploads of my subscriptions either way.

    • @ericsbuds
      @ericsbuds 7 лет назад +11

      yeah I spent 20 minutes turning on all the bells just to have to go back and spend another 20 minutes turning them all off. fucking miss the old comment notification too. now I get a giant list of notifications at the top and I have to load the video to respond to anyone.

    • @ELYESSS
      @ELYESSS 7 лет назад +2

      I no longer get comment reply notifications anymore

    • @gameking008
      @gameking008 7 лет назад

      why would you ring all your notification bells?!

  • @dermartologie
    @dermartologie 7 лет назад +3

    I didn't quite like the explanation. Interrupts are not only used for things that need to be handled fast. A buttonhandler is also a good example for an interrupt service routine, because if you're only waiting for the user to press a button, you can halt the cpu und save power. Also all that "remembering" what the program was doing before is part of the ISR and not build into the CPU except for the program pointer.
    Also Interrupts in an ISR are possible. You need to disable them in the ISR yourself. Well, at least on the platforms I know.

  • @aliedperez
    @aliedperez 7 лет назад +5

    actually, multi-core processors are fairly recent. I remember installing interrupt handlers in ye olde 8086. Those were simpler times indeed...

    • @djdedan
      @djdedan 7 лет назад +2

      nothing simple about 8086 but i agree with the sentiment :-)

    • @aliedperez
      @aliedperez 7 лет назад +3

      I said "simpler", not "simple". And I was referring more to the whole system than the processor itself, compared with current systems. But I see you agree with the sentiment, and I'm glad to have lived such times.

  • @AbdullahMohammadOzair
    @AbdullahMohammadOzair 7 лет назад

    is it then possible that the delay of 500ms may actually end up being longer than that, in case where the handling of the interrupt takes more time?

    • @djdedan
      @djdedan 7 лет назад

      usually your interrupt code is small and fast... sometimes you may have time to look up an address and move to a register and that's it... depending on the interrupt, from my exp.

  • @olasoderlind5685
    @olasoderlind5685 7 лет назад

    but what if i want more then one interrupt arduino and other chips have only 1 interruption-eble pin

  • @yanfe384
    @yanfe384 7 лет назад

    What happens, when I have more than 1 interrupt pin? So, if I interrupted my programm with pin 1 and while still in the inerruption routine, Interruption pin 2 fires. Can I interrupt my interruption this way?

    • @yanfe384
      @yanfe384 7 лет назад

      3 seconds later in the video... ah ok XD

  • @arik_dev
    @arik_dev 4 года назад +1

    Does anyone know if interrupts can get dropped? What happens if the os gets flooded with them in a very short space of time?

    •  Год назад

      The interrupt controller tracks all interrupt lines (IRQs). For every interrupt line, a bit is set if an interrupt has been triggered on that line but not yet handled. Thus, the ISR is guaranteed to be executed sooner or later after the triggering event, but not necessarily as many times as the interrupt line was triggered.

  • @supersu6138
    @supersu6138 3 года назад

    Are interrupts bond with OS?

  • @joker28666
    @joker28666 7 лет назад

    its ironic that you interrupted him saying why you dont want an interrupt to an interrupt at the end of the video, kind of wanted to know. But really useful video!

  • @OmarAbdElkareem
    @OmarAbdElkareem 7 лет назад

    please, can you make an english subtitle for your videos ? 😢

  • @dims2805
    @dims2805 4 года назад

    how to stop the system interrup manually?in a manner?
    pliz

  • @lunaeclipse5768
    @lunaeclipse5768 2 года назад +1

    i remembered the moment, when i was playing video game, dota2
    then my friend plugged his usb drive for charging his phone, then its start to say "Hello, Interrupt"
    i was so angry at that time

  • @Dracolith1
    @Dracolith1 7 лет назад +2

    Interruptions of interruptions happen in real-life all the time..... You hear a knock at your door, then on the way to your door your kid jumps out in front of you and starts whining.

    • @karlosdaniel6537
      @karlosdaniel6537 2 года назад +1

      That's why the interrupts may have relative priorities.

  • @cgme7076
    @cgme7076 7 лет назад +1

    I have been an aspiring programmer for a couple years now, and have programmed in several languages, and am currently back to C (for the time being - until I can get an Arduino board), and am also trying to decide on a degree for college. I want to know what type of degree would cover things like this, and allow me to program my own boards.

    • @hellterminator
      @hellterminator 7 лет назад +5

      Computer engineering/embedded system design is what you want.

    • @cgme7076
      @cgme7076 7 лет назад +1

      Thank you

    • @hellterminator
      @hellterminator 7 лет назад +4

      CGMe You're welcome. Also, speaking of Arduino, if you're tight on money, don't hesitate to get a $5 chines clone from Aliexpress. They hold up well and since Arduino is an open source project designed to bring cheap an easy educational kits to everyone, there aren't any moral issues either (clones are perfectly fine under Arduino's license, as long as they don't use the official logo, that's trademarked). You should only get the official boards if you have the money and want to support the project.

    • @hellterminator
      @hellterminator 7 лет назад +1

      ***** They're really nice for beginners because there are easy to use libraries for pretty much anything and tons of tutorials.
      Also, as an ex-professional embedded system designer I still buy Arduinos because they're a nice all-in-one basic package. The last thing I need when prototyping is messing around with resonators and power circuitry.
      I don't really use anything from the Arduino ecosystem (I do all the coding in Atmel Studio), I just think they make for neat and cheap dev kits.
      They're also pretty nice for making extremely simple one-offs that aren't worth making a dedicated PCB for (because you need like one or two extra components beside the Arduino). A $1.50 Pro Mini clone with a sensor directly soldered on beats leaving breadboards all around the place.

  • @vicr123
    @vicr123 7 лет назад +8

    EDIT: Scratch that... Seems to be answered in the extra bits... Maybe I should watch the whole video (including the outro) first... :)
    -What if, during an Interrupt Service Routine, another interrupt appears? Wouldn't you eventually overflow something? :/-

    • @stoltheds7698
      @stoltheds7698 7 лет назад +2

      Victor Tran as long as there is enough RAM to remember the state before each interrupt... it shouldn't be a problem. (I gess, I don't know C)

    • @vicr123
      @vicr123 7 лет назад

      Hand MArshall So a "incoming network info" interior would be placed higher than a "incoming keyboard event" interrupt? What if you have two network cards and one interrupts the other? They all have the same priority :)

    • @joao1982
      @joao1982 7 лет назад +1

      it possible, but not recommended/best practice. the ISR should handle as fast as possible their routine. and it should be as simple as retrieving bytes and placing those in an auxiliar buffer to be handle afterwards or so, avoiding possible deadlocks on the code, etc.

    • @ChunkyChest
      @ChunkyChest 7 лет назад

      lol I do the same thing no worries

    • @vicr123
      @vicr123 7 лет назад

      3m0_Wr3ck Good to see it's not just me :D

  • @FyberOptic
    @FyberOptic 7 лет назад +2

    I miss the days when you could hook interrupts and interact directly with video memory and registers. I don't necessary miss segmented memory, though!

  • @ADRIANNORMANNINA
    @ADRIANNORMANNINA 7 лет назад

    Nice Video!

  • @TheWeepingCorpse
    @TheWeepingCorpse 7 лет назад

    i wrote my first software sprite ISR in z80 assembler on the zx spectrum in the 80s. the interrupt was in sync with the TVs vertical blank which was at 50hz. good times lol.

  • @smegskull
    @smegskull 7 лет назад +1

    are controller inputs in video games interrupts then?

    • @MarkKing1979
      @MarkKing1979 7 лет назад +1

      smegskull yes

    • @smegskull
      @smegskull 7 лет назад

      Mark King ok. cool. can VBA do interrupts?

    • @kalleguld
      @kalleguld 7 лет назад

      No, interrupts are handled by the operating system. But if you set up your VBA program correctly, the OS will trigger an event when the user presses a controller button.

  • @armornick
    @armornick 6 лет назад +1

    I don't know how Linux and Mac do it, but Windows actually puts all of the interrupt events into a message queue and sends them to every Window that's listening. Modern operating systems don't give user-mode applications direct access to the interrupts.

  • @johnno4127
    @johnno4127 7 лет назад

    Is this related to something which would happen in the 90's? I remember computers freezing, or appearing to freeze, but when you wiggled the mouse they would come back to life.

    • @kaizen9451
      @kaizen9451 7 лет назад

      I think that's more to do with CPU lockout that occurred on OS's such as Windows XP et al (I know XP was available in '01 not in the 90's). I remember my uni lecturer talking about the subject and how XP was notorious for locking the CPU. Since true concurrency was not used or commercially available then also? Unless the OS could handle scheduling effectively, your events, such as mouse clicks, were placed into a queue and not processed immediately - leading to freezing.

  • @FrontalBeep
    @FrontalBeep 7 лет назад +2

    I find it interesting that an "interrupt" sounds so drastic (and it probably was at the time) but nowadays when processors can execute millions of instructions per second (not even talking about multi core/multi thread stuff) it seems trivial.

    • @DisturbedLick
      @DisturbedLick 7 лет назад +1

      1 GHz = 1 billion instructions per second.
      But you still need interrupts, or you computer would wasting a large chunk of that just checking every possible input.

    • @UntouchedWagons
      @UntouchedWagons 7 лет назад +1

      1Ghz = 1 billion cycles per second, instructions can take multiple instructions

    • @karlosdaniel6537
      @karlosdaniel6537 2 года назад

      @@DisturbedLick You confused clock cycles per second with instructions per second.

  • @rabreu08
    @rabreu08 7 лет назад

    Why not go full event based programming?

  • @Bentehest
    @Bentehest 7 лет назад

    Sorry to say this, but I think you should take care of the broken piece of wire in the middle part of row 15 of your board. May I suggest a pair of tweezers? :) 2:46

  • @tyr1224
    @tyr1224 3 года назад +2

    Have you ever written an interrupt routine?

    • @mikejones-vd3fg
      @mikejones-vd3fg 11 месяцев назад

      I did once, it went like this "counter++" it was for a delay thing i was trying to implement with chatgtp's help and it had me incrimenting a counter in the routine, didnt work in the end

  • @DrZygote214
    @DrZygote214 Год назад +2

    Okay, I have a question. What happens if a different interrupt comes in before the first ISR is finished? How do you guarantee that the system won't be locked out by a swamp of constant interrupts?

    •  Год назад +2

      There are a few ways, depending on the platform. Typically, interrupts are disabled until the ISR re-enables them (which could happen automatically when the CPU flags are restored when the ISR returns, this is probably the most "atomic" way to do it). Often the ISR also has to tell whatever hardware caused the interrupt that it is done, and that it can now send another interrupt, as the hardware often won't send another interrupt before the previous interrupt has been dealt with. Interrupts may also have priorities. On x86, even if interrupts are enabled on the cpu, the programmable interrupt controller (PIC) will only interrupt any executing ISR (before the ISR has told the PIC that it's done) if the new interrupt is of higher priority.

    • @ivandagiant
      @ivandagiant 8 месяцев назад

      In my class we had levels of interrupts, higher levels could cause a nester interrupt but lower levels would be ignored

  • @TechyBen
    @TechyBen 7 лет назад +6

    I've been actively using this little bit of function in my Arduino code. :D
    Now if only I can get it working... ;)

    •  7 лет назад

      What are you working on?
      Also, if you would like me to, I may be able to assist in locating the error if you share the code. :)

    • @TechyBen
      @TechyBen 7 лет назад

      No the code as much the application. I'm looking at getting the right type of sensor for my needs... then it will be getting the right code for it. I've done proof of concepts, now to tune the two (software/hardware).

    •  7 лет назад +1

      Electronics and computer science guy here, so the offer still stands.

    • @farrukhsaif108
      @farrukhsaif108 3 года назад

      @ nice

  • @dreammfyre
    @dreammfyre 7 лет назад +3

    Thank god for programmers.

  • @orlinzer123
    @orlinzer123 7 лет назад +1

    Please do video on backpropagation algorithm in neural networks

    • @iAmTheSquidThing
      @iAmTheSquidThing 7 лет назад

      I think they did. With Dr Mike Pound. Also Welch Labs has a great series on that.

    • @orlinzer123
      @orlinzer123 7 лет назад

      they not

    • @kaizen9451
      @kaizen9451 7 лет назад

      +or linzer Victor Lavrenko here on RUclips does an excellent series on machine learning. I only wish I had the videos when in uni.

  • @felador5959
    @felador5959 7 лет назад +1

    I'm no expert but isn't there a way of having multiple threads and isn't that more suitable and recognisable by other programmers?

    • @iAmTheSquidThing
      @iAmTheSquidThing 7 лет назад +2

      Yes, but not on a tiny microprocessor like the one in an Arduino.

    • @iAmTheSquidThing
      @iAmTheSquidThing 7 лет назад +1

      +Kenpachi Zaraki As I understand it, though. It wouldn't really be running multiple threads. It would just be simulating it by _protothreading_, switching back and forth between two sets of instructions.

    • @AndersJackson
      @AndersJackson 7 лет назад +1

      ***** well, Arduino is not one of those systems. And it add complexity on a low performance unit.
      It is a reason that Multics didn't become a commercial success...

    • @AndersJackson
      @AndersJackson 7 лет назад

      ***** yes, so what?
      This video was about that hardware and libraries...

    • @xybersurfer
      @xybersurfer 7 лет назад

      if there are multiple threads then there is thread switching, and if your thread was not the one running then it could have missed the signal. it's not so much about doing multiple things at the same time. it's more about the guarantee of not missing a signal.
      also by introducing multiple threads it becomes very hard to give guarantees about the time it takes the system to respond (a.k.a. real time). which is a lot of times important for embedded devices

  • @slendi9623
    @slendi9623 5 лет назад

    the only problem i have with my os, is idk how to handle keyboard

  • @alecclews
    @alecclews 7 лет назад

    Ow! I never knew Arduino processing supported creating ISRs. I'll have me some of that...

  • @kaizen9451
    @kaizen9451 7 лет назад

    I'm assuming the interrupt code used in this example was a 3rd party library?

    • @jamesadfowkes
      @jamesadfowkes 7 лет назад +1

      Yeah, Arduino takes care of all of that for you.

    • @kaizen9451
      @kaizen9451 7 лет назад

      OK interesting, thank you. I had a uni project which required similar characteristics of the Arduino as was demonstrated in this video. Though as far as I was aware at the time, Arduino had no native programmable interrupts. I relied on polling for demonstration purposes.

  • @emreproxtr
    @emreproxtr 4 месяца назад +1

    Thanks Sam Porter Bridges

  • @GuildOfCalamity
    @GuildOfCalamity 7 лет назад +1

    surprised there was no mention of pushing and popping the stack

    • @izimsi
      @izimsi 7 лет назад +1

      GuildOfCalamity That video has so simple explanation, that it actually gives pretty much no information at all.

    • @jamesadfowkes
      @jamesadfowkes 7 лет назад +2

      Thought about it, decided I should keep it as simple as I could.

    • @GuildOfCalamity
      @GuildOfCalamity 7 лет назад +2

      Right, you could've blown minds by getting into instruction pointers.

  • @Kal3it
    @Kal3it 7 лет назад

    Please add spanish subtitles :(

  • @7markhunter
    @7markhunter 7 лет назад +1

    I prefer the idea of increasing the buffer size

    • @xybersurfer
      @xybersurfer 7 лет назад

      yes, i also prefer the idea of accommodating the hardware to fit the conceptual ideas

  • @ZipplyZane
    @ZipplyZane 7 лет назад +1

    Suggestion: instead of putting the cards on top of the videos, why not put the videos down below the cards? You've got plenty of room!

  • @Steven-j1Steven__58c2
    @Steven-j1Steven__58c2 18 дней назад

    Be part of an exclusive interview with the CEO of Binance to gain insights into future developments

  • @ManWithBeard1990
    @ManWithBeard1990 7 лет назад +3

    Just a quick FYI that has nothing to do with computers, but the whole point of revolving doors is that the inside and outside are never connected. You need that in some buildings because the air inside is at a different temperature, and due to convection a pressure difference between inside and outside will exist at the bottom and the top of the building.

  • @necropola
    @necropola 7 лет назад +1

    Developers should never get away with polling (in userspace) and sleep() should be banned. Don't get me wrong, I like this video, because the micro-controller perspective -- where you don't have the Operating System handling the actual interrupt -- is a good starting point into the area/problems of asynchronous (inter-process) communication.
    It would be nice to see a followup showing how kernel and user space work together when handling events, what a mutex/semaphore is and why select()/poll()/epoll() is such a cool system call.

    • @kensmith5694
      @kensmith5694 7 лет назад +1

      I would make an exception for a sleep() for over a minute.

    • @DisturbedLick
      @DisturbedLick 7 лет назад +2

      I think that would be a very bad idea, as it's a long arbitrary length. And would cause a lot of bugs for developers.
      I know Android will throw an ANR (app not responding) if your UI thread takes over 5 seconds to render the next frame. But other threads can sit in the background as long as you want.
      You may want to sleep a thread for awhile, say in a game where you're randomly spawning items on a timer. There are better ways to do that, but it works.

    • @necropola
      @necropola 7 лет назад

      ***** When your program needs to do more than just display/update a clock, i. e. you need to catch some sort of (I/O-)event, using sleep() in a polling loop is wrong.
      I'm beginning to wonder, whether threads have been invented for X Window developers who didn't know select(). ...

    • @hellterminator
      @hellterminator 7 лет назад +1

      ***** I'm beginning to wonder if select was invented for dummies who didn't know how to simply plug their code into the main system loop. /s
      1. Threads are much simpler than select, what's wrong with that?
      2. Most environments won't let you group all kinds of events into a single select (i.e. you can use select to wait on multiple network sockets, but not on a socket or a key press) and even if they did, the resulting code would be a mess.
      3. Select doesn't facilitate preemption. If your program performs some non-trivial computation (like video rendering), it will be completely frozen until that computation finishes. What's that? You want to prepare the next rendering job while the current one is being processed? Tough luck, we removed threads because ***** didn't like them, so you're gonna have to wait.

    • @DisturbedLick
      @DisturbedLick 7 лет назад

      +hellterminator, Do you keep deleting your comments after people reply to them?

  • @NakushitaNamida
    @NakushitaNamida 7 лет назад

    -Please make some efforts for pronunciation , a lot of computerphile viewers are not from an english speaking country and i had a lot of trouble understanding you. Anyway thanks for the efforts-
    [EDIT] finished the video , it just seems James Fowkes is just not at ease with a camera pointed toward him. With some focus i managed to understand everything .

  • @Sandra__651d
    @Sandra__651d 17 дней назад

    Swift and effective reimbursement

  • @voiceoftreason1760
    @voiceoftreason1760 6 лет назад

    I would have made screenshots of the arduino program for this video.

  • @jamesyu1093
    @jamesyu1093 7 лет назад

    *British* spelling: _programme_
    _American_ spelling: program

  • @SKyrim190
    @SKyrim190 Год назад

    Who else was looking at the green LED and going "what is he talking about, this is not flickering at all?" for a while?

  • @hieil650
    @hieil650 7 лет назад

    that's uncomfortable to watch, and I'm understanding

  • @touisbetterthanpi
    @touisbetterthanpi 7 лет назад

    Isn't Linux built on interrupts?

    • @jpratt8676
      @jpratt8676 7 лет назад

      David Sullivan Most OSs have a concept of interrupts because they manage complex hardware. It is not OS specific

  • @minutebrainperson8324
    @minutebrainperson8324 7 лет назад +1

    I like the, title.

  • @AmolGautam
    @AmolGautam 4 месяца назад +1

    nice

  • @rkpetry
    @rkpetry 7 лет назад

    "Interrupts" are exactly what they sound like: crude mismanagement of task scheduling in an obviously multitask environment, by 'bullying' the CPU into excessive make-work-action-administrative processing resulting in thrashing and clock-heating and ultimately exposure of vulnerabilities culminating in security breaches....

    • @balala7567
      @balala7567 Год назад

      Would you rather:
      -Check the time every second to see if it's time for something
      *or*
      -Set an alarm for that thing

  • @Steven-j1Steven__58c2
    @Steven-j1Steven__58c2 18 дней назад

    Join us for an exclusive interview with the CEO of Binance for insights into future developments

  • @ivuldivul
    @ivuldivul 7 лет назад

    Upvote if you tried to mask non-maskable interrupt.

  • @Brutaltronics
    @Brutaltronics 7 лет назад

    oh damn arduinos everywhere!

  • @divasimao5290
    @divasimao5290 7 лет назад

    It seems that some of you like gnome classic :)

  • @DanDart
    @DanDart 7 лет назад

    Irony as loading bar at 0:02

  • @RandomNullpointer
    @RandomNullpointer 7 лет назад

    The Kripke accent :)

  • @notsoverflow
    @notsoverflow 7 лет назад

    algo helper comment

  • @linuxisstillthebest6863
    @linuxisstillthebest6863 7 лет назад

    I haz the same raspberry Pi and the same pinboard :)

  • @jaymalby
    @jaymalby 7 лет назад +2

    Second!

  • @tankmohit
    @tankmohit 7 лет назад

    +1 for gnome

  • @nysonrizqi1428
    @nysonrizqi1428 7 лет назад +3

    first one!!

    • @maw9406
      @maw9406 7 лет назад

      Nyson Rizqi cra

  • @goldchalice
    @goldchalice 7 лет назад

    I've never heard of the term "Interrupt". What the programmer in the video seems to describing is Event handling? I take it "Interrupts" are a very low level concept.

    • @peterlinddk
      @peterlinddk 7 лет назад +2

      Interrupts are what happens in the hardware. Event handling is how the software (higher level languages, and APIs mostly) handles those interrupts. The main difference is that the event handling is not necessarily driven by interrupts, but could be done by polling - your program wouldn't know the difference.

  • @garbagegamer6198
    @garbagegamer6198 7 лет назад +2

    First dislike

  • @yepperdeedooda
    @yepperdeedooda 7 лет назад +6

    I'm pretty sure you need to be really smart to even kind of understand this. I love trying to fix things on my own, but this is way too smart for me.

    • @LazyPanda21
      @LazyPanda21 7 лет назад +16

      3rd year Electronics engineer here
      It's actually one of the easiest concepts to understand and apply while studying microcontroller architecture, and we had to do it using Assembly

    • @assalane
      @assalane 7 лет назад +22

      you need to learn programming and how computers work. Saying "you need to be smart" do to anything is just an excuse

    • @yepperdeedooda
      @yepperdeedooda 7 лет назад

      Azthecx yeah, too confusing. I just learned what an integer was. But I still want to be able to fix my computer. My battery swelled up and it's dead now and I need to have it plugged in for it to work.

    • @yepperdeedooda
      @yepperdeedooda 7 лет назад +7

      assalane I am taking a computer science class though.

    • @valentinidk6101
      @valentinidk6101 7 лет назад +3

      Ксения Ковалевская​​ ... an integer... are you serious? i honestly think you shut quit this already

  • @101m4n
    @101m4n 7 лет назад

    This guy looks a bit like ricky gervais...
    Hate that guy.