0% found this document useful (0 votes)
59 views24 pages

2 Marks Os R23

Uploaded by

Sandhya
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)
59 views24 pages

2 Marks Os R23

Uploaded by

Sandhya
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
You are on page 1/ 24

డాక్ టర్.

కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

OPERATING SYSTEMS
Two Marks Questions with Answers
Q.1 Define operating systems.
Ans.: An operating system is a program that manages the computer hardware.
Q.2 What are the goals of OS?
Ans.:Operating system goals :
a. Execute user programs and make solving user problems easier.
b. Make the computer system convenient to use.
Q.3 List down the functions of operating systems.
Ans. : Functions of operating systems are convenience, efficiency and ability to evolve.
Q.4 What are the objective of operating systems?
Ans.: The objective of operating systems is efficient use, user convenience, ability to
evolve.
Q.5 How does an interrupt differ from trap?
Ans.: Trap is a software-generated interrupt caused either by an error or by a specific
request from a user program that an operating-system service be performed. A trap usually
results in a switch to kernel mode. Interrupt signals can cause a program to suspend itself
temporarily to service the interrupt. An interrupt is a hardware-generated signal that
changes the flow within the system.
Q.6 What are the three main purposes of an operating system?
Ans.:• To provide an environment for a computer user to execute programs on computer
hardware in a convenient and efficient manner.
• To allocate the separate resources of the computer as needed to solve the problem given.
The allocation process should be as fair and efficient as possible.
• As a control program it serves two major functions: 1) Supervision of the execution of
user programs to prevent errors and improper use of the computer and 2) Management of
the operation and control of I/O devices.
Q.7 Explain what is batch processing.
Ans. : Here jobs with similar requirements are batched together and run through the
computer as a group. Thus a batch operating system reads a stream of separate jobs, each
with its own control cards that predefine what the job does, feed the batches one after
another and send the output of each job to the appropriate destination.
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

Q.8 What is spooling?


Ans. : The use of secondary memory as buffer storage to reduce processing delays when
transferring data between peripheral equipment and the processors of a computer.
Q.9 Define the degree of multiprogramming.
Ans. : Degree of multiprogramming is the number of processes in the memory.
Q.10 What is the main advantage of multiprogramming ?
Ans. : Multiprogramming makes efficient use of the CPU by overlapping the demands for
the CPU and its I/O devices from various users. It attempts to increase CPU utilization by
always having something for the CPU to execute.
Q.11 What do you mean by multiprogramming?
Ans. : Multiprogramming increases CPU utilization by organizing jobs so that the CPU
always has one to execute.
Q.12 List the disadvantages of multiprogrammed batched systems.
Ans: Disadvantages
1. Users cannot interact with their jobs, while executing.
2. A programmer cannot modify a program as it executes to study its behavior
Q.13. Do time sharing differs from multiprogramming? If so, how?
Ans: Time sharing is the sharing of resources among several processes at the same time.
Multiprogramming is the allocation of more than one process on a computer system and its
resources. Time sharing minimizes the response time and multiprogramming maximizes
the processor use. Time sharing systems use the concept of multiprogramming to share the
CPU time between multiple users at the same time.
Q.14 Write the difference between batch system and time sharing systems.
Ans: A batch system executes jobs, whereas a time-shared system has user programs, or
tasks.
• Batch systems are inconvenient for users because users cannot interact with their jobs to
fix problems. User interacts with system in time sharing system.
Q.15 Describe the differences between symmetric and asymmetric multiprocessing.
Ans: Symmetric multiprocessing treats all processors as equals and I/O can be processed
on any CPU. Asymmetric multiprocessing has one master CPU and the remainder CPUs
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

are slaves. The master distributes tasks among the slaves and I/O is usually done by the
master only.

Q.16 What is difference between networked O.S. and distributed O.S. ?


Ans. : Difference between networked O.S. and distributed O.S. is an follows:

Q.17 Mention the advantages in the design of distributed operating systems.


