0% found this document useful (0 votes)
25 views4 pages

CSE II Year Operating Systems VIVA Q&A

The document is a set of viva questions and answers for the Operating Systems Laboratory course at St. Joseph's College of Engineering & Technology for the academic year 2023-2024. It covers various topics including objectives of operating systems, advantages of peer-to-peer systems, differences between batch and time-sharing systems, and concepts of multiprogramming and real-time systems. Additionally, it discusses system calls, multiprocessor systems, and issues like priority inversion in real-time systems.

Uploaded by

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

CSE II Year Operating Systems VIVA Q&A

The document is a set of viva questions and answers for the Operating Systems Laboratory course at St. Joseph's College of Engineering & Technology for the academic year 2023-2024. It covers various topics including objectives of operating systems, advantages of peer-to-peer systems, differences between batch and time-sharing systems, and concepts of multiprogramming and real-time systems. Additionally, it discusses system calls, multiprocessor systems, and issues like priority inversion in real-time systems.

Uploaded by

akshara kutty
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

ST.

JOSEPH’S COLLEGE OF ENGINEERING & Format ACD-


TECHNOLOGY No. CF-QB
Elupatti, Thanjavur – 613 403 Issue No. 01
VIVA Question and Answer Rev. No. 00
Academic Year: 2023-2024 / EVEN Dept/Year&Sec/Semester: CSE/II&A/IV

Subject Code & Name: CS3461& Operating Systems Laboratory

1. What are the objectives of operating systems?


The requirements can be divided into two basic groups: User goals and System goals. Users desire that the
system should be convenient and easy to use, easy to learn, reliable, safe and fast. The Operating system should be
easy to design, implement, and maintain. Also it should be flexible, reliable, error free and efficient. These are some
of the requirements, which are vague and have no general solution.
2. What are the advantages of peer to peer systems over client-server systems?
Easy and simple to set up only requiring a hub or a switch to connect all computers together. You can access
any file on the computer as-long as it is set to a shared folder. If one computer fails to work all the other computers
connected to it still continue to work.
3. What is the purpose of system programs?
System programs can be thought of as bundles of useful system calls. They provide basic functionality to
users so that users do not need to write their own programs to solve common problems.
4. Compare and contrast DMA and Cache memory.
DMA is a hardware device that can move to/from memory without using CPU instructions. Cache stores
memory to somewhere closer to where you can access so you don't have to spend as much time for the I/O.
DMA provides this capability to carry out memory specific operations with minimal processor intervention. When
any I/O device needs a memory access. It sends a DMA request (in form of interrupt) to the processor. The
processor initiates the transfer by providing appropriate grant signals to the data bus. And passes the control to the
DMA controller which controls the rest of the data transfer and transfers the data directly to I/O device.
5. Write the difference between Batch Systems and Time Sharing systems.
Batch systems are quite appropriate for executing large jobs that need little interaction. The user can submit
jobs and return later for the results. It is not necessary to wait while the job is processed. Operators batched together
jobs with similar needs and ran them through the computer as a group. Time-sharing or multitasking is a logical
extension of multiprogramming. It allows many users to share the computer simultaneously.
6. Do timesharing differ from Multiprogramming? If so, How?
Time-sharing or multitasking is a logical extension of multiprogramming. It allows many users to share the
computer simultaneously. The CPU executes multiple jobs by switching among them, but the switches occur so
frequently that the users can interact with each program while it is running.
7. Why API’s need to be used rather than system calls?
An API is a generic term for a way to interface with an existing library / service etc... Whereas a system
call is about an application calling down the stack to the underlying resources and such, usually via a standard API in
its own right. System calls provide the interface between a process and the Operating system.
8. Can multiple user level threads achieve better performance on a multiprocessor system than a single
processor system? Justify your answer.
We assume that user-level threads are not known to the kernel. In that case, the answer is because the
scheduling is done at the process level. On the other hand, some OS allows user-level threads to be assigned to
different kernel level processes for the purposes of scheduling. In this case the multithreaded solution could be faster.
9. Mention the circumferences that would a user be better off using time-sharing system rather than a PC or
a single user work station?
A user is better off under three situations: when it is cheaper, faster, or easier. For example:
 When the user is paying for management costs and the costs are cheaper for a time-sharing system than for a
single-user computer.
 When running a simulation or calculating that takes too long to run on a single PC or workstation.
 When a user is travelling and doesn't have laptop to carry around, they can connect remotely to a time-shared
system and do their work.
10. What is meant by Mainframe Systems?
Mainframe systems are the first computers developed to tackle many commercial and scientific applications.
These systems are developed from the batch systems and then multiprogramming system and finally time sharing
systems

