You are on page 1of 4

‫سید جامل الدین افغاين پوهنتون‬

‫محصــــــــــالنوچارو معاونیت‬
‫د ازموینو عمومې کمېټه‬
Lecturer Name: khalid Shinwari Faculty: Computer Science Department: IT & SE
Semester: 6th Subject Name: Operating System Paper Total Marks:80 Date: 1402/08/10 Time: 2 Hours

Part One: Concise descriptive questions, with each individual question being assigned a value of five (3) marks. Total Marks:15

Q1: What are real-time systems?


Real-time systems are used when rigid time requirements have been placed on the operation
of a processor. It has well-defined and fixed time constraints.

Q2: What is a virtual memory?


Virtual memory is a memory management technique for letting processes execute outside of
memory. This is very useful especially if an executing program cannot fit in the physical
memory.

Q3: What is a time-sharing system?


In a Time-sharing system, the CPU executes multiple jobs by switching among them, also
known as multitasking. This process happens so fast that users can interact with each program
while it is running.

Q4: What is a thread?


A thread is a basic unit of CPU utilization. In general, a thread is composed of a thread ID,
program counter, register set, and the stack.

Q5: Write some benefits of multithreaded programming.


 there is increased responsiveness to the user
 resource sharing within the process
 economy
 utilization of multiprocessing architecture

Part Two: Comprehensive descriptive queries, with each individual question being assigned a value of five (5) marks. Total Marks:25

Q1: Briefly explain FCFS.


FCFS stands for First-come, first-served. It is one type of scheduling algorithm. In this scheme,
the process that requests the CPU first is allocated the CPU first. Implementation is managed
by a FIFO queue.

Q2: What are the necessary conditions which can lead to a deadlock situation in a system?
Deadlock situations occur when four conditions occur simultaneously in a system: Mutual
exclusion; Hold and Wait; No preemption; and Circular wait.

‫د څانګې د آمر السلیک‬ ‫د ممتحن الس لیک‬


‫سید جامل الدین افغاين پوهنتون‬
‫محصــــــــــالنوچارو معاونیت‬
‫د ازموینو عمومې کمېټه‬
Q3: State the main difference between logical from physical address space.

Logical address refers to the address that is generated by the CPU. On the other hand,
physical address refers to the address that is seen by the memory unit.

Q4: What is the difference between a Job and a Process?


A process refers to a program under execution. This program may be an application or
system program.
Job means an application program and it is not a system program.

Q5: What are the advantages of Multiprocessing or Parallel Systems?


Multiprocessing operating systems or parallel systems support the use of more than one
processor in close communication.
The advantages of the multiprocessing system are:
 Increased Throughput
 Cost Saving
 Increased Reliability

Part Three: Multiple Choice questions, with each individual question being assigned a value of five (2) marks. Total marks:20

Q1: What is the main function of the command interpreter?


a) to provide the interface between the API and application program
b) to handle the files in the operating system
c) to get and execute the next user-specified command
d) none of the mentioned
Q2: If a process fails, most operating systems write the error information to a ______
a) new file b) another running process c) log file d) none of the mentioned
Q3: In a timeshare operating system, when the time slot assigned to a process is completed, the
process switches from the current state to?
a) Suspended state b) Terminated state c) Ready state d) Blocked state

Q4 Which one of the following errors will be handled by the operating system?
a) lack of paper in printer b) connection failure in the network
c) power failure d) all of the mentioned

Q5: In an operating system, each process has its own __________


a) open files b) pending alarms, signals, and signal handlers
c) address space and global variables d) all of the mentioned

Q7: When a process is in a “Blocked” state waiting for some I/O service. When the service is
completed, it goes to the __________
a) Terminated state b) Suspended state c) Running state d) Ready state

‫د څانګې د آمر السلیک‬ ‫د ممتحن الس لیک‬


‫سید جامل الدین افغاين پوهنتون‬
‫محصــــــــــالنوچارو معاونیت‬
‫د ازموینو عمومې کمېټه‬

Q6: CPU scheduling is the basis of ___________


a) multiprogramming operating systems b) larger memory-sized systems
c) multiprocessor systems d) none of the mentioned
Q8: The FCFS algorithm is particularly troublesome for ____________
a) time-sharing systems b) multiprocessor systems
c) operating systems d) multiprogramming systems
Q9 Swapping _______ be done when a process has pending I/O, or has to execute I/O operations
only into operating system buffers.
a) must never b) maybe c) can d) must
Q10: The operating system maintains a ______ table that keeps track of how many frames have
been allocated, how many are there, and how many are available.
a) frame b) mapping c) page d) memory

1. C 2. C 3. C 4. D 5. D
6. D 7. A 8. A 9. A 10 . A

Part Four: Midterm exam question, with each individual question being assigned a value of five (5) marks. Total mark:20

Q1: What is the basic function of paging?

Paging is a memory management scheme that permits the physical address space of a
process to be noncontiguous. It avoids the considerable problem of having to fit varied-sized
memory chunks onto the backing store.

Q2: What is fragmentation?

Fragmentation is memory wasted. It can be internal if we are dealing with systems that have
fixed-sized allocation units, or external if we are dealing with systems that have variable-sized
allocation units.

Q3: Write an example of a Process State.

– New State – means a process is being created


– Running – means instructions are being executed
– Waiting – means a process is waiting for certain conditions or events to occur
– Ready – means a process is waiting for an instruction from the main processor
– Terminate – means a process is stopped abruptly
‫د څانګې د آمر السلیک‬ ‫د ممتحن الس لیک‬
‫سید جامل الدین افغاين پوهنتون‬
‫محصــــــــــالنوچارو معاونیت‬
‫د ازموینو عمومې کمېټه‬
Q4: What are the advantages of multiprogramming?

The advantages of multiprogramming are −

 Increased CPU Utilization


 Increased Throughput
 Shorter Turnaround
 Improved Memory Utilization
 Increased Resources Utilization
 Multiple Users

Q5: What are the differences between paging and segmentation?


The following are the differences between paging and segmentation.
Sr.
Paging Segmentation
No.

1 A page is a physical unit of information. A segment is a logical unit of information.

A page is invisible to the user's


2 A segment is visible to the user's program.
program.

3 A page is of fixed size e.g. 4Kbytes. A segment is of varying size.

The page size is determined by the


4 Segment size is determined by the user.
machine architecture.

5 Fragmentation may occur. Segmentation eliminates fragmentation.

Page frames on main memory are


6 No frames are required.
required.

‫د څانګې د آمر السلیک‬ ‫د ممتحن الس لیک‬

You might also like