Ans.:Advantages are as follows:
1. Resource sharing 2. Higher reliability 3. Better price performance ratio
4. Shorter response times and higher throughput.
Q.18 What are the advantages of peer-to-peer systems over client server systems?
Ans.: Peer-to-peer system is more reliable as central dependency is eliminated. All the
resources and contents are shared by all the peers, unlike server-client architecture where
server shares all the contents and resources.
Q.19 Define real time system.
Ans. : Real time system is one that must react to inputs and responds to them quickly. A
real time system has well defined, fixed time constraints.
Q.20 What is meant by "hard real systems and soft real systems"?
Ans. Hard real systems guarantee that critical tasks complete on time. In soft real system a
critical task get priority over other tasks and remains that priority until it completes.
Q.21 What are the main advantages of layered approach ?
Ans.: a. Each layer is implemented using those operations provided by lower-level layers.
b. A layer does not need to know how the low-level operations are implemented; it needs
to know what these operations o.
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

c. Each layer hides the existence of data structures, operations and hardware from higher-
level layer.
Q.22 Mention the purpose of system calls.
Ans.: System calls allow user-level processes to request services of the operating system.
Q.23 What is the purpose of system programs ?
Ans.:System program that provides an application programming environment on top of
the hardware.
Q.24 What are the five major categories of system calls ?
Ans.: Five main categories of system calls are File management, IPC, process
management, I/O devices management, information management.
Q.25 What is the function of system programs? Write the name of the categories in
which the system programs can be divided.
Ans.: programs provide a convenient environment for program development and
execution. System programs are divided into these categories: File management, status
management, file modification, programming language support, program loading and
execution, communications.
Q.26 What is meant by a system call ?
Ans. : System calls provide the interface between a process and the OS.
Q.27 What is dual mode operation and what is the need of it?
Ans.:• Two modes are provided by the hardware - user and kernel mode. Mode bit is
added to computer hardware to indicate the current mode. The OS is loaded and then user
process is started in user mode. When an interrupt occurs, hardware switches to kernel
mode.
• In order to ensure the proper execution of the OS, user must be able to distinguish
between the execution of OS code and user defined code.
Q.28 List out some system calls required to control the communication system.
Ans.: System calls for communication system: Open connection and close connection,
read message and write message, get hosted and get processed.

Q.29 History of the Operating System


It took years to evolve the Operating Systems and make them as modernised and advanced
as they are today. Given below are the details about the evolution and history of Operating
systems.
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

 Initially, the computers made did not have an Operating system and to run each
program a different code was used. This had made the processing of data more
complex and time taking
 In 1956, the first operating systems were developed by General Motors to run a
single IBM computer
 It was in the 1960s that IBM had started installing OS in the devices they launched
 The first version of the UNIX operating system was launched in the 1960s and was
written in the programming language C
 Later on, Microsoft came up with their OS on the request of IBM
 Today, all major computer devices have an operating system, each performing the
same functions but with slightly different features

Q.30. Types of Operating System


Given below are the different types of Operating System along with brief information
about each of them:

1. Batch Operating System

 There is no direct communication between the computer and the OS


 There is an intermediate, the Operator, which needs to distribute the work into
batches and sort similar jobs
 Multiple users can use it
 Can easily manager a large amount of work
2. Real-Time Operating System

 It has a data processing system


 The processing time is very small between the user’s command and the output
 Used in fields where the response needs to be quick and rapid
3. Time-Sharing Operating System

 Multiple people at various terminals can use a program at the same time
 The main motive is to minimize the response time
4. Distributed Operating System

 When two or more systems are connected to each other and one can open files
which are not present in their system but in other devices connected in the network
 Its usage has now increased over the years
 They use multiple central processors to serve real-time applications
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

 Failure of one system does not affect the other systems connected in the network
5. Embedded Operating System

 These special Operating systems are built into larger systems


 They generally are limited to single specific functions like an ATM
6. Network Operating System

 They have one main server which is connected to other client servers
 All the management of files, processing of data, access to sharing files, etc. are
performed over this small network
 It is also a secure operating system for working with multiple users
7. Mobile Operating System

 With the advancement in the field of technology, smartphones now are released
with an Operating system.
 They are designed in a manner that they can help a small device work efficiently