11. What is meant by Multiprogramming?


Several users simultaneously compete for system resources (i.e) the job currently waiting for I/O will yield
the CPU to another job which is ready to do calculations, if another job is waiting. Thus it increases CPU utilization
and system throughput.
12. What are the advantages of Multiprogramming?
 Increased System Throughput
 Increased CPU utilization
13. What are Operating Services?
Normally, an operating system provides certain services to programs and to the users of those programs.
Some of them are: Program Execution. I/O operations File-system manipulation Communications Error Detection
14. What is System Programs?
System programs provide a convenient environment for program development and execution. Some of these
programs are user interfaces to system calls and others are more complex. Some of them are: File Management
Status Information File modification Programming Language support Program loading, execution and
communication.
15. What is meant by System Calls?
The System Calls acts as a interface to a running program and the Operating system. These system calls available in
assembly language instructions.
16. What is meant by Batch Systems?
In this, operators batched together jobs with similar needs and ran through the computer as a group .The operators
would sort programs into batches with similar requirements and as system become available, it would run each batch.
17. What are Multiprocessor System?
Multiprocessor systems have systems more than one processor for communication, sharing the computer bus, the
memory, clock & peripheral devices
18. What are the Components of a Computer System?
Application Programs System
Program Operating System
Computer Hardware
19. What are the advantages of multiprocessors??
Increased throughput
Economy of scale
Increased reliability
20. What is meant by Real time system?
Real time systems are systems that have their iND-built characteristics as supplying immediate response. In
real time system, each process is assigned a certain level of priority according to the relative importance of the
events to be processed

21. What is meant by Multiprogramming?


Several users simultaneously compete for system resources (i.e) the job currently waiting for I/O will yield
the CPU to another job which is ready to do calculations, if another job is waiting. Thus it increases CPU utilization
and system throughput.
22. What are the advantages of Multiprogramming?
 Increased System Throughput
 Increased CPU utilization
23. What are Operating Services?
Normally, an operating system provides certain services to programs and to the users of those programs.
Some of them are: Program Execution. I/O operations File-system manipulation Communications Error Detection

24. What is System Programs?


System programs provide a convenient environment for program development and execution. Some of these
programs are user interfaces to system calls and others are more complex. Some of them are: File Management
Status Information File modification Programming Language support Program loading, execution and
communication.

25. What is meant by Multiprogramming?


Several users simultaneously compete for system resources (i.e) the job currently waiting for I/O will yield
the CPU to another job which is ready to do calculations, if another job is waiting. Thus it increases CPU utilization
and system throughput.
26. What are the advantages of Multiprogramming?
 Increased System Throughput
 Increased CPU utilization
27. What are Operating Services?
Normally, an operating system provides certain services to programs and to the users of those programs.
Some of them are: Program Execution. I/O operations File-system manipulation Communications Error Detection
28. What is System Programs?
System programs provide a convenient environment for program development and execution. Some of these
programs are user interfaces to system calls and others are more complex. Some of them are: File Management
Status Information File modification Programming Language support Program loading, execution and
communication.
29. What is meant by System Calls?
The System Calls acts as a interface to a running program and the Operating system. These system calls available in
assembly language instructions.
30. What is meant by Batch Systems?
In this, operators batched together jobs with similar needs and ran through the computer as a group .The operators
would sort programs into batches with similar requirements and as system become available, it would run each batch.
31. What are Multiprocessor System?
Multiprocessor systems have systems more than one processor for communication, sharing the computer bus, the
memory, clock & peripheral devices
32. What are the Components of a Computer System?
Application Programs System
Program Operating System
Computer Hardware
33. What are the advantages of multiprocessors??
Increased throughput
Economy of scale
Increased reliability
34. What is meant by Real time system?
Real time systems are systems that have their iND-built characteristics as supplying immediate response. In
real time system, each process is assigned a certain level of priority according to the relative importance of the
events to be processed

35. “Priority inversion is a condition that occurs in real time systems where a low priority process is starved
because higher priority processes have gained hold of the CPU”- Comment on this statement.
Priority inversion is a problem that occurs in concurrent processes when low-priority threads hold shared
resources required by some high-priority threads, causing the high priority-threads to block indefinitely. This
problem is enlarged when the concurrent processes are in a real time system where high- priority threads must be
served on time.

36. Differentiate single threaded and multi threaded processes.


A thread is a simple flow of instruction. An application can be single threaded (so imagine it as a single line
going from the entry point of the application to its end) or multi-threaded (imagine a tree: the whole app starts from
1 point, than it branches out more and more)

