0% found this document useful (0 votes)
19 views1 page

Operating System Exam Paper - Winter 2022

Operating System W2022
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)
19 views1 page

Operating System Exam Paper - Winter 2022

Operating System W2022
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

Seat No.: ________ Enrolment No.

___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–IV(NEW) EXAMINATION – WINTER 2022
Subject Code:3140702 Date:13-12-2022
Subject Name:Operating System
Time:10:30 AM TO 01:00 PM Total Marks:70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.
MARKS
Q.1 (a) Differentiate multiprocessing and multiprogramming operating system. 03
(b) Write the functions of operating system. 04
(c) What is process? Explain process control block with all parameters. 07

Q.2 (a) Differentiate user level and kernel level thread. 03


(b) What is scheduling? Explain the types of schedulers. 04
(c) List out various criteria for good process scheduling algorithms. 07
Illustrate non-preemptive priority scheduling algorithm.
OR
(c) Differentiate process and thread. Explain process state diagram. 07

Q.3 (a) Define following terms: 03


(i)Critical section (ii) Mutual exclusion (iii) Bounded waiting
(b) Define deadlock. Describe deadlock prevention in detail. 04
(c) Illustrate Readers and Writers IPC problem with solution. 07
OR
Q.3 (a) Explain Resource allocation graph. 03
(b) What is deadlock? List the conditions that lead to deadlock. 04
(c) Explain the Banker’s algorithm for deadlock avoidance with an 07
example.

Q.4 (a) Explain segmentation. 03


(b) What is external fragmentation? Explain the solution to external 04
fragmentation.
(c) Explain paging hardware with TLB. 07
OR
Q.4 (a) Explain address binding. 03
(b) Explain following allocation algorithm 1) First Fit 2) Best Fit. 04
(c) What is page fault? Explain steps to handle page fault with diagram. 07

Q.5 (a) Discuss the major goals of I/O software. 03


(b) What is virtualization? Explain the benefits of virtualization. 04

(c) Draw the block diagram for DMA. Write steps for DMA data transfer. 07
OR
Q.5 (a) Differentiate block and character devices. 03
(b) Explain following Unix command: grep, sort, chmod, mkdir. 04
(c) Write short note on RAID levels. 07

*************
1

Common questions

Powered by AI

Mutual exclusion ensures that only one process can enter its critical section at a time, thereby preventing race conditions and ensuring data consistency among concurrent processes . However, implementing mutual exclusion presents challenges such as deadlock, where two or more processes wait indefinitely for resources, and starvation, where certain processes may never get access to the critical section if others continuously occupy it. Ensuring fair access and responsiveness, particularly in systems requiring high concurrency, involves sophisticated algorithms like semaphores and monitor locks, balancing trade-offs between simplicity and overhead.

User-level threads are managed by user-level libraries rather than the operating system kernel, allowing for fast context switching but lacking the ability to leverage multiple processors as efficiently as kernel-level threads. Kernel-level threads, managed directly by the operating system, allow for true parallel execution on multiprocessor systems, providing robust execution capabilities and improved responsiveness . The implications for system design include considerations of overhead, as user-level threads avoid kernel involvement, reducing overhead but at the risk of a blocking system call affecting all threads. Conversely, kernel-level threads provide better concurrency and resource management but at higher overhead due to system call involvement.

Segmentation divides the memory into variable-sized segments based on the logical divisions in a program, such as functions or data structures, allowing for a more intuitive organization according to program modules. Paging, in contrast, divides memory into fixed-size pages, simplifying allocation and avoiding external fragmentation but not providing logical partitioning . Challenges with segmentation include potential external fragmentation, as variable sizes make it difficult to fit segments into available memory holes, and the complexity in tracking segment sizes and locations. Unlike paging, it requires more sophisticated and resource-intensive management strategies.

A good process scheduling algorithm should ensure fairness, maximize CPU usage, minimize waiting and response times, and ensure prioritization without leading to starvation . The non-preemptive priority scheduling algorithm meets these criteria by organizing the process queue using priorities assigned to each process. The CPU selects and executes the process with the highest priority until completion, thus effectively managing CPU utilization and reducing process waiting time . However, non-preemptive nature may lead to potential starvation if lower-priority processes wait indefinitely, hence it also employs solutions like aging to elevate the priority of waiting processes over time.

The primary functions of an operating system include managing hardware resources, providing a user interface, executing and handling processes, managing files and storage, ensuring security and access control, and facilitating network operations . These functions contribute to efficient computer resource management by ensuring that hardware is utilized optimally, user commands are executed efficiently, processes are scheduled and executed without conflicts, files are stored and retrieved securely, data protection is enforced, and network resources are accessed and managed smoothly, enabling a stable and responsive computing environment.

A process in computing is an instance of a program in execution, which includes the program code and its current activity. A Process Control Block (PCB) is critical for managing a process's lifecycle; it stores all the information required for process management by the operating system. The PCB includes process state, process ID, program counter, CPU registers, memory management information, accounting information, and I/O status information . This comprehensive data allows the OS to suspend and resume processes efficiently, manage resources allocated to processes, and ensure processes execute without conflicts, thereby maintaining process integrity and system performance.

Multiprocessing operating systems utilize multiple CPUs to allow multiple processes to run simultaneously, enhancing performance as tasks can be processed in parallel. This strategy effectively manages resource allocation by balancing workloads across CPUs . On the other hand, multiprogramming allows multiple programs to reside in memory at the same time and uses a single CPU to execute them by switching rapidly between programs, primarily focusing on maximizing CPU utilization rather than improving throughput . While both aim to increase CPU utilization, multiprocessing achieves it by physically distributing tasks, whereas multiprogramming relies on time-sharing techniques, impacting response times and throughput in differing ways.

Deadlock prevention involves strategies that manipulate resource allocation to avoid the four necessary conditions of deadlock: mutual exclusion, hold and wait, no preemption, and circular wait. Techniques include resource allocation strategies like allowing exclusive access to resources only when absolutely necessary, ensuring processes request all resources before execution (a form of pessimistic resource management), and allowing resources to be forcibly retrieved from processes to enable more flexible management . By addressing resource allocation and process scheduling at the kernel and user levels, these techniques prevent deadlocks by ensuring that at least one of the conditions cannot hold.

A Page Fault occurs when a process accesses a page not currently in the main memory. The operating system handles a page fault by pausing the process, locating the data on disk, loading it into the main memory, updating the page table, and then resuming the process. To maintain system performance during page faults, strategies like prefetching, using fast secondary storage, and optimizing page replacement algorithms are implemented . Efficient handling ensures that the system remains responsive and reduces the performance impact typically caused by the time-consuming nature of disk accesses needed to resolve page faults.

Virtualization facilitates the creation of virtual instances of resources such as servers, storage, and networks, allowing for the efficient use of physical hardware. It provides benefits including improved resource allocation, as resources can be dynamically reallocated according to workload demands, increased scalability, reduced hardware costs through consolidation, and enhanced disaster recovery solutions. Security is also improved because each virtual instance operates in isolation, reducing the risk of cross-contamination and enabling secure, controlled testing environments . However, while virtualization enhances flexibility and resource efficiency, it also requires robust management to handle complexity and ensure security across virtual environments.

You might also like