Q31 Define process. What is the information maintained in a PCB ?
Ans. A process is simply a program in execution. i.e. an instance of a program. execution.
PCB maintains pointer, state, process number, CPU register, PC, memory allocation etc.
Q.32 Define task control block.
Ans. TCB is also called PCB.
Q.33 What is PCB? Specify the information maintained in it.
Ans. Each process is represented in the operating system by a process control block. PCB
contains information like process state, program counter, CPU register, accounting
information etc.
Q.34 What is independent process ?
Ans. Independent process cannot affect or be affected by the execution of another process.
Q.35 Name and draw five different process states with proper definition.
Ans. Process states are new, running, waiting, ready and terminated. Fig. 2.16.1 shows
process State diagram
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

Q.36 Define context switching.


Ans. Switching the CPU to another process requires saving the state of the old process and
loading the saved state for the new process. This task is known as context switch.
Q.37 What are the reasons for terminating execution of child process ?
Ans. Parent may terminate execution of children processes via abort system call for a
variety of reasons, such as:
1.Child has exceeded allocated resources.
2. Task assigned to child is no longer required.
3. Parent is exiting and the operating system does not allow a child to continue if its parent
terminates.
Q.38 What is ready queue ?
Ans. The processes that are residing in main memory and are ready and waiting to execute
are kept on a list called the ready queue.
Q.39 List out the data fields associated with process control blocks.
Ans. Data fields associated with process control block is CPU registers, PC, process state,
memory management information, input-output status information etc.
Q.40 What are the properties of communication link ?
Ans. Properties of communication link
1. Links are established automatically.
2. A link is associated with exactly one pair of communicating processes.
3. Between each pair there exists exactly one link.
4. The link may be unidirectional, but is usually bidirectional.
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

Q.41 What is non-preemptive scheduling ?


Ans.Non-preemptive scheduling ensures that a process relinquishes control of the CPU
only when it finishes with its current CPU burst.
Q.42 Differentiate preemptive and non-preemptive scheduling.
Ans. :

Q.43 What do you mean by short term scheduler ?


Ans. Short term scheduler, also known as a dispatcher executes most frequently, and
makes the finest-grained decision of which process should execute next. This scheduler is
invoked whenever an event occurs.
Q.44 Which are the criteria used for CPU scheduling ?
Ans.Criteria used for CPU scheduling are CPU utilization, throughput, turnaround time,
waiting time, response time.
Q.45 Why is it important for the scheduler to distinguish I/O-bound programs from
CPU-bound programs?
Ans. I/O-bound programs have the property of performing only a small amount of
computation before performing IO. Such programs typically do not use up their entire
CPU quantum. CPU-bound programs, on the other hand, use their entire quantum without
performing any blocking IO operations. Consequently, one could make better use of the
computer's resources by giving higher priority to I/O-bound programs and allow them to
execute ahead of the CPU-bound programs.
Q.46 What is response time?
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

Ans. Response time is the amount of time it takes from when a request was, submitted
until the first response is produced, not output.
Q.47 Define waiting time.
Ans. Amount of time a process has been waiting in the ready queue.
Q.48 Define scheduling algorithm?
Ans. In multiprogramming systems, whenever two simultaneously in the ready state, a
choice has to be made which process to run next. The part of the OS that makes the choice
is called the scheduler and the algorithm it uses is called the scheduling algorithm.
Q.49 Define the term dispatch latency.
Time it takes for the dispatcher to stop one process and start another running.
Q.50 What is preemptive priority method?
Ans. A preemptive priority will preempt the CPU if the newly arrived process is higher
than the priority of the currently running process.
Q.51 What is medium term scheduling ?
Ans. Medium-term scheduling used especially with time-sharing systems as an
intermediate scheduling level. A swapping scheme is implemented to remove partially run
programs from memory and reinstate them later to continue where they left off.
Q.52 What is preemptive scheduling ?
Ans. Preemptive scheduling can preempt a process which is utilizing the CPU in between
its execution and give the CPU to another process.
Q.53 What is the difference between long-term scheduling and short-term scheduling
?
Ans. Long term scheduling adds jobs to the ready queue from the job queue. Short term
scheduling dispatches jobs from the ready queue to the running state.
Q.54 List out any four scheduling criteria.
Ans. Response time, throughput, waiting time and turn around time.
Q.55 Define the term 'Dispatch latency'.
Ans. Dispatch latency: Time it takes for the dispatcher to stop one process and start
another running. It is the amount of time required for the scheduler to stop one process and
start another.
Q.56 Distinguish between CPU-bounded and I/O bounded processes.
Ans.
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

