System Calls

Sdílet
Vložit
  • čas přidán 14. 03. 2018
  • Operating System: System Calls
    Topics discussed:
    1. System Calls.
    2. User mode.
    3. Kernel mode.
    4. Examples of System Calls.
    Follow Neso Academy on Instagram: @nesoacademy
    Contribute: www.nesoacademy.org/donate
    Memberships: bit.ly/2U7YSPI
    Books: www.nesoacademy.org/recommende...
    Website ► www.nesoacademy.org/
    Facebook ► goo.gl/Nt0PmB
    Twitter ► / nesoacademy
    Music:
    Axol x Alex Skrindo - You [NCS Release]
    #OperatingSystemByNeso #os #OperatingSystem #SystemCalls

Komentáře • 202

  • @narendrachintala7998
    @narendrachintala7998 Před 4 lety +621

    Switching from kernel to user and vice versa is known as mode shifting not context switch. Context switch is the one which happens between 2 processes.

  • @hoangminhchau2187
    @hoangminhchau2187 Před rokem +137

    There are 2 modes of execution for a program:
    1) User mode:
    - Do not have access to resources like memory or hardwares
    - When a program crashes, the entire system will not break down
    2) Kernel mode:
    - Privilidged mode
    - Have access to resources
    - When a program crashes, the entire system breaks down
    Because user mode is safer, most programs run in user mode. But some programs might need access to resources, so they will make a call to the OS to request for these. This call is system call.
    When the OS receives the system call, it will change the mode of the program to kernel mode. This is called context switching.

    • @Madhavi_1177
      @Madhavi_1177 Před 11 měsíci +3

      🎉

    • @jeanxza5395
      @jeanxza5395 Před 9 měsíci +20

      Called mode shifting not context switching he made a mkstake

    • @inishkohli273
      @inishkohli273 Před 3 měsíci +6

      "Because user mode is safer, most programs run in user mode".. It maybe better to say , most program are REQUIRED to run in user(restricted mode) by the parent of the computer(OS) because this kid from neighbor house(programs created by third party developer) can break and crash things(crash system) when they come to play in our house(run in our OS) , they can steal things(privacy issues from external programs) .. However our own kid( OS system default apps or programs like Ms Word, ... has loose to no restriction) because we gave birth to our kid, we can easily correct their behavior....(fix bug of system apps) ...>....Sorry but my analogy is weird.🤣

    • @Subhasini_Sethi
      @Subhasini_Sethi Před 3 měsíci

      ​@@inishkohli273😂😂😂😂

    • @mathy642
      @mathy642 Před 2 měsíci

      @@jeanxza5395It can be mode switching/context switching

  • @TechnoyashBro
    @TechnoyashBro Před 3 lety +22

    🥳 Tqsm sir from india 🇮🇳

  • @bekacynthia
    @bekacynthia Před 4 lety +72

    The first three and a half minutes of your explanation helped me understand something I was reading and reading but was not grasping it entirely. Thank you for the lesson.

  • @mrbrian826
    @mrbrian826 Před 4 lety +94

    Very happy to find an explanation in English that is easy to understand. Many thanks from Ireland 🤝

    • @bradleytimm5349
      @bradleytimm5349 Před 2 lety +7

      I'm pretty sure 10% of India's GDP consists of English Language CS related tutorial videos.

    • @hhcdghjjgsdrt235
      @hhcdghjjgsdrt235 Před 2 lety +2

      @@bradleytimm5349 rest 90% of gdp consist of the salary of Indian software engineers who can speak English.

    • @vikassaini7485
      @vikassaini7485 Před rokem +2

      @@hhcdghjjgsdrt235 😂😂

  • @trilecao9014
    @trilecao9014 Před 3 lety +6

    Thanks!
    1. User mode: safer
    2. Kernel mode: more privilege

  • @general.1233
    @general.1233 Před 2 lety +11

    May Allah bless you. You're helping us with our exams.

  • @AS-ne5wu
    @AS-ne5wu Před 5 měsíci +2

    Had to rewatch this several times since it's a difficult topic for beginners, but understood everything in the end. Amazing how just one video gives so much info.

  • @sheetalyadav4483
    @sheetalyadav4483 Před 3 lety +8

    Thank you sir ! I'm grateful that you're my teacher

  • @noviljohnsonnovil1676
    @noviljohnsonnovil1676 Před 5 lety +15

    u've got really great patience. n thanks a lot.

  • @jamal8916
    @jamal8916 Před 8 měsíci +2

    You have explained this complex topic in the most amazingly simple manner, excellent teacher kind sir!

  • @mazharkhaliq1971
    @mazharkhaliq1971 Před 2 lety +6

    With the level of knowledge you always amaze me 😊, thanks for the video

  • @YashDEVELOPER12
    @YashDEVELOPER12 Před 2 lety +3

    You are a great teacher sir.. God bless you always and thanks alot from bottom of my heart❤

  • @user-rc1jg2rf3h
    @user-rc1jg2rf3h Před 5 měsíci +1

    bohut bhadiya videos bna rhe ho
    thank you sir

  • @trishna1051
    @trishna1051 Před 4 lety +4

    Thank u very much.. Really it's very easy to understand after watching ur Vedios.. It helps me a lot...

  • @agamgill9563
    @agamgill9563 Před 6 lety +8

    great job....thank u so much sr..

  • @dhanarsantika
    @dhanarsantika Před 5 lety +5

    Nice explaination, you made it simple

  • @coding_unicorn2
    @coding_unicorn2 Před rokem +2

    Your explanation is so easy to understand the topics which appears difficult 😊❤

  • @Bb-307
    @Bb-307 Před 6 lety +3

    Amazing.. great teacher

  • @majki5900
    @majki5900 Před 3 lety +5

    awesome explanation, that was very helpfull :) !

  • @maitreyamoharil4299
    @maitreyamoharil4299 Před 2 lety +1

    Great explaination sir 😊
    Thank you 🙏

  • @surajgahatraj3233
    @surajgahatraj3233 Před 6 lety +2

    perfect explaination!

  • @bhoopendrafagna8535
    @bhoopendrafagna8535 Před 3 lety +2

    very easy way of explaining thanks a lot sir

  • @vijaysharma-nn9th
    @vijaysharma-nn9th Před 6 lety +2

    wonderful explanation

  • @paulinov.rodriguesmuebe6744

    Nice explanation. Huggs from Mozambique

  • @mohsinabdulrauf9145
    @mohsinabdulrauf9145 Před 2 lety

    Yours course was very helpful to me sir i am grateful to you

  • @f2pethereum67
    @f2pethereum67 Před 3 lety +7

    Haha thanka alot sir my teacher teaches everything from your automata lectures but you explain better and today your example was the answer to my os assignment thanku sir really appreciated ❤️

  • @rupaligaikwad20aug
    @rupaligaikwad20aug Před 2 lety

    Thank you for great knowledge 🙏

  • @narendrarudra3543
    @narendrarudra3543 Před 4 lety +5

    THANK YOU

  • @atharislam282
    @atharislam282 Před 5 lety +2

    i have done my lecture bcoz of u'r help

  • @prashanth5091
    @prashanth5091 Před 3 měsíci +6

    I watch this video for 2 hours, I can't focus😢😢😢

  • @quratraja7391
    @quratraja7391 Před 4 lety +4

    Great job
    Tutorial explains about system calls. System call is the call made by a program running in user mode to the kernel of the operating system to switch the program from user to the kernel mode so that it can access required resources. An example of copying contents from one source file to a destination file is given. This small task involves lots of system calls.

  • @hotfirefly
    @hotfirefly Před rokem +1

    Damn sys call for each and every step

  • @ishajaswal7547
    @ishajaswal7547 Před rokem +2

    Very well explained

  • @dinushachathuranga7657
    @dinushachathuranga7657 Před 10 měsíci +1

    Thanks a lot for the nice explanation❤

  • @MrKristian252
    @MrKristian252 Před 2 lety

    for [name of some hardware], you need a [big pause] *system call*
    This is now burned into my brain, thank you so much for this explanation surrounding the topic!

  • @amjadalsobhi7388
    @amjadalsobhi7388 Před 3 lety +1

    Thank you so much 🌷🌷

  • @kallipalliashokkumar8114

    Explanation is very well

  • @chintupatelyt2668
    @chintupatelyt2668 Před 2 lety +2

    Awesome sir Keep Go’ing

  • @sreepriyanks
    @sreepriyanks Před 4 lety

    well explained...thank u

  • @manjunathkotabal
    @manjunathkotabal Před 2 lety

    great lecture sir , continue doing the same

  • @saadmanahmed860
    @saadmanahmed860 Před 4 lety +3

    good illustrations

  • @sugatasaha4423
    @sugatasaha4423 Před 3 lety

    great explanation.

  • @mvakamusic758
    @mvakamusic758 Před 2 lety

    Well explained thanks so much

  • @atharislam282
    @atharislam282 Před 5 lety +2

    thanku..

  • @harishovandkar1708
    @harishovandkar1708 Před 2 lety

    GREAT LECTURE SIR

  • @Mehraj_IITKGP
    @Mehraj_IITKGP Před rokem +30

    What I learnt from the lecture:
    User mode and kernel mode refer to two different modes of operation for a computer's processor and operating system.
    User mode is the mode in which user applications and programs operate. In user mode, the processor can access only a limited set of resources and instructions, which are defined by the operating system. This includes memory, input/output devices, and CPU registers. User-mode applications do not have direct access to the system's hardware or kernel memory, and any attempt to access such resources will result in an error.
    On the other hand, Kernel mode is a privileged mode in which the kernel operates. In kernel mode, the processor has access to all system resources, including hardware devices and kernel memory. This allows the operating system to perform low-level operations and interact with hardware devices directly. System-level processes, such as device drivers and system services, operate in kernel mode.
    A system call is a call made by a program to OS in order to access certain resources which are not accessible in the user mode. So in brief, we can say that a system call is special call made by a program to switch from user mode to kernel mode in order to access certain resources. This is known as mode-shifting, not context switching as the instructor mistakenly called it context switching. The term "context switching" usually refers to the process of saving and restoring the context (i.e., state) of a process or thread so that it can be temporarily suspended and later resumed by the operating system. The term "mode switching" or "mode transition" may be more appropriate to describe the process of switching from user mode to kernel mode and back again.
    When a user-mode program makes a system call to the operating system, the following steps occur:
    1. The user-mode program issues a system call request, typically through a library function provided by the operating system or through an interrupt instruction.
    2. The processor switches from user mode to kernel mode, which involves saving the current state of the user-mode program, including its register values and program counter, onto the kernel stack.
    3. The operating system identifies the requested operation, validates the arguments passed by the user-mode program, and executes the operation on behalf of the user-mode program. This may involve allocating or releasing resources, modifying data structures, or performing I/O operations.
    4. Once the operation is completed, the operating system saves the results of the operation, restores the saved context of the user-mode program from the kernel stack, and switches back to user mode.
    5. The user-mode program resumes execution at the point where the system call was made, and the results of the system call are made available to the program.

    • @Ahnos
      @Ahnos Před 8 měsíci +1

      Thanks for the notes

  • @Wickykhan
    @Wickykhan Před 6 lety +2

    thank u sooooooo much

  • @vmorita
    @vmorita Před 5 lety +1

    Thank you

  • @smohammadhn
    @smohammadhn Před 2 lety

    very clear explanation

  • @shaikzuhair8537
    @shaikzuhair8537 Před 4 lety +1

    Good explanation...

  • @sona854
    @sona854 Před 6 lety +2

    very nice explain

  • @NewBeliversInChrist
    @NewBeliversInChrist Před 2 lety

    great explaination

  • @fousizadizusa8524
    @fousizadizusa8524 Před 6 lety

    Thanks alot sir 😊

  • @varunsood7899
    @varunsood7899 Před rokem

    Nice lectures 👍👍 sir you are clearing all my doubts

  • @NAAR47
    @NAAR47 Před 6 lety

    U r great , keep going

  • @humairaahmadi4759
    @humairaahmadi4759 Před 3 lety +4

    very clear and simple explaination .thanks alot sir for this all sach a efficiency that u have provide for us to learn it in great way. lots of love from afghanistan .❤🌻🌷🌺

  • @free-palestine000
    @free-palestine000 Před 3 lety

    thank you sir

  • @Mohsinsadiqko
    @Mohsinsadiqko Před rokem

    So perfect

  • @mukhtiarahmad7448
    @mukhtiarahmad7448 Před 5 lety +4

    sir, method of explanation is excellent.........

  • @mohammedfaizal3577
    @mohammedfaizal3577 Před rokem

    Worked, thx

  • @syedhabeebuddin101
    @syedhabeebuddin101 Před 3 lety

    Thanks !

  • @abhinayreddy5499
    @abhinayreddy5499 Před 6 lety +3

    Tqs alot sir...i like ur videos...and it helped me alot...but our exams r starting on april 16th...so plz upload bit faster...

  • @dhanushsivajaya1356
    @dhanushsivajaya1356 Před 3 lety

    Thankyou sir

  • @chaturadh
    @chaturadh Před 6 lety +52

    Your explanation is really good. Could you please make a video about fork(),exec() and wait() function, it is really hard to understand
    Thank you

  • @subee128
    @subee128 Před 5 měsíci

    Thanks

  • @juliannafotheringham7101

    angel, thank you

  • @jawadashraf3181
    @jawadashraf3181 Před 5 lety +30

    Dear, transfer from user mode to kernal mode is not context switching. please correct it in video. Context switching involves processes only.

  • @yerramachusreenu1197
    @yerramachusreenu1197 Před 3 lety

    Nice session .better explanation. Make some more videos

  • @aatmakumar4631
    @aatmakumar4631 Před 2 lety

    Nice class

  • @brandonyangeh602
    @brandonyangeh602 Před 3 lety

    thanks

  • @user-qk7nb4tk1l
    @user-qk7nb4tk1l Před 2 lety +3

    good explaination! However, seems all action that perform in the copying procedure are system calls (need to switch to kernal mode). Is there any example of user mode action?

  • @sfcguy8300
    @sfcguy8300 Před 3 lety

    tq sir

  • @khaliidcaliy1056
    @khaliidcaliy1056 Před 3 měsíci

    User mode and kernel mode is cpu execution mode so,
    Context switching is can be triggered by alot of things such as interrupt handling in that case context switch may occur for example if there were process of iowaiting state then disk controller will trigger interrupt send to cpu and interrupt handler invoked causing context switching.
    Context switch is not only for kernel user mode

  • @pieetro_o
    @pieetro_o Před 4 lety +1

    System Call. Generate Thermal Element. Form Element. Arrow Shape. Fly Straight. Discharge.

  • @codextreme7756
    @codextreme7756 Před 5 lety +29

    Switching from user mode to kernel mode is not a context switch it just a mode switch. When making a system call there is no context switch because you are in the same address space using the same page table.

  • @bhagirathsinhmakwana6085
    @bhagirathsinhmakwana6085 Před 3 lety +3

    Sir if an user mode switch to the kernel mode then there is chances of system crashes .
    Then why there is context switching?????

  • @ayushiyadav1
    @ayushiyadav1 Před měsícem

    thnx sir

  • @siddhu-Janasena
    @siddhu-Janasena Před 3 lety +2

    Nice explaination Awesome. But switching from user mode to kernal mode is Known as Mode shifting based on PSW(program status word) mode bit it changes to user mode to kernal mode ??

  • @ekc133
    @ekc133 Před 2 lety

    System Call Interfaces (SCI) are the only way to transit from User space to kernel space.Not context switching

  • @hajji384
    @hajji384 Před 2 lety

    The Best details concepts I have ever watched. 🤩😍🎉✨

  • @linoymiz22
    @linoymiz22 Před 5 lety +1

    thank you!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @MMX17
    @MMX17 Před 3 lety +3

    It kind of sounds like a system call is just a method called by the OS. Like in C++ a cout statement is used to display something to the screen, but in your explanation you mention a system call is used to make that happen.

  • @user-xm6lg9hs9i
    @user-xm6lg9hs9i Před 2 lety +3

    Why do we switch from the user's stack to a kernel stack when we enter the kernel ( e.g. for a system call ) ?
    @Neso Academy

  • @mohsinabdulrauf9145
    @mohsinabdulrauf9145 Před 2 lety +1

    there is little bit mistake except of switching terminology you can say there is trap generated in a program goto kernel mode from user mode as it is taught me by my class teacher thanks else everything you guide right sir thanks!

  • @nrgs-alh
    @nrgs-alh Před 7 měsíci

    Hi thanks for your amazing explanation, i have a question. It means that for all the commands and operations which are in user mode, the system call is being used? And is it related to the CPU? I mean if this happens, it takes so much time from the cpu to do these system calls.

  • @patricechaula3430
    @patricechaula3430 Před 2 lety +2

    I have always to stick to reading books and avoid youtube videos. Thanks for the tutorial, you explain it very well.

  • @thareejanp3933
    @thareejanp3933 Před rokem

    Switching User mode to kernel mode called as System Call Interfaces (SCI) Not context switching by the time, context switching will happen while switching to another process

  • @Dragonborn-dc4uj
    @Dragonborn-dc4uj Před 5 lety +1

    It can also take control of someone and make a army and make you a god basically

  • @user67777a
    @user67777a Před 17 dny

    wow❤

  • @munteanionut3993
    @munteanionut3993 Před 2 měsíci

    Thank you for the video!
    05:20 is a bit misleading. You first mention we initially get the file name through the "Acquire Input Filename" step, but then you also mention "Then you are displaying a prompt to the screen, asking the user to enter the name of the input file". Didn't we already do step 2 at step 1? Or is this just a terminology issue and what you actually meant with the first step is that: we get the memory required to store the input first AND AFTERWARDS we get the literal input..?

  • @basitobaid6903
    @basitobaid6903 Před 4 lety +1

    Good explanation brother but you said program shifts from user mode to kernel mode but it's actually a process that shifts (As the running program is called the process ) so you better correct it!

  • @ishaanwadhwa3985
    @ishaanwadhwa3985 Před 5 lety

    HEAVY

  • @mrkiwiboy2011
    @mrkiwiboy2011 Před 5 lety +5

    Hi, do you mean operating system needs system call to write completion message to screen? I am pretty sure user has nothing to do with it so please explain why you say "you" in this video all the time instead of Operating system!

  • @SS-uf1yw
    @SS-uf1yw Před 6 lety

    plz make more more vdos

  • @nooratal3739
    @nooratal3739 Před rokem +1

    👍👍👍

  • @vishnupriya5
    @vishnupriya5 Před 6 lety

    Nasi academy provide lecture for operating system operations

  • @andreborges8640
    @andreborges8640 Před rokem +3

    don't you need to close the input file?

  • @praneshacharya6115
    @praneshacharya6115 Před 2 lety +1

    what does happen if crash occur during mode switching?