You are on page 1of 4

Khalil Saleh 2k21/SWE/52

Institute of Information & Communication Technology


University of Sindh, Jamshoro
BSIT part – III 2nd Semester Examination (Morning / Evening) Regular
ITEC-520 Operating System
December 08, 2017 Marks 60 Time: 2 hours

Note: Attempt any four questions. Question 6 is compulsory and carries 18 marks, while other questions carry 14 marks
each.

Q.No.1 (a) List down and discuss (1) events that can cause hardware interrupt and software interrupt and (2) actions taken by
operating system to serve an interrupt.
(b) When I/O operation is requested, how CPU interfaces with the I/O device to coordinate the transfer and how CPU
knows when the memory operations are complete?
(c) All modern operating systems are interrupt-driven; explain this statement through some examples.

Q.No.2 (a) Discuss (1) how provision of dual mode protects operating system from errant users and errant users from one
another and (2) how transition from user to kernel mode takes place?
(b) There are two ways of calling operating system routines: (1) System calls and (2) an API. What method would you
prefer and why? Also show API-System Call-OS relationship through an example.

Q.No.3: A number of design approaches to constructing operating systems have been proposed in the literature and most notable
ones are layered approach, modular kernel approach and microkernel approach. Answer the following as related to these
design approaches.
(a) In what ways is the modular kernel approach similar to the layered approach?
(b) In what ways does the modular kernel approach differ from the layered approach?
(c) What is the main advantage of the microkernel approach?
(d) How do user programs and system services interact in the microkernel architecture?
(e) What are the disadvantages of using the microkernel approach?

Q.No.4 (a) Show diagrammatically the actions that Operating System takes to perform context-switching between processes
(b) Draw a Process State Diagram and discuss events that cause the process to change its state from one to another
(c) Describe the differences among short-term, medium-term, and long-term scheduling.

Q.No.5 Following are the questions related to threads. Answer them all.
(a) Discuss any two examples in which a multithreaded application provides better performance than a single-threaded
application.
(b) Differentiate between user-level threads and kernel-level threads.
(c) Can a multithreaded solution using multiple user-level threads achieve better performance on a multiprocessor system
than on a single-processor system?
(d) What is the idea of thread pooling? Discuss, through examples, how thread pooling improves the performance of the
system.

Q.No.6 (a) Introduce, through few high-level examples, a critical section problem.
(b) Discuss what mutual exclusion is, and list down and discuss briefly Mutual Exclusion requirements?
(c) Explain why interrupts are not appropriate for implementing mutual exclusion in multiprocessor systems.
(d) Discuss, through examples, how Mutual Exclusion can be implemented using Special Machine Instructions: (1)
Compare & Swap Instruction and (2) Exchange Instruction. Also discuss serious disadvantages of use of special
machine instructions for implementing Mutual Exclusion.
(e) List down and briefly discuss various software based mechanisms commonly used in implementing Mutual
Exclusion
(f) Show, through pseudocode, implementation of mutual exclusion using semaphores.
Khalil Saleh 2k21/SWE/52

Institute of Information & Communication Technology


University of Sindh, Jamshoro
BSIT part – III 2nd Semester Examination (Morning / Evening) Regular
ITEC-520 Operating System
December 04, 2018 Marks 60 Time: 2 hours

Note: Attempt any four questions, all carry equal marks.

Q.No.1 (a) What are three general ways of passing parameters to operating system routines? Discuss each of these along with
their strengths and weaknesses.
(b) What is distinction between blocking and non-blocking with regard to message passing? For what kind of applications
is “Non-blocking send blocking receive” combination appropriate?
(c) In what ways does the modular kernel approach differ from the layered approach?

Q.No.2 (a) You have to develop a software system that has a number of tasks to perform, which can be implemented as separate
unit of executions either as threads or processes. Which approach will you take and why?
(b) Compare between process switching and thread switching?
(c) Draw a Process State Diagram and discuss events that cause the process to change its state from one to another
(d) When a process creates a child process, what resource options and execution options are possible?

Q.No.3 (a) Describe the differences among short-term, medium-term, and long-term scheduling.
(b) Discuss any two examples in which a multithreaded application provides better performance than a single-threaded
application.
(b) Differentiate between user-level threads and kernel-level threads.

Q.No.4 (a) List down and discuss some hypothetical example scenarios involving concurrent execution of multiple threads or
processes which may lead to critical section problem.
(b) List down and discuss briefly mutual exclusion requirements and illustrate diagrammatically the mutual exclusion
mechanism in abstract terms.
(c) List down and discuss two major drawbacks of interrupt-based implementation of mutual exclusion.

Q. No.5 (a) Demonstrate, through pseudo code, implementation of mutual exclusion using Special Machine Instructions: (1)
Compare &
Swap Instruction and (2) Exchange Instruction.
(b) Do hardware-based solutions (interrupts and special machine instructions) guarantee fulfillment of one of mutual
exclusion requirements: no deadlock and starvation? Justify your answer (whether yes or no) through examples.

Q.No.6 (a) List down and briefly discuss various software based mechanisms commonly used in implementing Mutual
Exclusion (e.g., semaphores, mutex, monitors)
(b) Show, through pseudocode, implementation of mutual exclusion using semaphores. What are your thoughts on if
the semaphore-based implementation of mutual exclusion guarantees fulfillment of “no deadlock and starvation”
mutual exclusion requirement?