Q.57 What is Shortest-Remaining-Time-First (SRTF) ?


Ans. If a new process arrives with CPU burst length less than remaining time of
process, current executing preempt. This scheme is known as the
Shortest-Remaining-Time-First.
Q.58 What is round robin CPU scheduling ?
Ans. Each process gets a small unit of CPU time (time quantum). After this time has
elapsed, the process is preempted and added to the end of the ready queue.
Q.59 What is meant by starvation in operating system?
Ans. Starvation is a resource management problem where a process does not get the
resources (CPU) it needs for a long time because the resources are being allocated to other
processes.
Q.60 What is an aging?
Ans. Aging is a technique to avoid starvation in a scheduling system. It works by adding
an aging factor to the priority of each request. The aging factor must increase the requests
priority as time passes and must ensure that a request will eventually be the highest
priority request
Q.61"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. Ans. A low priority thread always starts on a
shadow version of the shared resource, the original resource remains unchanged. When a
high-priority thread needs a resource engaged by a low -priority thread, the low priority
thread is preempted, the original resource is restored and the high priority thread is
allowed to use the original
Q.63 Define a thread. State the major advantage of threads.
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

Ans. A thread is a flow of execution through the process's code with its own program
counter, system registers and stack.
2. Efficient communication.
Advantages: 1. Minimize context switching time.
Q.64 What are the differences between user-level threads and kernel-level threads ?
(Refer section 2.8.3)

Q.65 What are the benefits of multithreads?


Ans. Benefits of multithreading is responsiveness, resource sharing, economy and
utilization of multiprocessor architecture.
Q.66 Why a thread is called as light weight process ?
Ans. Thread is light weight taking lesser resources than a process. It is called light weight
process to emphasize the fact that a thread is like a process but is more efficient and uses
fewer resources and they also share the address space.
Q.68 What is a thread pool ?
Ans. A thread pool is a collection of worker threads that efficiently execute asynchronous
callbacks on behalf of the application. The thread pool is primarily used to reduce the
number of application threads and provide management of the worker threads.
Q.69 What is Pthread ?
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

Ans. Pthreads refers to the POSIX standard defining an API for thread creation and
synchronization. This is a specification for thread behavior, not an implementation.
Operating system designers may implement the specification in any way they wish.
Q.70 Differentiate single threaded and multi-threaded processes.
Ans.Single-threading is the processing of one command at a time. When one thread is
paused, the system waits until this thread is resumed. In Multithreaded processes, threads
can be distributed over a series of processors to scale. When one thread is paused due to
some reason, other threads run as normal.
Q.71 Define mutual exclusion.
Ans. If a collection of processes share a resource or collection of resources, then often
mutual exclusion is required to prevent interference and ensure consistency when
accessing the resources.
Q.72 What is race condition ?
Ans. A race condition is a situation where two or more processes access shared data
concurrently and final value of shared data depends on timing.
Q.73 Define entry section and exit section.
Ans. Each process must request permission to enter its critical section. The section of the
code implementing this request is the entry section. The critical section is followed by an
exit section. The remaining code is the remainder section.
Q.74 Elucidate mutex locks with its procedure.
Ans. Mutex lock is software tools to solve the critical-section problem. A mutex lock has a
boolean variable available whose value indicates if the lock is available or not. If the lock
is available, a call to acquire() succeeds, and the lock is then considered unavailable
Q.75 What is binary semaphore?
Ans. Binary semaphore is a semaphore with an integer value that can range only between
0 and 1.
Q.76 What is semaphore? Mention its importance in operating systems.
Ans. Semaphore is an integer variable. It is a synchronization tool used to solve critical
section problem. The various hardware based solutions to the critical section problem are
complicated for application programmers to use.
Q.77 What is the meaning of the term busy waiting ?
Ans. Busy waiting means a process waits by executing a tight loop to check the
status/value of a variable.
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

Q.78 What is bounded buffer problem ?


