0% found this document useful (0 votes)
10 views

Operating System

The document outlines the examination structure for a Computer Science and Engineering course at Khulna University of Engineering & Technology, including various questions related to operating systems, distributed systems, and memory management. It specifies the requirement to answer questions from two sections, with detailed prompts on topics such as deadlock, resource allocation, scheduling algorithms, and paging. The examination is designed to assess students' understanding of theoretical concepts and practical applications in computer science.

Uploaded by

triviatruism
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
10 views

Operating System

The document outlines the examination structure for a Computer Science and Engineering course at Khulna University of Engineering & Technology, including various questions related to operating systems, distributed systems, and memory management. It specifies the requirement to answer questions from two sections, with detailed prompts on topics such as deadlock, resource allocation, scheduling algorithms, and paging. The examination is designed to assess students' understanding of theoretical concepts and practical applications in computer science.

Uploaded by

triviatruism
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 11
TIME: 1.5 hours Fu N.B. i) Ans KHULNA UNIVERSITY OF ENGINEERING & TECHNOLOGY gineering 3" Year 2"''Term Examination, 2020 nee and Engineering, fet ANY TWO questions from each section ii) Figures in the right margin indicate fll marks. separate scripts. (Answer Al in Script A) 4) Define deadlock. Explain the purpose of ‘wait for graph’. How it can be constructed from (11) *Resource-Allocation graph" b) Depiet how a boot-sector computer virus affects an operating system (OS). ay ©) Explain how access matrix can be implemented? (08) a) Depict the paging model of logical and physical memory. Explain it using a 32 byte memory (11) with 4 byte pag b) Explain (i) First fit, (ii) Best fit, and (iii) worst fit storage allocation algorithms. at) ¢) How a failure is detected in distributed environment? Explain. (08) a) What is distributed file system? Discuss about its structure. aly ‘b) How repeated collisions over a communication network can be avoided? Explain. (uy 6) Using your own data, explain RSA algorithm, (08) SECTION B (Answer ANY TWO questions from this section in Script B) - a) What is the purpose of loadable kernel modules? List three services provided by an operating (10) system, and explain how each creates convenience for users. In which cases, would it be impossible for user-level programs to provide these services? Explain your answer. b) Some computer systems provide multiple register sets. Describe what happens during the (10) following scenarios: i) When a context switch occurs if the new context is already loaded into one of the register sets. ii) When the new context is in memory rather than in a register set and all the register sets are in use, ¢) Using Amdahl’s Law, calculate the speed gain for the following applications: (10) i) $0% parallel with eight processing cores. ii) 70% parallel with four processing cores. iii) 90% parallel with eight processing cores. . a) The following processes are being scheduled using a preemptive, round-robin scheduling (20) algorithm. Process Priori Burst ‘Arrival | Pi 4 25 0 Pr 3 30 30 Py 3 20 30 Pe 2 20 50 Ps 3 15 70, Each process is assigned a numerical priority, with a higher number indicating a lower relative priority, In addition to the process listed above, the system also has an idle task (which consumes no CPU resources and is identified as Puse). This task has priority 100 and is scheduled whenever the system has no other available process to run, The length of a time quantum is 10 units. If a process is preempted by higher priority process, the preempted process is placed at the end of the queue. i) Show the scheduling order of the processes using Grantt chart ii) Whats the average turn around time? iii) What is the average waiting time? Page: | of 2 iy i) i) a itty DY We have cont c at tallowing No deadlock with mayinwum parallelism, LRU replac FIO seplaceme Optimal replace ous allocation scheme anid linked soples problem, discuss solutions behind the following outcomes fuults would occur for the st allocation schemes for implementing (10) mpare the two schemes based on theit relative advan es andl disadvantages. Kuta UNIVERSITY OF ENGINEERING & TECHNOLOGY St. Engineering 3 Year 2 Term Examination, 2019 epartment of Computer Seience and Engineering . CSE 3201 . Operating Systems ‘iste: 3 hours FULL MARKS: 210 NB. i) A: 'Y THREE questions from each section in separate scripts. ii) Figures gin indicate full marks, ON (Answer ANY THREE questions from this section in Script A) races in case of operating system, Why deadlock occurs in operating system? Specify (07) ) Will there occur deadlock according to the resource allocation graph of the following figure? (07) How the deadlock may occur? R Ry 2 the methods for handling deadlock. How deadlock prevent fering into deadlock? lock detection algorithm in case of resources with single instance. A system that (11) Algorithm for deadlock avoidance has five processes (1, 2, 3, 4, 5) and uses resources of four different types (A. B. C, D). Considering the following table. T ‘Allocation ‘Max Request prevents the system (10) Process ATs | clDi]A)] 6B i c TD 4 7 110 1 2 0 312 | 4124 2 0 3 {1 2 3) 3s [1,2 | 3 24st 2 [7 1715 (recur 3 [0 | 0 | 6 si} so cos 412 3 612] 1 | 4 the system in safe state? If your answer is yes, then show the safe sequence, N.B. Total resources (A = 13, B= 13,C=9,D= 13). 2. a) Suppose, a memory is partitioned into 6 fixed blocks of size 200, 400, 600, 500, 300, 250. (10) There are 4 processes Pi, Pa, Ps, Peof size 357, 210, 468, 491 respectively, i) Apply First fit, Best fit and Worst fit io store process in the memory. Also, mention the size of extemal fragmentation (if any). ii). Why Best fit performs best in case of fixed size partitioning? ') What is paging in operating systern? Draw a block diagram showing how paging is used in (10) memory management, What is the use of Translation Lookaside Buffer in ease of paging? ©) Describe multilevel paging. Suppose, address space is 32 bits, page size is 4KB, page table (10) entry size is 4B. How many bits are needed for addressing page tables and page offset? 4) What is the basic concept of inverted page table? How is it used in memory management? (05) 3. a) What is segmentation? Why segmentation and paging sometimes combined into one scheme? (08) 'b) What is garbage collection in general graph directory structure? Explain using a figure. (05) ©) How free-space is managed in case of file system? Explain all the methods. (08) 4d) What is file system mounting? How mounting is used in Network File System (NFS)? Draw (14) schematic view of NFS architecture. 4. a) How a failure is detected in distributed environment? Explain. (03) ») Explain the most common connection strategies in distributed communication, (08) Page: J of 2 mmon routing strategies in distributed commmunication with possible stem, Explain how remote resources are accessed herein, SECTION B (Answer ANY THRE from this section in Script B) E question ing systems? meters to operating systems? Explain. Structure in details. nd system program with examples, a) Why should you study o} b) How dos ? How can it be solved? jortest Remaining Time First (SRTF) process scheduling times and burst times for the processes mentioned in the a) What is starvation problet b) An operating syst algonthm. Consider the artiv following table. __ Process ‘Arrival Time 1 | ig T 0 68 Calculate waiting time and turnaround time, ©) Explain busy wai trict allocation me 2 10d to achieve mutual exclusion. a) How does process is represented in Linux? bb) Describe different types of CPU scheduler. ¢) “Process creation is heavy-weight while thr false? Why? 4d) Differentiate between concurrency and parallelism. ad creation is light-weight”. Is it true or a) Write down the advantages of partial loadi b) Show the steps in handling a page fault with proper diagram, ¢) Consider a reference string: 4, 7, 6, 1, 7.6.1, 2. 7.2. The number of frames in the memory is 3, Find out the number of page faults respective to optimal page replacement algorithm and FIFO page replacement algorithm. Then compare their performances. (10) 2) (09) (0) (10) (06) (07) (16) (2) (08) (09) (10) (08) (06) (12) a7 LNA UNIVERSITY OF ENGINEERING & TECHS gineering 3" Year 2" Term Examination, 2018 Department of Computer Seience and Engineering CSE 3201 TME: 3 hours FULL MARKS: 210 N.B. i) Answer ANY THREE questions from each section in separate scripts, li) Figures in the right margin indicate full marks. SecTION A (Answer ANY THREE, questions from this section in Seript A) 1. a) Define distributed system. Discuss merits of it, (08) by Discuss the most common routing schemes in distributed communication with possible merits (09) and demerits 2 pln the most common connection strategies in distributed communication. (09) €) Expl the techniques to avoid repeated collisions over a communication network. (09) 2. a) Define deadlock. Using several ‘Resource-allocation-graphs’ depict scenarios of deadlock. (15) ‘Also explain conditions of deadlock. ) Discuss preconditions and data structures of Banker's algorithm, Also explain it using your (13) own data, ©) Discuss the issues of resource preemption to eliminate deadlock. 7) 3. a) What is distributed file system? Discuss about its structure. (08) b) Define access matrix. How it can be implemented? (08) ©) Define paging. Depict the paging model of logical and physical memory. Give an example of (11) it for a 32 byte memory with 4 byte pages. 4) Depict how a boot-sector computer vir affects an operating system. (08) 4, a) What is ‘man. -mididle’ attack? Discuss various types of program threats, (a9) by Ik facitiates to naptement paying nardware? Depict with a diagram. Why (12) segmentation and paging are combined sometimes into one scheme? ©) Define the following storage allocation algorithms: on () First fit, (i) Best fit, and (ii) Worst fit. ) How digital signature can ensure user authentication? Explain. (08) Stcrioy B (Answer ANY THREE questions from this section in Script B) 5, a) What do you mean by real time operating system? Classify it with examples. ao ) How does CPU switch from one process to another? Show with necessary (10) €) What isombi9)process and Orphan process? (05) 4) Classify the’ parameters of Pthread_create() and Pthread|join() functions. (19) 6. a) Write down the system call sequences to copy the contents of one file to another file. a2) b) Define critical region. Mutual exclusion can be acquired by Producer Consumer Problem (15) concept. Explain it with Semaphore. ©) Explain Busy Waitt in strict allocation method to achieve mutual exclusion, (08) 7. a) Discuss about the CPU scheduling criteria (03) 'b) An operating system uses Multilevel Queue process scheduling algorithm. Consider the (15) following table of four processes under Multilevel Queue Scheduling. Queue Number denotes the queue of the process. Priority of queuel is greater than queue2. Queue uses Round Robin (Time Quantum = 3) and queue2 uses FCFS scheduling algorithm. Process | Amival Time | Burst Time | Queue Nomber] Pi 2 | 5 1 | Ps 0 6 z Ps 4 3 1 Pe 10 7 H Calculate the waiting times and turmaround times for each process, ©) What i the problem occur in Priority-based CPU scheduling? How does it can be solved? (08) Page: I of 2 @) Write dow and tonepreemptive CPU scheduling, (07) the differen between preemptive is degraded by 2 150 nanoseconds, fault rate? Assume, Memory erviee Time = 8 mictoscvonds ge fault using Least Recently Used (LRU) page replacement (13) RAM size is 4 att ine the number of pa algorithm for the following reference string. Assume, Reference Sting: 7.0, 12,0, 3,004 2.3.0.3, 2. 12,0 1, 7,051 «) Explain Belady’s anomaly in FIFO page replacernent algorithm with graphical view 1) Page: 2 of 2 HULNA UNIVERSITY OF ENGINEERING & TECHNOLOGY BSc. Engineering 3rd Year 2nd Term Examination, 2017 Department of Computer Science and Engineering CSE 3201 Operating Systems TIME: 3 hours wnswer ANY THREE questions from each s {i) Figures in the right margin indicate full marks, LL Marks: 210 tion in separate scripts. A (Answer ANY THREE questions stom this section in Script A) 1. a) Define and discuss the characteristics of deadlock. Using several ‘Resource-allocation (12) graphs’ depict scenarios of deadlock and uo-deadlock ») Explain pre-condition and data structures for Banker's Algorithm. Also using your own data, (13) explain Banker's algorithm, | . ©) How you decide, a system is in safe state? Explain the purpose of ‘wait for graph’. Also (10) construct it from ‘Resouree-Allocation graph’. 2. a) Define distributed operating system (OS). Explain how remote resources are accessed herein. (12) ») Discuss the most common routing strategies in distributed communication with possible (10) merits and demerits, ©) Explain the most common connection strategies in distributed comanunication, co 4) How failure is detected in distributed envionment? Explain, 3. a} In memory, how logical address space is defined? Using necessary diagram, explain how (12) instruction and data are combined to memory address. ; 1 ») Define paging. Depict the paging model of logical and physical memory. Give an example of (11) it fora 32 byte memory with 4 byte pages. | i ©) How TLB facilities to implement paging hardware? Depict with a diagram. Why (12) segmentation and paging are combined sometimes into one scheme? 4. a) What is meant by ‘masquerading’ attack? Discuss various types of program threats. a0) ») Depict how a boot-sector computer virus affects an OS. (08) ©) How digital signature can ensure user authentication? Explain, 7) 4) Using your own date show how RSA eryptosystem ensures secure communication over (10) insecure medium, (Answer ANY THRER. ions from this section in Script B) 5. a1 What are the essential managers of Operating System? Briefly des (io) 'b) How operating System: boots up? (05) ©) Write down the services provides by Operating System. (10) 4) Define system call. Discuss the Layered Structure of Opersting System, (10) 6. a) What is starvation problem? How can it be sulved? (07) b) An Operating System uses Shortest Remaining Time First (SRTF) process scheduling (16) algorithm. Consider the arrival times and burst times for the following processes: Process | Burst Time | Arrival Time Pi 20, T 1 Ps 25 1s Pr 10 30 a 65 Calculate the waiting time and tumarousd time for each process. ©) What is race condition? Mutual Exclusion can be acquired by Producer Consumer Problem (12) Concept. Explain it with semaphore. 7. a) Draw the process state diagram, (06) 'b) What is Context Switching? Discuss about process contral block. (13) ¢) “Pthread isa specification, not implementation.” Justify the statement, (05) 4) What do you mean by implicit threading? Describe it with Grand Central Dispatch method. (10) 8. 2) Define Virtal Memory. Write down the advantages of partial loading, on ») Describe the steps of handling page fault with necessary figure, (2) ) Let's memory access time = 200 nanoseconds, average page fault service time = § (06) ‘microseconds. If page fault rate is 0.296, determine the “Effective Access Time’, ©) Compare the performance between Optimal Page Replacement and Least Revent Used (10) algorithm for the page reference string: 2, 3, 2, 1, 5 2,4, 5, 3,2, 5, 2; where, RAM siz Page: 1 of 1 NA UNIVERSITY OF ENGIN ERING & TECHNOLOGY B.Sc. Engineering 3rd Yeur 2nd Term Examination, 2016 Department of Computer Science and Engineering CSE 3201 . Operating Systems Time: 3 hours: FULL MARKS: 210 N.B. i) Answer ANY THREE questions from each section in separate septs. ii) Figures in the right margin indicate full marks. HON A (Answer ANY THREE questions from this section in Seript 4) 1. a) Define lock. Using multiple “Resourcesallocation graphs", discuss the scenarios of (15) jock. Also explain the conditions that may cause deadlock, example, Also diseuss preconditions and data (13) te deadlock. on 1A lotical addresses. How instructions and data can be (13) essary diagram, jon algorithms: (on) (ily Worst fit Lous memory allocation? Discuss it precisely. How does (15) ‘paging hardware? Explain with diagram. Discuss the merits of it. (07) tem (DES)? Discuss about DFS structure. (08) aac nnd ‘stateless file service’. Make a comparison between stateful (10) 4 collisions over a communication network? Explain (10) it be implemented? (08) ‘communication over insecure medium? Explain (10) ‘user authentication? How doas digital signature technique ensure user (07) 42 Discuss how a boo-sector computer virus affects the (10) 108 B ss ANY THREE questions from this seetion in Seript B) vel? Draw a block diagrem of Microkernel System Structure, (06) Explain with diagram. (09) Control Block. (07) sion of an application has disproportionate effect on performance gained by adding (08) -yplain this statement using Amdahl's law, “} flobin CPU scheduling? Consider the following processes arrive at nearly (14) ———————— Processes Burst Time ©) What i Explain multilevel feedback queue with the follow ulilevel feedback queue? of time quantum. eduling with 2 millisecond ving with 4 milliseconds of time qua Level 1 queue QU: RR sel Level 2 queue Q2: RR sch (09) 7. a) Define the following terms: i) Soft real ii) Hard ore. as) ie philosophers take their left (06) n with semaph ation scheme of file? How can these be solved by (10) EAT? Explai b) What is intod ©) What is & ienodes over FAT? (os 200 nanoseconds, average page- (12) ult in every $,00000 memory (08) Knut ULNA UNIVERSITY OF ENGINEERING NOLOGY B.Sc, Engineering 3rd Year 2nd Term Examination, 2015 Department of Computer Science and Engineering Cc 1201 Operating Systems TIME: 3 how FULL MARKS: 210 NB. i) Answer ANY THREE questions from each section in separate scripts. ii) Figures in the right margin indicate full marks. SECTION A (Answer ANY THREE questions from this section in Seript A) 1. a) Define distributed system. Discuss the merits of it. (08) 'b) What are the types of distributed operating systems? Discuss them. What are the reasons to (09) use ‘process migration’- Explain them, 6) Discuss the most common routing schemes in distributed communication with possible merits (09) and demerits. ) What are the techniques to avoid repeated collisions over a communication network? Explain (09) them, 2. a) Discuss the characteristics of deadlock. Depict a deadlock situation with an appropriate (09) Resource Allocation Graph, > +b) What are the methods to handle deadlocks? Discuss the pre-conditions and data structures for (17) Banker's Algorithm. Also explain Banker's Algorithm with an example, ©) How a deadlock in case of single instance of each resource type is handled using wait for (09) raph? Discuss the issues of resource preemption to recovery from deadlock. 3, a) What is meant by ‘man-in-the-middle’ attack? Discuss how a boot-sector computer virus (10) affects the operating system. - | 1) RSA exyplosystem can ensure secure communication over insecure medium-how? Explain (09) swith an example. ) How digital signature can ensure user authentication? Explain, on 6) Define access matrix. How itcan be implemented? 0) 4. a) With necessary diagrams explain how instructions and data can be combined to memory (10) address. Why are page sizes always power of 2? ') Discuss the problems in case of contiguous memory allocation, Dynamic storage allocation (10) problem can be solved in many ways- explain any one of them. ©) Define paging, Give an example of it . on 4) How TLB facilitates to implement paging hardware? Explain with a diagram, (08) SEcTIONB (Answer ANY THREE questions from this section in Seript B) 5, a) Why should we study operating systems? What do you mean by system program and loadable (10) kemel module? 'b) What is process state? Write down the process states briefly with proper diagram. 07) ©) How does CPU switch from process to process? Explain with proper diagram, (19) {) Write a pseudo code for reating child process form parent. How can you make this child (08) orphan? Explain with pseudo code. 6, a) Define the following terms: ‘)Data parallelism, if) Task parallelism and ii) Concurrency. ») “Serial portion of an application has disproportionate effect on performance gained by adding (08) additional cores”. explain this statement using Amdahl’s law. ©) What do you mean by thread library and thread pool? Describe two level model of (10) ‘multithreading, G 4) Whatis priority scheduling? What is the main problem and corresponding solution of priority (06) scheduling? ©) What is exponential averaging? (06) (05) Page: 1 of 2 we have following processe: orrespondin al and burst time: (15) Process | Arrival time |_ Burst time Py 0 2 Pr 1 P3 3 9 Pa 4 1 P. 5 8 Pe 7 2 Py 9 5 Draw the Gantt chart for shortest remaining time first algorithm. Find out average waiting and turn-around time. ) Suppose there are two processes P; and P2. P; has period P; = 50 and CPU burst ty = 25 and (13) Py has period P> = 80 and t, = 35. Is it solvable by rate monotonic scheduling? Why or why not? Solve this problem with earliest deadline first (EDF) scheduling and draw necessary Gantt chart. ©) What is little’s formula? Explain briefly with an example. (07) . a) What is busy waiting? Explain it using strict alteration method. (08) b) Solve the producer-consumer problem with semaphore. Write down necessary semaphore (15) structure, wait and signal method, necessary conditions and code for producer and consumer process. c) What is contiguous allocation of file? Write down the advantages and disadvantages. 7) d) Discuss about distributed file system. (05)

You might also like