Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
CSE3320,OperatingSystems Spring2017,Homework1 Duedate:Mar.17,inclass,hard-copysubmissionONLY Pleasereadthis: 1) Homeworkassignmentsaretobecompletedindividually,noteamwork. 2) Totalpointspossible:100pts. 3) Ifnototherwisestated,eachproblemis5pts. 4) Pleaseaddthefollowingstatementinthebeginningofyoursubmission. Ihaveneithergivenorreceivedunauthorizedassistanceonthiswork Signed:Date: Chapter1: 1.Whatarethetwomainfunctionsofanoperatingsystem?Explaineachofthe functionbriefly. 2.Whatarethedifferencesbetweenatrapandaninterrupt? 3.Whatarethemainstructuresofcontemporaryoperatingsystems,andtheir advantagesanddisadvantages? 4.HowcanI/OdevicesnotifyanOSofthecompletionofjobs?Listthreeways. 5.DescribetheactionsanOSmusttaketoprocessaninterrupt. 6.Whatisasystemcall?Howisthetransitionbetweentheuser-modeandthe kernel-modeperformed? Chapter2: 1.Whatisaprocess?Whatarethetwoessentialpartsofaprocess?Howisaprocess differentfromaprogram? 2.Giventhefive-stateprocessmodel,explainhowdoesaprocesstransitamong thesestatesandonwhatevents? 3.Whatarethedifferencesofthreadsandprocesses? 4.Whatismultiprogrammingandwhyitisneeded? 5.Discusstheadvantagesanddisadvantagesofuser-levelthreadsandkernel-level threads. 6.DiscussthegoalsofCPUschedulingondifferentcomputersystems. 7.Assumethatthefollowingprocessesaretobeexecutedonauniprocessorsystem. BasedontheirarrivaltimeandCPUburst,calculatetheaverageturnaroundtime andresponsetimeoftheseprocessesunderthefollowingschedulingpolicies: a.FCFS b.RoundRobin(quantum=4and6) c.ShortestJobFirst(preemptiveandnon-preemptive) Process ArrivalTime CPUburst P1 0 12 P2 0 3 P3 2 7 P4 3 4 Comparetheperformanceofabovepolicies. 8.Whataretheadditionalrequirementsofmultiprocessorschedulingcompared withuniprocessorscheduling?Whatarethepossibleissues? 9.Listdifferentwaystoensuremutualexclusion. 10.Whataretheadvantagesanddisadvantagesofbusy-waitingandsleep-and-wake approachesformutualexclusion? 11.Whysemaphoreisneeded?Whatarethecommonalitiesanddifferences betweensemaphoreandmutex. 12.Inthediningphilosophersproblem(Page166,Figure2-46),explainwhatthe doesthefunctiontest(i)do(tworoles)andhowitworks. Chapter6: 1.Showhowthedeadlockdetectionalgorithmworksonthefollowingprocessresourcegraph. 2.Problem22(orproblem26inthe4thedition)inChapter6. NOTE:ChangetherowofprocessBasAllocated:20111Maximum:22211andthe rowofCasAllocated:11010Maximum:21410