Ans. The bounded buffer producers and consumers assume that there are fixed buffer sizes
i.e. a finite numbers of slots are available. To suspend the producers when the buffer is
full, to suspend the consumers when the buffer is empty, and to make sure that only one
process at a time manipulates a buffer so there are no race conditions or lost updates.
Q.79 State the assumption behind the bounded buffer producer consumer problem.
Ans. Assumption: It is assume that the pool consists of 'n' buffers, each capable of holding
one item. The mutex semaphore provides mutual exclusion for accesses to the buffer pool
and is initialized to the value 1.
Q.80 Define 'monitor'
Ans. Monitor is a highly structured programming language construct.
Use of monitors:
a) It provides a mutual exclusion facility. b) A monitor support synchronization by the use
of condition variables. c) Shared data structure can be protected by placing it in a monitor.
Q.81 What is a deadlock ?
Ans. A set of processes is deadlocked if each process in the set is waiting for an event that
only another process in the set can cause. Usually the event is release of a currently held
resource.
Q.82 State the conditions for deadlock.
Four conditions for deadlocks are:
Ans. :a. Mutual exclusion
b. Hold and wait
c. No preemption
d. Circular wait
1. Atleast one resource must be held in a nonsharable mode.
2. A process holding atleast one resource is waiting for more resources held by other
processes.
3.Resources cannot be preempted.
4.There must be a circular waiting.
Q.83 What is deadlock state?
Ans. If there is any process deadlock in a state, then that state is called deadlock state.
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

Q.84 What is resource-allocation graph ?


Ans. Deadlocks can be described more precisely in terms of a directed graph called a
system resource-allocation graph.
up the ladder:
Q85. Define safe state.
Ans.: A state is safe if the system can allocate resources to each process (up to its
maximum) in some order and still avoid a deadlock.
Q.86 What is hold and wait?
Ans. Hold and Wait : A process must be holding a resource and waiting for another.
Q.87 What is banker's algorithm ?
Ans. Banker's algorithm is a deadlock avoidance algorithm that is applicable to a resource-
allocation system with multiple instances of each resource type.
Q.88 Write the three ways to deal the deadlock program.
Ans. Three ways to deal with the deadlock problem :
1. Use a protocol to prevent or avoid deadlocks, ensuring that the system will never enter a
deadlock state.
2. Allow the system to enter a deadlock state, detect it and recover.
3. Ignore the problem altogether and pretend that deadlocks never occur in the system.
Q.89 List out the methods used to recover from the deadlock.
Ans. Recovery from Deadlock methods are process termination, resource preemption. In
process termination, all deadlocked processes are abort or abort one process at a time until
the deadlock cycle is eliminated. Resource preemption procedure is selecting a victim,
rollback and starvation.

Q.90 State the function of memory manager.


Ans. Functions of memory manager
• Allocates primary memory to processes.
• Maps process address space to primary memory.
• Minimizes access time using cost-effective memory configuration.
• May use static or dynamic techniques
Q.91 Name two differences between logical and physical addresses.
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

Ans. A logical address does not refer to an actual existing address; rather, it refers to an
abstract address in an abstract address space. Contrast this with a physical address that
refers to an actual physical address in memory. A logical address is generated by the CPU
and is translated into a physical address by the memory management unit (MMU).
Therefore, physical addresses are generated by the
Q.92 What is address binding?
Ans. The process of associating program instructions and data to physical memory
addresses is called address binding, or relocation.
Q.93 What is memory?
Ans. Memory is a device used to store the data and instructions required for any operation.
Q.94 Explain the consequences of swapping.
Ans.
a. Context switching time is fairly high.
b. Only idle process must swap.
c. Transfer time is directly proportional to the amount of memory swapped.
d. It increase the O.S. overheads.
Q.95 What is an overlay? What is the use of it?
Ans. It allows a process to execute despite to the system having insufficient physical
memory. The idea of overlay is to keep in memory only those instructions and data that
are needed at any given time. When other instructions are needed, they are loaded into
space that was occupied previously by instructions that are no longer needed. Overlay do
not require any special support from the operating system.
Q.96 What is internal fragmentation?
Ans. Internal fragmentation exists when the smallest available block is larger than the
requested memory. It is the memory which is internal to a partition, but is not being used.
Q.99 Distinguish between internal and external fragmentation.
Ans. Internal fragmentation is the area in a region or a page that is not used by the process
it is allocated to. The space is wasted until the process terminates. External fragmentation
occurs when there is enough free space to satisfy a request for memory, but none of the
free holes between processes in memory is large enough to satisfy the request.e
Q.98 Bring out the disadvantages of fixed partition multiprogramming.
Ans. Disadvantages of fixed partition multiprogramming
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

