Тёмный

Lecture 2: Introduction to UNIX System Calls Part 2 

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

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

 

3 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 26   
@varaprasadgrandhi8101
@varaprasadgrandhi8101 Год назад
really amazing we cannot get this clarity until unless we read 2 to 3 books for each topic. it was very valuable information.
@saijaswanth5085
@saijaswanth5085 4 года назад
greatest professor ever
@abhinav788
@abhinav788 7 месяцев назад
Very calm professor and he explains very good. Thanks!
@KartikKumar-fz6jz
@KartikKumar-fz6jz 18 дней назад
Thank you sir for uploading videos..they are really helpful
@KrishnaKumar-np3tw
@KrishnaKumar-np3tw 6 лет назад
Nice tough question to implement given by the professor. Great lecture btw.
@18akashrajput45
@18akashrajput45 20 дней назад
at 54:46, as the solution suggests that wordcount-esque are implemented in a way that they will take complete input before processing. What if they are in the middle of cascading (sort | wc | somefunc), if the pipe is filled before wc is initialized, then it will never complete its process?
@jerryjohnthomas4908
@jerryjohnthomas4908 3 года назад
There is a howling at 15:10 mins so if u r using headphones beware
@nikhilbalwani2285
@nikhilbalwani2285 6 лет назад
Legend
@mahmad2504
@mahmad2504 6 лет назад
dup just duplicates a file descriptor and its data structure. You must assign it to stdout as well
@floatoss
@floatoss Год назад
Thanks a lot for these amazingly structured lessons professor! I had a question though, at 43:17, how are you very sure that the parent process will execute first? (you are reading in the child only after writing, so it has to be the case that you assumed here the parent will execute first).
@miraatifrafiq
@miraatifrafiq Год назад
parent process will execute only when the 'if' condition holds true (i.e. pid > 0 ) ... so it could be any of the two depending on the 'pid' and bc we've already forked it ; and the 'fd table' is duplicated and input and output is connected through pipe; we can inter-communicate between diff processes
@floatoss
@floatoss Год назад
@@miraatifrafiq yes, but that was exactly my question. If the child process executes, then the "else" condition will make the child process read the data which is not yet written by the parent. So it has to be the case that the prof. assumed the parent will have executed first. Or maybe, even if the child executes first, there is nothing to read from the pipe and hence the OS will ensure that someone has to fill the pipe before reading is what I'm assuming.
@karadifilms
@karadifilms Год назад
@@floatoss os is just going to make the parent wait until it is fed some input from the child in this case
@kuldeepsainiiii
@kuldeepsainiiii 2 года назад
Thank you very much sir
@kapilsrivatsa3040
@kapilsrivatsa3040 3 года назад
In the if else structure after fork 15:41, fork will return a pid which will randomly be either the child's pid or 0 ? which means other call might never happen ? For example, if pid is 0 child block's logic might get executed and wait() might never get executed ?
@-rate6326
@-rate6326 3 года назад
Parent's Fork will return Childs pid. child's fork will return 0 which will cause Child to execute exec
@vishnusingh4118
@vishnusingh4118 4 года назад
5:55 exec() never returns!
@nikhilvidhani7635
@nikhilvidhani7635 3 года назад
what if we create multiple forks in parent program what will be the exit code than
@mockingbird3809
@mockingbird3809 2 года назад
When we invoke `fork()` we get a return value of type `pid_t`, we can use this to refer to the process ID (PID) of the child to investigate. So, we pass this `pid_t` from `fork` to `wait(RETURNED_PID)` and the return value of wait() in this case corusponds to the return ID of the child processe's PID that we got from `fork()`. Since in this case, we're only creating one children at a time-meaning not multiple fork calls-we just pass `0` as an argument to wait() since its gonna be default.
@amido68
@amido68 5 лет назад
Is there a problem in the sound or I am just sick?
@chandbasha6008
@chandbasha6008 5 лет назад
what's happening when you close the stdin? why doesn't the output goes to stderr ?
@gouthamreddy9596
@gouthamreddy9596 6 лет назад
it is some what bit confusing
@veekysoft
@veekysoft 6 лет назад
he just spending time .there should be live coding which helps to understand topic more clearly.
@kapilsrivatsa3040
@kapilsrivatsa3040 3 года назад
He is not teaching coding. He is teaching concepts of Operating Systems which is completely theoritical
@lokeshwarreddy6397
@lokeshwarreddy6397 Год назад
get out of this channel idiot, I don't know from which place you people who have 0 CS knowledge come and blame the teacher. His teaching is absolutely amazing. You don't come to this channel after watching a python playlist.
@tbtitans21
@tbtitans21 4 года назад
horrible audio cant understand hardly any of it