1 / 19

Shahriar Pirnia pirnia

Operating system سيستم عامل. Shahriar Pirnia http://www.pirnia.net. (System Calls). فراخوانها ي س ي ستم ي. يک مثال: فراخوان سيستمي read : count = read (file,buffer,nbytes). براي خواندن از يک فايل مي باشد. سه پارامتر دارد: : نام فايلي که بايد خوانده شود. File

meghan
Télécharger la présentation

Shahriar Pirnia pirnia

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Operating systemسيستم عامل Shahriar Pirnia http://www.pirnia.net

  2. (System Calls) فراخوانهاي سيستمي يک مثال: فراخوان سيستمي read : count = read (file,buffer,nbytes) براي خواندن از يک فايل مي باشد. سه پارامتر دارد: : نام فايلي که بايد خوانده شود.File : محلي براي قرار دادن آنچه که خوانده شده است.Buffer : تعداد بايتهاي که بايد خوانده شودnbytes

  3. فراخوانهاي سيستمي براي مديريت پروسس (Process management) فراخوان سيستمي Fork: While (TRUE) { Read-command (command,parameters) If (fork ( ) != 0) { /*parent code*/ waitpid (-1,&status,0); } else { /* child code */ execve(command,parameters,0); } }

  4. Exit فراخوان سيستمي BRKفراخوان سيستمي size = BRK (addr) getpidفراخوان سيستمي Pid= getpid

  5. فراخوانهاي سيستمي براي سيگنالينگ (علامت دهي) Sigaction(SIGINT,SIG_IGN,NULL); Sigaction(SIGOUT,SIG_IGN,NULL); DEL Quit

  6. فراخوانهاي سيستمي براي مديريت فايل Fd = creat (“abc”, 0751) Fd = mknod (“/dev/ttyc2”,020744,0x0402) fd = open (file,how,…) s = close(fd) N = read (fd,buffer,nbytes) N = write (fd,buffer,nbytes) pos = lseek (fd,offset,whence) Fd=dup(1); Cat File1 File2 | Sort Pipe(&fd[0]);

  7. S = fstat (fd,&buffer) S = stat (name,&buffer)

  8. فراخوانهاي سيستمي براي مديريت فهرست Link(“/usr/jim/memo”,”/usr/ast/note”); Mount(“/dev/fd0”,”/mnt”,0); Chdir(“/usr/ast/test”);

  9. فراخوانهاي سيستمي براي حفاظت Chmod(“file”,0644); SETUID SETGID CHOWN ACCESS فراخوانهاي سيستمي براي مديريت زمان

  10. ساختارهاي سيستم عامل (OS Structure) (Monolithic Systems) سيستمهاي يکپارچه (Layered Systems)سيستمهاي لايه اي (Virtual Machines)ماشينهاي مجازي (Client/Server Systems)مدل مشتري خدمتگزار

  11. (Monolithic Systems) سيستمهاي يکپارچه

  12. (Layered Systems)سيستمهاي لايه اي

  13. : از تعدادي رينگهاي هم مرکز تشکيل شده است . Multics

  14. (Virtual Machines)ماشينهاي مجازي CP/CMS VM/370 (1979) Virtual Machine Monitor Conversational Monitor System (CMS) Exo Kernel

  15. (Client/Server Systems)مدل مشتري خدمتگزار

More Related