Common questions

Powered by AI

System programs act as intermediaries, providing essential services and simplifying interactions with the operating system. They bundle together system calls to offer higher-level functionalities like file management, program execution, and I/O operations, thereby sparing users from writing complex programs for common tasks. These programs enhance usability and ease interaction between users and the system, supporting development environments via development tools and interfaces that abstract low-level operations, thereby increasing efficiency and reducing the likelihood of user errors .

Multiprogramming enhances CPU utilization by allowing multiple processes to be loaded into memory and managed by the operating system simultaneously. When one process requires I/O and is waiting, the CPU can switch to another process. This way, the CPU is kept busy rather than idling, leading to increased system throughput and efficiency. This concurrent approach maximizes CPU usage as opposed to non-multiprogramming systems where the CPU could remain idle during I/O operations, thereby reducing its overall effectiveness .

Priority inversion in real-time systems can significantly degrade performance by allowing high-priority tasks to be blocked by lower-priority ones holding needed resources. This creates delays that can render the system unable to meet real-time deadlines. The problem is exacerbated when multiple high-priority tasks are queued behind the blocked high-priority task, potentially leading to catastrophic system failures in time-sensitive applications like medical or automotive systems. Effective priority inheritance mechanisms are necessary to mitigate these risks by temporarily elevating the priority of the blocking task to minimize disruption .

A real-time system ensures immediate response by employing a priority-based scheduling mechanism where processes are assigned priority levels according to the urgency of handling their events. The system guarantees that high-priority processes preempt lower-priority ones to minimize latency. Risks arise if the system is poorly implemented, such as improperly managing priorities causing priority inversion, missed deadlines, and system instability. In critical applications, this can lead to catastrophic failures, underscoring the importance of rigorous system design and testing for ensuring reliability .

Designing an operating system to be both user-friendly and efficient entails balancing often conflicting goals. User goals emphasize convenience, safety, and performance, requiring the operating system to be intuitive, reliable, and fast. On the other hand, system goals focus on the technical side: ease of design, implementation, and maintenance, along with flexibility and error-free functionality. These requirements can conflict; for example, increasing user convenience might involve adding processes that could reduce system efficiency. Additionally, achieving flexibility and robust error handling could complicate the design and implementation. Therefore, designers must judiciously prioritize aspects of user experience without significantly sacrificing system performance or maintainability .

Single-threaded models execute as a single sequence of instructions, suitable for simpler tasks. Multi-threaded models allow multiple threads of execution within a single process, exploiting concurrency to improve efficiency and responsiveness in handling multiple tasks, like I/O operations and computation, simultaneously. Multi-threaded processes can significantly enhance application performance in multicore environments by parallelizing tasks. However, they introduce complexity in managing shared resources, requiring robust synchronization mechanisms to avoid race conditions and deadlocks .

Using an API over direct system calls presents the trade-off between abstraction and control. APIs offer a more user-friendly interface, hiding the complex, low-level details of system interactions and providing a standardized access method, which increases ease of development and code portability. However, this abstraction can also limit access to specific system functionalities that system calls directly offer. System calls provide fine-grained control and direct access to system resources, but require detailed knowledge of system internals, potentially increasing complexity and decreasing portability across different systems .

A time-sharing system would be advantageous in scenarios where cost, resource-intensive computations, or accessibility are critical. This could occur when management costs are lower with a time-sharing system compared to maintaining individual personal computers. Such systems are also beneficial when running large simulations or calculations that a single PC cannot handle efficiently. Additionally, while traveling, users can connect remotely to a time-sharing system to access and perform their work without needing a personal computer. These factors make time-sharing systems appealing for businesses seeking cost efficiency or users needing powerful computation and remote access capabilities .

Peer-to-peer systems are simpler to set up as they typically require only a hub or switch to connect nodes, unlike client-server setups, which require dedicated server configuration. This simplicity allows any computer within the network to act as a server, distributing responsibilities among users, enhancing tolerance to single-node failures. If a node fails, others can continue functioning independently. This decentralized nature increases resilience compared to single point-of-failure client-server models, although it can complicate coordination and resource allocation across nodes .

Multiprocessor systems enhance throughput by performing multiple operations concurrently, thus improving processing efficiency and speed. They achieve economy of scale, as adding processors can be more cost-effective than expanding a single CPU system. Reliability increases since failure in one processor doesn't halt the entire system, providing redundancy. However, these systems can face complexities in maintaining cache coherence, synchronizing processes, and dealing with increased power consumption. Design and implementation complexity can also increase costs, potentially affecting the intended economic advantages .

You might also like