0% found this document useful (0 votes)
12 views2 pages

OS CS 2017 Solved

Past paper

Uploaded by

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

OS CS 2017 Solved

Past paper

Uploaded by

abdulraufit9020
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 2
University of Sargodha BS 5" Term Exam 2017 Subject: Computer Science Course: Operating System (CS:3621) ‘Time Allowed: 2:30 Hours Maximum Marks: 60 Objective Part Compulsory Q.No.1: Attempt all parts and each require answer 2 —3 line (12#2=24) i, What is system call to create child process? system call fork () is used to create processes. It takes no arguments and returns a process ID. The.purpose of fork () is to create a new process, which becomes the child processor of the caller. After a new child pfocess isicreated, both processes will execute the next instruction following the fork () system call Il, Process Control Block. Process Control Block (PCB, also called Task Controlling Block, Entry of the Process Table, Task Struct. or Switch frame) is a data structure in the operating system kernel containing the information nééded to manage the scheduling of a particular process. Race conditions. ‘A race condition is an undesirable situation that occurs when a devieBlor system attempts to\perform two or more operations at the same time, but because of the nature of the device or system, the operations must be done in the proper sequence to be done correctly. iv. Define Demand Paging. In virtual memory systems, demand) paging is a type of swapping in which pages of data are not copied from disk to RAM until they are needed, v. Busy Waiting. Busy-waiting, busy-looping oF spinning is atechnique in which a process repeatedly checks to see if a condition is true, such as whether keyboard input or a lock is available vi. Define file system. AAfile system typically manages operations, such as storage management, file naming, directories/folders, metadata, access rules and privileges. vii. User mode and Kernel mode In Kernel mode, the executing code has complete and unrestricted access to the underlying hardware. In User mode, the execuiting code has no ability to directly access hardware or reference memory. viii, List four conditions of deadlock. Deadlock occurs if the following four conditions take place simultaneously in a system: 1. Mutual exclusion 2. Hold and wait 3. No preemption 4. Circular wait ix, Text segment and data segment. The Text segment contains the executable program code and constant data. The text segment Is marked by the operating system as read-only and cannot be modified by the process. A data segment is a portion of virtual address space af a program, which contains the global variables and static variables that are initialized by the programmer Visit ‘Shahab. blogspot.com for more. x. What are various types of fragmentation? There are three different but related forms of fragmentation: external fragmentation, internal fragmentation, and data fragmentation, which can be present in isolation or conjunction. Define two phase locking. Two-phase locking (2PL) is a concurrency control method that guarantees serializability. It is also the name of the resulting set of database transaction schedules (histories). Mutual Exclusion. Mutual Exclusion is a process that prevents multiple threads or processes from accessing shared resources at the same time. The problem is coming from the fact that in both distributed systems and single system, several threads or processes share a resource but cannot use it concurrently. xiii, What is demand paging. In virtual memory systems, demand paging is a type of swapping in which pages of data are not copied from disk to RAM until they are needed. xiv. Context Switching. A context switch is a procedure that a computer's CPU (central processing unit) follows to change from one task (or process) to another while ensuring that the tasks do not conflict. Effective Context switehing is eriticalif2 computer is, to provide user-friendly multitasking, xv. Mention any four file attributes. Archive, hidden, read-only and system, xvi. Explain the terms: Waiting time, Turnaround time. Turnaround time is Time Difference between completion timeland arrival time. Turn-Around Time =Completion Time — Arrival Time. Waiting time is the time difference between turnaround time and burst time. Waiting time = Turn-around time — Burst time. Visit ‘Shahab. blogspot.com for more.

You might also like