The End
Khalil Saleh 2k21/SWE/52

Institute of Information & Communication Technology


University of Sindh, Jamshoro
BSIT part – III 2nd Semester Examination (Morning / Evening) Regular
ITEC-520 Operating System
December 09, 2019 Marks 60 Time: 2 hours

Note: Attempt any four questions, all carry equal marks.

Q.No.1 (a) Differentiate between hardware interrupt and software interrupt, and list down the events that can cause software
interrupt.
(b) How does the operating system serve the interrupt?
(c) Discuss why DMA is an efficient way of transmitting data between I/O and memory?

Q.No.2 (a) What method – System Calls or APIs - would you prefer to call OS routines and why?
(b) What three methods of passing parameters to OS have been proposed in the literature? Discuss weaknesses and
strengths of
each of three.

Q.No.3 Answer the following as related to three different approaches to constructing OS.
(a) What are the main disadvantages of monolithic approach to structuring operating systems?
(b) In what ways is the modular kernel approach similar to and different from the layered approach?
(c) What are the main advantages and disadvantages of the microkernel approach?

Q.No.4 (a) What information does Process Control Block (PCB) contain? What actions does Operating System take when it
performs context-switching between processes?
(b) Differentiate between short-term and long-term scheduling, and why it is so important that the latter should select a
good mix of I/O-bound and CPU-bound processes.
OR
(a) Differentiate between Message Passing and Shared memory model and discuss when will you prefer what model?
(b)What is distinction between blocking (synchronous) and non-blocking (asynchronous) message passing? For what
kind of applications is “non-blocking send blocking receive” combination appropriate?

Q.No.5 (a) Suppose the software system functionality involves a number of tasks which can be implemented as separate threads
or separate processes. Whether will you implement tasks as threads or as processes and why?
(b) Discuss, through high-level example scenarios, what is motivation behind developing applications as multithreaded
rather than single-threaded.

Q.No.6 (a) Differentiate between user threads and kernel threads. Java threads are created and managed by Java thread library
but why Java threads are said to be kernel threads.
(b) Can a multithreaded solution using multiple user-level threads achieve better performance on a multiprocessor
system than on a single processor system? Explain
OR
What is an idea of “Implicit Threading”? Discuss the following concepts as related to Implicit Threading
(a) Thread Pools (b) OpenMP (c) Grand Central Dispatch

The End
Khalil Saleh 2k21/SWE/52

Institute of Information & Communication Technology


University of Sindh, Jamshoro
BSIT part – III 2nd Semester Examination (Morning / Evening) Regular
ITEC-520 Operating System
February 17, 2021 Marks 60 Time: 2 hours

Note: Attempt any four questions and all questions carry equal marks..
Q.No.1 (a) Give examples of both software and hardware interrupts and discuss the role of an interrupt vector table and interrupt
handlers in serving of an interrupt by operating system
(b) Programmed I/O, Interrupt-driven I/O and Direct Memory Access (DMA) are three different techniques for I/O
operations. Discuss each one and compare among them.
(c) Give some reasons why caches are useful and what problems they cause? If a cache can be made as large as the
device for which it is caching (for instance, a cache as large as a disk), why not make it that large and eliminate the
device?

Q.No.2 (a) Using an API rather than direct system calls is a preferred method of calling OS routine; discuss why
(b) Through an example, show and discuss how the function call in the API is mapped into a corresponding system call
within an operating system
(c) Compare among three methods of passing parameters to the operating system routines: (1) Simplest in which
parameters are passed in registers, (2) Parameters stored in a block of memory and (3) Stack. Point out which of the
most widely used operating systems use what parameters passing method?

Q.No.3 (a) What is distinction between blocking and non-blocking with regard to message passing? For what kind of applications
is “Non-blocking send blocking receive” combination appropriate?
(b) How does the short-term scheduler (CPU scheduler) differ from the long-term scheduler (job scheduler)?
(c) What is context-switching? Also discuss the role of process control block (PCB) in context-switching between
processes performed by the operating system

Q.No.4 (a) What does it mean to say a process is heavy-weight, whereas a thread light-weight?
(b) Discuss any two programming examples for each of two scenarios: (1) in which multithreading does not provide better
performance than a single-thread solution and (2) in which multithreading provides better performance than a single-
threaded solution.
(c) As a developer, you have an option of implementing independent activities in an application either as processes or
as threads, Will you go with the former or the latter and why?

Q.No.5 (a) In what sense do user threads differ from kernel threads?
(b) Describe the actions taken by a thread library to context switch between user-level threads
(c) Discuss what thread pooling is? Take an example of a webserver with its three variants: (1) a single-threaded
webserver, (2) a multithreaded webserver that creates a thread at the time of serving the request and (3) a multithreaded
server with thread pooling, and compare among them with respect to performance and memory load.

Q.No.6 (a) Demonstrate conceptually, through examples, how concurrent execution of multiple processes (or threads) requiring
access to the shared resource lead to a critical section problem.
(b)Discuss what mutual exclusion is, and list down and discuss briefly Mutual Exclusion requirements?
(c) List down and briefly discuss hardware-based mechanisms commonly used to implement mutual exclusion
or
(a) List down and briefly discuss various software based mechanisms commonly used in implementing Mutual
Exclusion
(b) Show, through pseudocode, implementation of mutual exclusion using semaphores.

The End

You might also like