0% found this document useful (0 votes)
141 views9 pages

OS Sheet (3)

This document appears to be part of an exam for an operating systems course. It contains multiple choice and short answer questions testing student knowledge of key operating systems concepts. Some of the topics covered include: process states, scheduling strategies, synchronization techniques like semaphores, conditions for deadlock, and methods for avoiding deadlock.

Uploaded by

alcinialbob1234
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
141 views9 pages

OS Sheet (3)

This document appears to be part of an exam for an operating systems course. It contains multiple choice and short answer questions testing student knowledge of key operating systems concepts. Some of the topics covered include: process states, scheduling strategies, synchronization techniques like semaphores, conditions for deadlock, and methods for avoiding deadlock.

Uploaded by

alcinialbob1234
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Helwan University First Term, Academic Year 2022/2023

Faculty of since M 317 - Operating System

Math. Department Sheet 2


St. Name:

First: Choose the correct answer (1 mark)


1. .............. refers to a situation in which a process is ready to execute but is
continuously denied access to a processor in deference to other processes.
A) Synchronization B) Mutual Exclusion
C) Dead lock D) Starvation

2. Which of the following is not the approach to dealing with deadlock?


A) Prevention B) Avoidance
C) Detection D) Deletion

3. Which of the following are the states of a five state process model?
i) Running ii) Ready iii) New iv) Exit v) Destroy
A) i, ii, iii and v only B) i, ii, iv and v only
C) i, ii, iii, and iv only D) All i, ii, iii, iv and v

4. State which statement is true for Suspended process?


i) The process is not immediately available for execution.
ii) The process may be removed from suspended state automatically without
removal order.
A) i only B) ii only

1
C) i and ii only D) None
5. The different types of tables maintained by the operating system are ---
A) memory, logical , I/O file B) memory, I/O, file, physical
C) memory, I/O, file, process D) memory, logical, I/O, physical

6. The simplest way of deadlock is to ...

A) preempt a resource B) rollback


C) kill one of the processes D) lock one of the processes

7. Throughput of a system is

A) Number of programs processed by it per unit time


B) Number of times the program is invoked by the system
C) Number of requests made to a program by the system
D) None of the above

8. Round robin scheduling is essentially the preemptive version of .........

A) first in first out


B) shortest job first
C) shortest remaining
D) longest time first

9. Which of the following describes the ability of an OS to support multiple,


concurrent paths of execution within a single process?

A) Multithreading B) Multiprocessing
C) Multitasking D) Multiprogramming

10. A thread is a .................... precess.

2
A) heavy weight B) multiprocess
C) inter thread D) light weight

11. Timer is used to prevent a single

A. Job B. Time

C. Computer D.Information

12. Interrupts make an operating system more

A. Rigid B. Expensive

C. Control D.Flexible

13. Main function of shared memory is:


A. to use primary memory efficently
B. to do intra process communication
C. to do inter process communication
D. none of above

13. Disk scheduling includes deciding


A. which should be accessed next
B. order in which disk access requests must be serviced
C. the physical location of the file
D. the logical location of the file

14. Which scheduling policy is best suited for time-sharing operating systems
A. Shortest job first
B. Round robin
C. First come first serve
D. Elevator

3
15. In operating system, each process has its own
a) address space and global variables
b) open files
c) pending alarms, signals and signal handlers
d) all of the mentioned

16. A process can be terminated due to


a) normal exit b) fatal error
c) killed by another process d) all of the mentioned

17. What is the ready state of a process?


a) when process is scheduled to run after some execution
b) when process is unable to run until some task has been completed
c) when process is using the CPU
d) none of the mentioned

18. What is inter process communication?


a) communication within the process
b) communication between two process
c) communication between two threads of same process
d) none of the mentioned

19. A set of processes is deadlock if


a) each process is blocked and will remain so forever
b) each process is terminated
c) all processes are trying to kill each other
d) none of the mentioned

20. A Process Control Block(PCB) does not contain ----


