Professional Documents
Culture Documents
1. Command interpreter is an interface between (a) (b) (c) (d) (e) Application program and operating system Operating system and hardware Operating system and user User and hardware Hardware and operating system.
2. Send and receive is part of (a) (b) (c) (d) (e) Process control system call Control system call Communication system call Process communication system call User and hardware.
3. Virtual machine can be defined as (a) (b) (c) (d) (e) Multiple processor distributed between multiple processes Single processor distributed between multiple processes Multiple processes distributed between multiple processor Single process distributed between multiple processor Process control system call.
4. A process consists of (a) (b) (c) (d) (e) Text section, program counter, stack, data section, heap Program, program counter, data section Text section, data section Program, program counter, stack, heap Single process distributed between multiple processor.
5. Degree of multiprogramming means (a) (b) (c) (d) (e) Number of program in the system Number of users in the system Number of process in the system Number of CPUs in the system Program, program counter, stack, heap.
6. What does a thread mean? Choose the correct statement? (a) (b) (c) (d) (e) Process within processes Process in execution Heavy weight process within a process Light weight process within a process Number of users in the system.
7. In multilevel feedback-queue scheduling processes (a) (b) (c) (d) (e) Can move between queues Cannot move between queues Are assign a queue permanently Numbers programs in the system Numbers users in the system.
8. Readers and writers problem is related to (a) (b) (c) (d) (e) CPU scheduling Process scheduling CPU synchronization Process synchronization Batch Operating System.
9. Which of the following allows a single user to share a computer system simultaneously? (a) (b) (c) (d) (e) Batch Operating System Network Operating System Time sharing Operating System Distributed Systems Multiprocessor System.
10.Time Sharing System is also known as (a) (b) (c) (d) (e) Multiprogramming System Multitasking System Single programming System Multiprocessor System Distributed Systems.
11.Multiprocessor System is also known as (a) (b) (c) (d) (e) Tightly coupled System Loosely couple System Decoupled System Tolerant System Multiprocessor System.
12.Distributed System is also known as (a) (b) (c) (d) (e) Tightly coupled System Loosely cohesive System Decouple System Tolerant System Loosely couple System.
13.Components of a computer system follow which of the following order? (a) (b) (c) (d) (e) Operating system, hardware, system and application program, user Hardware, operating system, system and application program, user User, operating system, system and application program, user User, operating system, hardware, system and application program Hardware, operating system, user, system and application program.
14.Which of the following system call creates a new process? (a) (b) (c) (d) (e) Create Load Fork Execute Open.
15.Schedulers have been heavily studied over the last three decades for which of the following reason? (a) (b) (c) (d) (e) Designers of multiprogramming operating systems knew the scheduler's behavior was critical to the performance of the individual process's perspective Those designers believed the scheduler's behavior might be critical to the overall behavior of the system The methodologies used to study schedulers were well-entrenched in operations research Schedulers were a nice theoretical computer science problem All (a), (b), (c) and (d) above.
16.ACL stands for (a) (b) Attribute Control List Access Connection List
17.What is the high paging activity? (a) (b) (c) (d) (e) Paging Segmentation Swapping Thrashing Mapping.
18.Number of process that completes their execution per unit time is called (a) (b) (c) (d) (e) Throughput Output Process speed CPU speed Clock counter.
19.The job of short-term scheduler is to I. Create new processes. II. Select processes those are ready to execute. III. Allocate Program to one process. (a) (b) (c) (d) (e) Only (I) above Only (II) above Only (III) above Both (I) and (II) above Both (II) and (III) above.
20.Which scheduling determines the following statement? CPU allocated to a process is taken back. (a) (b) (c) (d) (e) Pre-emptive Non-preemptive Plain Blocked Non-blocking.
21.Saving the state of old process and loading the saved state of the new process is called as (a) (b) (c) (d) (e) Process transfer Context loading Process loading Context switching Process switching.
22.Information regarding each process in a system is kept in (a) (b) (c) (d) (e) Information block Process block Process control block Control block Program control block.
23.Find out the correct statement (a) (b) (c) (d) (e) Processes share same address space a thread does not Processes and thread share same address space Threads share same address space processes do not Processes and thread have there own address space All (a), (b), (c) and (d) above.
24.Program counter indicates (a) (b) Address of first instruction Address of next program
25.RPC means (a) (b) (c) (d) (e) Remote Program Creation Remote Procedure Call Remote Procedure Creation Restricted Procedure Call Regulated Procedure Call.
26.The round robin CPU scheduling uses (a) (b) (c) (d) (e) LIFO Stack FIFO Stack FIFO Queue FILO Queue Control block.
27.Wait time can be defined as (a) (b) (c) (d) (e) Time taken by a process waiting to execute Sum of periods spent waiting in ready queue Sum of time taken by a process in ready queue, suspend queue Sum of periods spent in suspend queue Control block.
28.Critical section problem must satisfy which of the following order? (a) (b) (c) (d) (e) Mutual exclusion, race condition and threading Progress, bounded waiting and starvation Mutual exclusion, progress and bounded waiting Program deadlock Process deadlock.
29.Semaphore is tool related to (a) (b) (c) (d) (e) Process deadlock Process synchronization Deadlock synchronization CPU scheduling All (a), (b), (c) and (d) above.
30.In multilevel queue scheduling processes (a) (b) (c) (d) (e) Can move between queues Are assigned a queue permanently Are allowed to move once Are not assigned a queue permanently Process deadlock. END OF SECTION A
1.
a.
Assume you have the following jobs to execute with one processor, with the jobs arriving in the order listed here:
2.
i T(pi) 0 80 1 20 2 10 3 20 4 50 i. Suppose a system uses FCFS scheduling. Create a Gantt chart illustrating the execution of these processes. ii. What is the turnaround time for process p3? iii. What is the average wait time for the processes? ( 5 marks) b. Using the process load in the previous problem, suppose a system uses SJF scheduling. i. Create a Gantt chart illustrating the execution of these processes. ii. What is the turnaround time for process p4? iii. What is the average wait time for the processes? ( 5 marks) Consider the segment table: What are the physical address for the following logical addresses: a. 0,430 b. 1,10 c. 1,11 d. 2,500 Segment Base Length 0 219 600 1 2300 14 2 90 100 3 1327 580 4 1952 96 A system has four processes P1 through P4 and two resource types R1 and R2. It has 2 units of R1 and 3 units of R2. Given that: P1 requests 2 units of R2 and 1 unit of R1 P2 holds 2 units of R1 and 1 unit of R2 P3 holds 1 unit of R2 P4 requests 1 unit of R1. Show the resource graph for this state of the system. Is the system in deadlock, and if so, which processes are involved? a. List three examples of deadlocks that are not related to a computer system environment. b. Give briefly the various ways of establishing interprocess communication. a. What are the properties inherited by a child process from parent process? b. Describe critical section problem. What are the basic requirements for solution to a critical section problem must satisfy? END OF SECTION B
( 12 marks)
3.
4.
5.
6. 7.
Find the average seek time by implementing FCFS, SSTF, CSCAN for the given requested tracks 55, 58, 39, 18, 90, 160, 150, 38, 184 if initially header is located at 100. ( 10 marks)
16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30.
ii.
iii.
b.
i.
0 10 30 50 ii.. The turnaround time for process P4 is = 100. iii.. Average waiting time calculation: Waiting time for process p0 = 0 sec. p1 =10 sec. p2 = 30 sec. p3 = 50 sec. p4 = 100 sec. Therefore, the average waiting time is = (0+10+30+50+100)/5 =38 219+430 = 649. 2.a. b. 2300+10=2310. c. 2300+11=2311 d. Illegal address since size of segment 2 is 100 and the offset in logical Address is 500. 3.
P0 180
4.a. Two cars crossing a single-lane bridge from opposite directions. A person going down a ladder while another person is climbing up the ladder. Two trains traveling toward each other on the same track. Pipes: In this process a pipe is described which is essentially an array that has two pointers, one is for input end and one for output. In this it imperative that if one process writes it closes it s reading end and vice versa 2. Shared Files: one process identified as a writers process writes in the file. Another process identified as readers file reads from this file. Another way could be that instead of using files we can have pointers . one process positions a pointer at the file location and another process reads from this file at the communication location 3. Shared memory communication: in this one process writes into a certain commonly accessed area and another process would read subsequently from that area. 1. Environment: all the variable=value pairs in the environment. 2. Process identifier: the new process gets his own process id 3. Parent process identifier : this is the spawning processs id 4. Real and effective user identifier 5. Code 6. Data space 7. Stack 8. Signal and umask 9. Priority Critical section problem Consider a system consisting of n processes. Each process has a segment of code, called a critical section, in which the process may be changing common variables, updating a table, writing a file, and so on. The execution of critical section by the processes is mutually exclusive in time. Basic requirements: 1.
b.
5.a.
b.
Mutual exclusion: If process pi is executing in its critical section, then no other processes can be executing in their critical sections. Progress: if no process is executing in its critical section and there exist some processes that wish to enter their critical sections, then only those processes that are not executing in their remainder section can participate in the decision of which will enter its critical section next, and this selection cannot be postponed indefinitely. Bounded waiting: There exist a bound on the number of times that other processes are allowed to enter their critical sections after a process has made a request to enter its critical section and before that request is granted.
7.