Тёмный

Lecture 1: Introduction to UNIX System Calls Part 1 

OsLectures ForAll
Подписаться 2,8 тыс.
Просмотров 136 тыс.
50% 1

Опубликовано:

 

4 апр 2017

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 69   
@konstantinrebrov675
@konstantinrebrov675 5 лет назад
India is great country! Offering free STEM education for the whole world!
@daviddexter25
@daviddexter25 Месяц назад
USA UNVERSITY ALSO PROVIDE FREE EDUCATION SEARCH MORE LOL
@aditya6713
@aditya6713 3 года назад
Man ! how simply he explained monolithic kernal and microkernal that just blew my mind
@shivankchopra8552
@shivankchopra8552 6 лет назад
Very clear and informative! Thank you for providing quality content!
@vishnusingh4118
@vishnusingh4118 3 года назад
28:24 exec() and fork() system calls. So let's continue with this model where we said the shell itself is written as an application and the OS provides certain interfaces to allow the shell to start another program. so what are these interfces ? ans : fork() and exec() system calls. These sys calls are used to start another program. 34:04 Program - An executable on disk (it exists as an executable file on disk) Process - A running program The exec() system call converts a program to a process. 38:00 In fact, these system calls, fork() and exec() can be used by any application. In this model, the 'Shell' is just any other application and the kernel doesn't even know it's a 'Shell' or anything special, meaning, the system calls fork() and exec() can be just as well invoked from another application. So any application, when it calls fork() creates replica processes of the parent process. When it calls exec(), loads the file into the current process. (washing out the previous process, the one that called exec() ) 38:27 How to decide ? The programs returned by fork() are completely identical. How do you decide I'm the child and thus I should call exec() ( or exit() etc ) or I'm the parent and I should display the shell ? The fork() system call returns 2 processes. The child process behaves as if it has just returned from a fork() system call. fork() is a system call that is called by 1 process, but returns 2 processes, both at exactly the same program counter.BUT DIFFERENT pIDs (process IDs ). In the parent process, the return value of the fork() system call is the pID of the child. The child will return 0 ( or some number that cannot be a pID ). And that's your basis for distinguishing between the two processes and taking further action. The return value of the fork() system call is a pid. The return values are different for the parent and the child. For the parent process, the return value of fork() is the pid of the child. For the child process, the return value is some number that can't be a PID. sO all that a programmer needs to do is check the return value. If the return value (from fork() system call ) is 0, then I will call exec(). If the return value is non-zero, then I will call the print the next command prompt. 42:02 The formal code for the 'Shell' program. 45:18 Let's understand to implement the readCommand() in the shell. (high density gyaan from here til end. Watch full. gyaan includes - open, read, write, close interface exposed by UNIX system to manage access to shared resources. etc ) How smartly the OS designer has used the open(), read(), write(), close() system calls to read and write to the devices, and not just to the files.
@interested_in_everything
@interested_in_everything 3 года назад
Thank you for this detailed writeup!
@kostasrompokas
@kostasrompokas 3 года назад
Thanks
@vishnusingh4118
@vishnusingh4118 3 года назад
@@interested_in_everything glad to help! :)
@vishnusingh4118
@vishnusingh4118 3 года назад
@@kostasrompokas You're welcome! :)
@prakashadi4663
@prakashadi4663 7 лет назад
Best NPTEL lecture.
@saijaswanth5085
@saijaswanth5085 3 года назад
greatest lecture ever, thank you sir
@atishjha1111
@atishjha1111 3 года назад
i look your profile u did btech from iit delhi from cse ms from standford & phd once again standford !! no any words for u salute sir !! legend ❤💝
@vinoddiwan5792
@vinoddiwan5792 2 года назад
So many people do this.
@safiahmed7955
@safiahmed7955 Год назад
@@vinoddiwan5792 how many do you know?
@mayankchand9
@mayankchand9 6 лет назад
Awesome Explanation..
@shashidharkudari5613
@shashidharkudari5613 3 года назад
clean explanation of concepts
@shivakumargundlapally8262
@shivakumargundlapally8262 5 лет назад
You are great sirr
@jaitjacob
@jaitjacob 8 месяцев назад
It is not accurate to say fork creates two processes. It just creates a single process which is the child. The child is an exact replica of the parent process. Love this lecture a lot.
@jyotsnamadhavi6203
@jyotsnamadhavi6203 4 года назад
Great lecture
@RajahChandrasekhar
@RajahChandrasekhar 4 месяца назад
jahapana tusi great ho!
@RoyalReelFilms
@RoyalReelFilms 6 лет назад
awsm sir
@tarunpahuja3443
@tarunpahuja3443 3 года назад
Very good explanation of benefits of layered architecture
@palashbehra9303
@palashbehra9303 3 года назад
quite informative.
@smk9320
@smk9320 5 лет назад
Is there any way to edit the buzzing sound out of the video?
@isheep9025
@isheep9025 Год назад
brilliance
@picomputellp6855
@picomputellp6855 5 лет назад
very good
@tommyli6916
@tommyli6916 6 лет назад
Could you please enable video captions ? My English listening not well even auto subtitles will help. Thanks
@_kuldeepk_
@_kuldeepk_ 4 года назад
See this link for transcripts.
@nathanemmanuel47
@nathanemmanuel47 5 лет назад
Thank you Sir
@anantbagaria769
@anantbagaria769 3 месяца назад
what are the pre requisites?
@gargee5840
@gargee5840 4 года назад
thankyou so much sir.
@karamany9870
@karamany9870 Год назад
What's a good book to read whilte studying this course?
@secularph8424
@secularph8424 3 года назад
is it possible to add Transcripts sir ?
@mrnmaurya7381
@mrnmaurya7381 4 года назад
THANK You sir ,
@safiahmed7955
@safiahmed7955 Год назад
If fork() call returns exactly same copies, why does it matter which process is parent and which is child. They are the exact same copies. Let one call exec() and let other get stored to disk. Or am I missing something?
@VaibhavBendre7520
@VaibhavBendre7520 Год назад
You need an information about which process is parent. This is because it's parent process's responsibility to kill the child process once job is done. If they don't get killed it becomes a zombie process. Zombie processes will take up lot of resources from your system. On the other hand, you also want parent process for wait to complete the child process. You don't want parent to kill the child before completing the task child was doing. This would defy the purpose of creating a fork() in first place. What exec() call will do is - it will replace the process created by fork(). You don't want child process to do same thing as parent. So exec() makes sense here. But again killing child process is responsibility of parent.
@ahmadkhaliel49
@ahmadkhaliel49 4 года назад
Thank you very much for this informative course 00:45:00
@ashishrajanand8021
@ashishrajanand8021 5 лет назад
Sir please suggested books for UNIX
@Akvn1000
@Akvn1000 5 лет назад
Linux programming interface. Author is person who maintained man pages for linux. For socket programming in c, Unix network programming socket api volume 1 edition 3
@nikhilbalwani2285
@nikhilbalwani2285 5 лет назад
Watch @ 1.5x
@safiahmed7955
@safiahmed7955 Год назад
Thanks for the unsolicited advice
@mrunmayeewaikar5479
@mrunmayeewaikar5479 Год назад
Thank you
@randomanon1275
@randomanon1275 5 лет назад
anyone has notes based on these lectures?
@soumyapawar1738
@soumyapawar1738 5 лет назад
Guess you'll get in on the nptel site
@pratyushpriyamkuanr273
@pratyushpriyamkuanr273 7 месяцев назад
Which book should I follow for these NPTEL lectures?
@DeadEnd_579
@DeadEnd_579 4 месяца назад
Galvin
@AnuragKumar-lv3ul
@AnuragKumar-lv3ul 3 года назад
can anyone please tell me that is this lecture for btech or Mtech ?
@Anujvarshneya
@Anujvarshneya Год назад
btech'
@anonymousk7-qk3lg
@anonymousk7-qk3lg Год назад
Anybody who wants to study operating system!
@ronakparab5917
@ronakparab5917 5 лет назад
why did I not got this kind of teachers
@devangpapinwar208
@devangpapinwar208 5 лет назад
u didn't work hard to get into a good college dumbass
@gladyouseen8160
@gladyouseen8160 4 года назад
@@devangpapinwar208 😂
@user-kv9jz3fu3h
@user-kv9jz3fu3h 4 месяца назад
Haha, you'll need to be within All India Rank 100 (top 0.01 percent) in JEE, then only you stand a chance to get teachers like him. Just feel fortunate that NPTEL exists
@sahibakhurana9547
@sahibakhurana9547 3 года назад
Hi! I work for a company that is building an online learning platform. Your videos would be a perfect fit! Would it be possible to get an email ID where I can contact you for this?
@rchtchauhan
@rchtchauhan 3 года назад
Is this lecture is good for GATE?
@nine_diamonds8230
@nine_diamonds8230 3 года назад
yes brother After watching these videos from nptel You just have to practice numericals based on the concepts you learn from these videos
@nikhilvidhani7635
@nikhilvidhani7635 3 года назад
@@nine_diamonds8230 are you sure this playlist would be enough i am just sarting the os please suggest only is you completed
@mukulmalviya1605
@mukulmalviya1605 2 года назад
@@nikhilvidhani7635 hello bro have you completed this playlist
@abhishekshah11
@abhishekshah11 3 года назад
Sorry, but however good a lecture this might be, I just cannot stand the speaker's mispronunciation of the word "fork". It's F O R K not fock. I don't mean to offend him, but that's just not the standard pronunciation.
@akhilmishra712
@akhilmishra712 3 года назад
American pronunciation is fork whereas the British pronunciation is fawk. In India we follow the British English as standard so i guess he's correct in that sense.
@abhishekshah11
@abhishekshah11 3 года назад
@@akhilmishra712 It might be technically correct, but in the conversations I've been a part of, being Indian, I've never heard it said like so. At the end of the day it doesn't matter.
@pushkarbansal4663
@pushkarbansal4663 3 года назад
it's okay, least see how educated he is!! u need to take a look at this thesoundofenglish.org/silent-r/ because I believe u need to understand phonetic urself and then only blame others
@kshitijkumre9895
@kshitijkumre9895 3 года назад
padhne aaya hai ya fork/ fock sunne aaya hai.. 😂😂😂😂
@amitbisht1369
@amitbisht1369 3 года назад
@@kshitijkumre9895 bête mauj kardi 😄