a. Limited degree of multiprogramming.


b. Internal fragmentation.
c. Placement policies.
Q.98 What are memory pages and segments?
Ans. Logical memory is also broken into blocks of the same size called pages. It divides a
program into a smaller block called segments, each of which is allocated to memory
independently.
Q.99 What are the consequences of multiprogramming with fixed partitioning and
variable partitioning?
Ans.
1. Fixed partitioning
• Advantages
i) Simple to implement.
ii) Overhead is less.
• Disadvantages
i) Suffer from internal fragmentation.
ii) Inefficient use of memory.
2. Variable partitioning
• Advantages
i) Multiprogramming.
ii) Better utilization of processor and I/O devices.
iii) Easy to implement.
• Disadvantages
i) Fragmentation.
ii) Require contiguous memory location.
iii) Some memory may never be utilized.
Q.100 Explain how memory can be dynamically allocated using first fit, best fit and
worst fit strategies.
Ans.First fit: Take the first available hole in memory that is of adequate size. Fast but
leads to fragmentation.
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

Best fit: Take the hole that most closely matches (atleast as big as) the size of the program.
Usage efficient but slow still leads to fragmentation.
Worst fit : Take the biggest possible hole. Aims to reduce the number of little and wasted
memory holes. Still leads to fragmentation.
Q.101 Describe non-contiguous memory allocation.
Ans. For N memory blocks, the loss of 0.5 N blocks is possible due to external
fragmentation. This means that one-third of memory is not usable. But compaction is too
costly to perform regularly. External fragmentation arises because we are trying to allocate
memory contiguously. We can deal with external fragmentation if we can allow process
memory to be non-contiguous.
Q.102 What are the disadvantages of single contiguous memory allocation ?
Ans.
Disadvantages:
1. Memory is not fully utilized. 2. Poor utilization of processors.
Q.16 Define external fragmentation ?
Ans.
Total memory space exists to satisfy a request, but it is not contiguous; storage is
fragmented into a large number of small holes.
Q.103 What is a page ?
Ans. Divide logical memory into blocks of same size called pages.
Q.104 What is frame table ?
Ans. Allocation and availability of the frame information is kept in a data structure called
a frame table. Frame table has one entry for each physical page frame, indicating whether
the latter is free or allocated and if it is allocated, to which page of which process or
processes.
Q.105 Define zero level paging.
Ans. There is no paging is used. The TLB is large enough to hold all the entries which is
required for processing.
Q.106 What is the purpose of paging the page tables ?bbe
Ans. In certain situations the page tables could become large enough that by paging the
page tables, one could simplify the memory allocation problem (by ensuring that
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

everything is allocated as fixed size pages as opposed to variable sized chunks) and also
enable the swapping of portions of page table that are not currently used.
Q.107 What is a translation look aside buffer used for?
Ans.
Problem with paging is that, extra memory references to access translation tables can slow
programs down by a factor of two or three. Too many entries in translation tables to keep
them all loaded in fast processor memory. To solve this problem TLB is used. TLB is used
to store a few of the translation table entries.
Q.108 Explain what the use of a page table is and how it is used.
Ans. Use of page table,
1. It shows the frame location for each page of the process.
2. Processor uses page table to produce a physical address.
Q.109 What is page frame?
Ans. Physical memory unit is called page frame.
Q.110 Consider a logical address space of eight pages of 1024 words each, mapped
onto a physical memory of 32 frames. How many bits are there in the logical address
and in the physical address.
Ans. Addressing within a 1024-word page requires 10 bits because 1024 = 210. Since the
logical address space consists of 8 = 23 pages, the logical addresses must be 10+ 3 = 13
bits. Similary, since there are 32 = 25 physical pages, physical addresses are 5+10 15 bits
long.
Q.111 Define swap space.
Ans. Secondary memory holds those pages that are not present in main memory. The
secondary memory is usually a high speed disk. It is known as the swap device and the
section of disk used for this purpose is known as swap space.
Q.112 What do you mean by page fault?
Ans. A page fault is a trap to the software raised by the hardware when a program accesses
a page that is mapped in the virtual address space, but not loaded in
Q.113 Define TLB.
Ans.: TLB is the memory cache of the most recently used memory management unit.
Q.114 What is virtual memory? Mention its advantages.
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

Ans. Virtual memory is a technique that allows the execution of processes that are not
completely in memory. Advantage of virtual memory is that programs can be larger than
physical memory.
Q.115 Consider a memory system with a cache access time of 10ns and a memory
access time of 110ns assume the memory access time includes the time to check the
cache. If the effective access time is 10% greater than the cache access time, what is
the hit ratio H? AU CSE: May-17
Ans. Effective Access Time = H × Tcache + (1-H) × Tmemory
1.1 × Tcache = H × Tcache + (1-H) × Tmemory
1.1 × 10 = H × 10 + (1 - H) 110
11 = H × 10 + 110 - 110 × H
- 99 = -100 H
H = 99/100
H = 0.99
Q.116 What is demand paging ?
Ans. : Determines when a page should be brough into memory. Demand paging only
brings pages into main memory when a reference is made to a location on the page.
Q.117 What is optimal page replacement ?
Ans. The optimal policy selects for replacement the page that will not be used for longest
period of time.
Q.118 What is the key distinction between FIFO and optimal algorithms ?
Ans. The key distinction between FIFO and optimal algorithms is that FIFO uses the time
when a page was brought into memory; the optimal uses the time when a page is to be
used (future).
Q.119 Define a cache hit.
Ans. When the CPU refers to memory and finds a required word in cache it is termed as
cache hit.
Q.120 Define hit ratio.
Ans. The ratio of the number of hits divided by the total CPU references to memory is the
hit ratio.
Q.121 Define a miss.
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

Ans. When the CPU refers to memory and if the required word is not found in cache it is
termed as miss.
Q.122 Will optimal page replacement algorithm suffer from Belady's anomaly?
Justify your answer.
Ans. Optimal replacement never suffers from Belady's anomaly. It was always believed
that an increase in the number of page frames would always result in the same number or
fewer page faults.
Q.123 Consider the following page-reference string 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12.
How many page faults ratio would occur for the FIFO page replacement algorithm?
Assuming three is four frames.

page faults = 12 page faults ratio = 100%


Q.124 What do you mean by 'Thrashing' ?
Ans: It is a situation in which a process is spending more time paging than executing.
Q.58 How does the system detect thrashing ?
Ans: The system can detect thrashing by evaluating the level of CPU utilization as
compared to the level of multiprogramming.
Q.125 What is thrashing and how to resolve this problem? Ans. 'Thrashing'
It is a situation in which a process is spending more time paging than executing.
Ans. To limit the effect of thrashing we can use local replacement algorithm. With local
replacement algorithm, if the process starts thrashing, it cannot steal frames from another
process and cause the latter to thrash as well. The problem is not entirely solved.

Q.126 List out any two disk scheduling techniques.


Ans. Disk scheduling techniques are FCFS, SSTF, SCAN and C-SCAN.
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

Q.127 Define seek-time and latency time for a hard-disk (HDD) mechanism
Ans.Latency time: It is the time spent waiting for the target sector to appear under the read
and write head.
Seek time: Seek time is the time required to move the disk arm to the required
Q.128 What is the need for disk scheduling ?
Ans. For a multiprogramming system with many processes, the disk queue may often have
several pending requests. Thus, when one request is completed, the OS chooses which
pending request to service next. To reduce seek time and increase disk bandwidth, disk
scheduling is required.
Q.128 What is SCAN disk scheduling ?
Ans. The disk arm starts at one end of the disk, and moves toward the other end, servicing
requests until it gets to the other end of the disk, where the head movement is reversed and
servicing continues.
Q.129 What is trap?
Ans. A trap is a software generated interrupt caused either by an error or by a specific
request from a user program that an operating system service be performed.
Q.130 Give the various disk scheduling methods.
Ans.1. FCFS 2. SSTF 3. SCAN 4. C-SCAN 5. LOOK 6. C-LOOK.
Q.131 Define C-SCAN scheduling.
Ans.Head begins its scan toward the nearest end and works it way all the way to the end of
the system. Once it hits the bottom or top it jumps to the other end and moves in the same
direction
Q.132 Suppose that the disk rotates at 7200 RPM. What is the average rotational
latency of this disk drive?
Ans. Disk rotates at 7200 rpm which gives 120 rotations per second. One rotation = 60s /
7200 = 8.33 ms Thus, a full rotation takes 8.33 ms and the average rotational latency (a
half rotation) takes 4.167 ms.

Q.133 What is a file? List some operations on it.


Ans. File is an unstructured sequence of data, File operations are read, write, create, delete
etc.
Q.134What are the various file accessing methods?
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

Ans. Sequential access, direct, indexed etc.


Q.135 Write the attributes of a file.
Ans. Name, identifier, type, location, size, time and date.
Q.136 Mention any four file attributes.
Ans. Name, type, size and location.
Q.137 What are the two types of system directories ?
Ans.A tree structured directory that allows a user to create subdirectories to organize the
files.
A general graph structure that allows complete flexibility in the sharing of files and
directories.
Q.138 Mention the major attributes and operations of a file.
Ans. Major attributes of file is name, identification, type, location, size and protection.
Operation on a file is to create, write, read, reposition, delete and truncate files.
Q.139 What is meant by free-space management ?
Ans. To keep track of free disk space, the system maintains a free space list. Free space
list. Free space list records all free disks blocks i.e. those not allocated to some file or
directory.
Q.140 What is virtual file system?
Ans. Virtual File Systems (VFS) provide an object-oriented way of implementing file
systems. VFS allows the same system call interface to be used for different types of the
systems.
Q.141 Write short note on file system mounting.
Ans. Mounting a file system, means taking that storage and connecting it to the operating
system in a way that it's usable as a hierarchical storage device with directories and files.
This could be the initial file system or another file system that connects to the root file
system at a mount point.
Q.142 What is file management system ?
Ans. File management system consists of system utility programs that run as privileged
applications. The way a user or application may access files and programmer does not
need to develop file management software.
Q.144 List the objectives for a file management system.
Ans.Objectives are :
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

1. Meet the data management needs and requirements of the users


2. Guarantee that the data in the file are valid
3. Optimize performance
4. Provide I/O support for a variety of storage device types
5. Provide I/O support for multiple users.
Q.145 Do FAT file system is advantageous? Why?
Ans. The FAT file system protects files by storing two copies of the file allocation table
on the FAT volume. FAT contains the FAT structure, which is a map of the data region.
File size is no longer fixed. We do not need to know the size of the file at the beginning.
Q.146 Differentiate between file and directory.
Ans. The basic difference between the two is that files store data, while directory store
files and other directory. File is a sequence of logical records. Directory lists the file by
name and includes the file location on the disk, length, type etc. .
Q146 What is a single-level directory?

A single-level directory in a multiuser system causes naming problems, since each file
must have a unique name.

Q147 What is a tree-structured directory?

A tree-structured directory allows a user to create subdirectories to organize files.

Q148 What are the different allocation methods.

The direct access nature of disks allows flexibility in the implementation of files. The
main problem here is how to allocate space to these files so that disk space is utilized
effectively and files can be accessed quickly. Three major methods of allocating disk
space are:

Contiguous

Linked

Indexed

Q149 Difference between primary storage and secondary storage.

Primary memory is the main memory (Hard disk, RAM) where the operating system
డాక్ టర్. కొండా శ్రీను OPERATING SYSTEMS R23 - 2 MARKS WITH ANSWERS

resides. Secondary memory can be external devices like CD, floppy magnetic discs etc.
secondary storage cannot be directly accessed by the CPU and is also external memory
storage.

Q150 List different file attributes.

Name

Type

Size

Protection

Q151 List out the access mechanisms.

Protection mechanisms provide controlled access by limiting the types of file access that
can be made. Access is permitted or denied depending on many factors. Several different
types of operations may be controlled –

i. Read ii. Write iii. Execute iv. Append v. Delete vi. List

Q152 What is Free Space Management?.

Since disk space is limited, we should reuse the space from deleted files for new files. To
keep track of free disk space, the system maintains a free space list. The free space list
records all free disk blocks

You might also like