a) Code b) Stack
c) Bootstrap program d) Data

21. The number of processes completed per unit time is known as ______

4
a) Output b) Throughput
c) Efficiency d) Capacity

22. The state of a process is defined by:


a) the final activity of the process
b) the activity just executed by the process
c) the activity to next be executed by the process
d) the current activity of the process

23. Which of the following is not the state of a process?


a) New b) Old
c) Waiting d) Running

24. The Process Control Block is:


a) Process type variable b) Data Structure
c) A secondary storage section d) A Block in memory

25. A single thread of control allows the process to perform:


a) only one task at a time
b) multiple tasks at a time
c) only two tasks at a time
c) all of the mentioned

26. The objective of multi-programming is to :


a) Have some process running at all times
b) Have multiple programs waiting in a queue ready to run
c) To minimize CPU utilization
d) None of the mentioned

27. When the process issues an I/O request :


a) It is placed in an I/O queue
b) It is placed in a waiting queue
c) It is placed in the ready queue

5
d) It is placed in the Job queue

28. When a process terminates :


a) It is removed from all queues
b) It is removed from all, but the job queue
c) Its process control block is de-allocated
d) Its process control block is never de-allocated

29. In a time-sharing operating system, when the time slot given to a process is
completed, the process goes from the running state to the :
a) Blocked state b) Ready state
c) Suspended state d) Terminated state

30. When several processes access the same data concurrently and the outcome of
the execution depends on the particular order in which the access takes place, is
called
a) dynamic condition b) race condition
c) essential condition d) critical condition

31. If a process is executing in its critical section, then no other processes can be
executing in their critical section. This condition is called
a) mutual exclusion b) critical exclusion
c) synchronous exclusion d) asynchronous exclusion

32. Which one of the following is a synchronization tool?


a) thread b) pipe
c) semaphore d) socket

33. A semaphore is a shared integer variable


a) that can not drop below zero
b) that can not be more than zero
c) that can not drop below one

6
d) that can not be more than one

34. Mutual exclusion can be provided by the


a) mutex locks
b) binary semaphores
c) both mutex locks and binary semaphores
d) none of the mentioned

35. Process synchronization can be done on


a) hardware level
b) software level
c) both hardware and software level
d) none of the mentioned

36. A monitor is a module that encapsulates


a) shared data structures
b) procedures that operate on shared data structure
c) synchronization between concurrent procedure invocation
d) all of the mentioned

37. Inter process communication :


a) allows processes to communicate and synchronize their actions when using the
same address space
b) allows processes to communicate and synchronize their actions without using
the same address space
c) allows the processes to only synchronize their actions without communication
d) none of the mentioned

38. Scheduling of threads are done by

A. input
B. output
C. operating system
D. memory
7
39. Process synchronization of programs is done by

A. input
B. output
C. operating system
D. memory

Answer C

40. A process needs

A. through put to execute


B. timer to execute
C. resources to execute
D. both a and b

41. An executed program of computer system is called?

A. Trap B. process

C. Program D. interrupt

42. A single threaded process of operating system programs has

A. One program counter


B. Two program counters
C. Three program counters
D. Four program counters

8
Second: Answer the following (2 mark)
1. What is the difference between a program and a process?

2. What is the purpose of the process table?

3. Explain the three states of a process.

4. What is a time quantum?

5. Which scheduling strategies are preemptive and which are not?

6. What is synchronization?

7. Explain the following terms: critical resource, critical section, mutual


exclusion.

8. What are two ways that semaphores can be implemented?

9. Why must a machine have a test-and-set instruction in order to implement


semaphores?

10. What are turnaround time and response time?


11. What is deadlock?

12. What three conditions must exist in order for deadlock to occur?

13. How might an operating system attack the third condition necessary for
deadlock in order to solve the problem of deadlock?

14. How might an operating system attack the second condition necessary for
deadlock in order to solve the problem of deadlock?

You might also like