cs703 midterm solved past papers 2019

cs703 midterm solved past papers 2019

my paper703

Q 1. how thread in created and sometime a thread may not created why? 5 marks Q 2. Differentiate preemptive and non preemptive scheduling algorithms and give example of each. 5 marks. Q.3. How implicit and explicit memory allocator work 5 marks. Q 4. if size of header and footer is 4 byte word and no zero payload is allowed tell the minimum size block for each Assignment Header/ footer free word single word both Header footer free word = single word only header free word = double word both header footer free word = double word only header free word = 10 marks last one I dont know how to do. and 10 mcqof one mark each

CS 703 26/12/2015..Time 2:30

PST 10 MCQs Q 1. In your opinion what can be the ways that make it possible that the process should not enter in critical section simultaneously and fulfill critical section requirement in such a way that no need to code for it explicitly. Q 2. Describe the working of explicit and implicit memory allocators Q 3. Suppose that asystem is in an unsafe state. Show that that is possible for the process to completed their execution without entering a deadlock state. Q 4. What is the algorithmic order of the worst case allocation time and worst case freeing times of the following dynamic memory allocation techniques? a. Implicit free lists b. Explicit free list (with coalescing while freeing) c. Simple segregated free lists (without coalescing while freeing).

703 objectives from past paper Midterm Paper 07-07-2015 at 7:30am

MCQ ——10 marks 1. In top down view, all services are involved & accomplish through ——-calls a) System Data Process Memory 2. If any parent terminates without repearing child then child will be repeat by ——process a) Fork b) Init c) .dll d) .rp

  1. Explicit reaping is only required form—-running process a) Short Medium Long All 4. If two threads are waiting for lock & both see its —-only one grab it a) Under process Free b) Address space Namespace 5. A queue of threads are waiting for something inside a critical region is called a) Local variable Global variable b) Semaphore Condition variable 6. ——scheduling assign priorities to tasks on basis of periods a) Time Monotonic Period monotonic b) Time Period 7. Function is called —- if and only if it access no shared variables when called from multiple threads a) Atomic Safe Unsafe Reentrant 8. Condition variables are not cumulative that’s why they must be in a a) Critical section b) Monitor c) Semaphore d) Mutex 9. In —-architecture of process assignment ,key kernel function always run on particular process a) Kernel level b) Master/slave c) Peer d) Global 10. User —–can create lots of kernel work i.e may network packets comein that OS has to process when doing a read or write system call a) Process b) Thread c) Input d) Output Kernel provides basic primitives e.g. transport of messages, loading programs into memory, device handling. Policy decisions are made in the user space while mechanisms are implemented in ________. 1. Micro-kernel 2. Registers 3. Space 4. Memory In _________ of process assignment, operating system can execute on any processor and each processor does self-scheduling. 1. Global Queue 2. Master/slave 3. Peer Architecture 4. Kernel level ________fragmentation occurs when there is enough aggregate heap memory, but no single free block is large enough.
  2. External 2. Internal 3. Memory 4. Heap A non-process kernel execute kernel outside of any _______. (a) Address Space (b) Module (c) Event (d) Process Explicit reaping is only required form—-running process a Short b Medium c Long d All ——scheduling assign priorities to tasks on basis of periods a) Time Monotonic b) Period monotonic c) Time d) Period The rate-monotonic scheduling algorithm uses pre-emptive scheduling with static priorities. Priorities are assigned inversely to the period of each task, giving higher ( better ) priority to tasks with shorter periods. 1.Non-process Kernel Execute kernel outside of any (process) 2.Interrupts Caused by events external to the( processor) 3.A progress graph depicts the (discrete) execution state space of concurrent threads 4.A (semaphore) is a variable that is manipulated atomically through two operations, signal and wait 5.When semaphores are used for mutual exclusion, the semaphore has an initial value of 1, {V()} is called after the critical section 6.(STCF) run whatever job has least amount of stuff to do 7.The system will not interrupt a (SCHED_FIFO) thread if Another FIFO thread of higher priority becomes ready 8.dynamic memory ki aik mcq thaa 9.(Explicit:) application allocates and frees space 10.load sharing thee i think.

CS 703 Three processes are sharing 4 resources of same type in system. Every process need 2 resources show system is deadlock free. Whyit is considered that threads are harmful? In lectures, we studied that there are three methods possible to achieve concurrency. What is the difference between second (Single Process, multiple events) and third (threads) method? Difficulties with designing system software?


1) 20MCQs 2) ConsideravariantofroundrobinwheretheentriesinthereadyqueuearepointertothePCB. a) Whatwouldbetheeffectofputtingtwopointerstothesameprocessinthereadyqueue? b) Whatwouldbethemajoradvantageanddisadvantageofthisscheme? c) HowwouldyoumodifythebasicRRalgorithmtoachievethesameeffectwithoutthe duplicatepointers? Answer: a.Ineffect,thatprocesswillhaveincreaseditsprioritysincebygettingtimemoreoftenitis receivingpreferentialtreatment. b.Theadvantageisthatmoreimportantjobscouldbegivenmoretime,inotherwords, higherpriorityintreatment.Theconsequence,ofcourse,isthatshorterjobswillsuffer. c.Allotalongeramountoftimetoprocessesdeservinghigherpriority. Inotherwords,have twoormorequantumspossibleintheRound-Robinscheme.

Boundedbuffermonitorprogram Write a bounded-buffer monitor in which the buffers (portions) are embedded within the monitor itself. Answer: monitor bounded_buffer { int items[MAX_ITEMS]; int numItems = 0; condition full, empty; void produce(int v) { while (numItems == MAX_ITEMS) full.wait(); items[numItems++] = v; empty.signal(); } int consume() { int retVal; while (numItems == 0) empty.wait(); retVal = items[–numItems]; full.signal(); return retVal; } }

Threeprocessesaresharing4resourcesofsametypeinsystem.Everyprocessneed2 resourcesshowsystemisdeadlockfree. solution Ifthesystemisdeadlocked,itimpliesthateachprocessisholdingoneresourceandiswaiting foronemore.Sincethereare3processesand4resources,oneprocessmustbeabletoobtaintwo resources.Thisprocessrequiresnomoreresourcesandthereforeitwillreturnitsresourceswhen done.

Multithreadsolutiononmultiplekernelthreadgivesbetterperformancethansingle threadsolutiononsingleprocesssystem.Underwhatconditionthisoccurs.

Answer: Whenakernelthreadsuffersapagefault,anotherkernelthreadcanbeswitchedintousethe interleavingtimeinausefulmanner.Asingle-threadedprocess,ontheotherhand,willnot becapableofperformingusefulworkwhenapagefaulttakesplace.Therefore,inscenarios whereaprogrammightsufferfromfrequentpagefaultsorhastowaitforothersystem events,amulti-threadedsolutionwouldperformbetterevenonasingle-processorsystem.

Microkerneladvantagesanddisadvantages Answer: Benefitstypicallyincludethefollowing (a)addinganewservicedoesnotrequiremodifyingthekernel, (b)itismoresecureasmoreoperationsaredoneinusermodethaninkernelmode,and (c)asimplerkerneldesignandfunctionalitytypicallyresultsinamorereliableoperatingsystem.

Theprimarydisadvantageofthemicrokernelarchitecturearetheoverheadsassociatedwith interprocesscommunicationandthefrequentuseoftheoperatingsystem’smessagingfunctions inordertoenabletheuserprocessandthesystemservicetointeractwitheachother.

You May Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: