JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA 2022 OPERATING SYSTEMS Previous Question Paper (March/April - 2022 - R17)
Answer any five questions. All questions carry equal marks.
Main
Explain in detail about multiprogrammed, time-shared and real time systems in details.
Answer
Operating systems are categorized based on their resource management strategies and responsiveness. Multiprogrammed, time-shared, and real-time systems represent distinct approaches to CPU utilization and process scheduling.
Multiprogrammed Systems: The primary objective of a multiprogrammed system is to maximize CPU utilization by organizing jobs so that the CPU always has one to execute. In a multiprogrammed environment, the operating system keeps several jobs in memory simultaneously. When one process waits for an I/O operation to complete, the operating system switches the CPU to another process, ensuring the processor does not remain idle. This increases system throughput but does not guarantee a specific response time for individual users.
Time-Shared Systems: Time-sharing (or multitasking) is a logical extension of multiprogramming where the CPU executes multiple jobs by switching among them frequently. The CPU switches so rapidly that each user can interact with their own program while it is running. The operating system uses CPU scheduling and multiprogramming to provide each user with a small portion of a time-shared computer. A key feature is the response time, which is typically kept under one second, allowing for interactive computing where multiple users can share the system resources concurrently.
Real-Time Systems: Real-time systems are used when rigid time requirements are placed on the operation of a processor or the flow of data. These systems are defined by their deterministic nature and are categorized into two types:
- Hard Real-Time Systems: These guarantee that critical tasks complete on time. Secondary storage and virtual memory are often limited or absent to ensure predictable execution, and missing a deadline results in total system failure.
- Soft Real-Time Systems: These provide a priority-based approach where critical real-time tasks are given preference over less important processes. While they strive to meet deadlines, missing a deadline is not catastrophic but results in degraded system performance.
Real-time systems are essential in embedded applications such as medical imaging, industrial control, and weapon systems, where the correctness of the system depends not only on the logical result of the computation but also on the time at which the result is produced.
Discuss about various process and file handling utilities.
Answer
Process and file handling utilities are essential command-line tools in Unix/Linux environments used for monitoring system performance, managing execution, and manipulating file data. These utilities allow administrators and users to interact directly with the kernel's process table and the file system.
Process Handling Utilities:
- ps: Displays a snapshot of currently running processes, providing information such as Process ID (PID), terminal (TTY), CPU usage, and command name.
- top: Provides a dynamic, real-time view of the system, showing CPU and memory utilization, and a list of processes sorted by resource consumption.
- kill: Used to send signals to processes, typically to terminate them. The command kill -9 [PID]forces an immediate termination.
- nice/renice: Used to influence the scheduling priority of a process, allowing users to adjust how much CPU time a process receives.
- jobs/fg/bg: Manage background and foreground tasks within a shell session, allowing users to switch process states.
File Handling Utilities:
- ls: Lists directory contents, including file metadata like permissions, owner, and size when used with flags like -l.
- cat/more/less: Utilities for viewing file contents; cat concatenates and displays files, while more and less allow for paginated reading.
- cp/mv/rm: Fundamental commands for copying, moving/renaming, and removing files or directories respectively.
- chmod/chown: Manage file security by changing access permissions and ownership attributes.
- grep: A powerful utility used to search for specific text patterns within files, essential for log analysis and data filtering.
- find: Searches for files within a directory hierarchy based on criteria such as name, size, or modification time.
Find out average waiting time for given data using SJF and round robin (time quantum: 2 units) scheduling algorithm:
| Process ID | Arrival time | Burst time |
|---|---|---|
| P01 | 0 | 5 |
| P02 | 2 | 3 |
| P03 | 4 | 2 |
| P04 | 5 | 6 |
| P05 | 6 | 4 |
Answer
Sign in to view the complete answer paper.
What is a deadlock? How can it be detected and recovered?
Answer
Sign in to view the complete answer paper.
How semaphores can be used for process synchronization?
Answer
Sign in to view the complete answer paper.
Explain IPC between processes on different systems using message queues and shared memory.
Answer
Sign in to view the complete answer paper.
Simulate page replacement algorithms on following reference strings: 1, 2, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 5
Answer
Sign in to view the complete answer paper.
Explain various file allocation and access methods.
Answer
Sign in to view the complete answer paper.