0% found this document useful (0 votes)
2 views26 pages

2 Mark Question Os

The document is a question bank for an Introduction to Operating Systems course, covering various topics such as operating system definitions, process management, system calls, and types of systems. It includes questions on advantages of different system architectures, process states, scheduling, and synchronization mechanisms like semaphores and mutexes. The content is organized into units, with specific questions and answers aimed at assessing understanding of operating system concepts.

Uploaded by

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

2 Mark Question Os

The document is a question bank for an Introduction to Operating Systems course, covering various topics such as operating system definitions, process management, system calls, and types of systems. It includes questions on advantages of different system architectures, process states, scheduling, and synchronization mechanisms like semaphores and mutexes. The content is organized into units, with specific questions and answers aimed at assessing understanding of operating system concepts.

Uploaded by

ddeepanraj11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

23CST406- Introduction to Operating Systems Question Bank

UNIT-I
Introduction

1. What is an Operating system?

An operating system is a program that manages the computer hardware. It also


provides a basis for application programs and act as an intermediary between a user of a
computer and the computer hardware. It controls and coordinates the use of the hardware
among the various application programs for the various users.

2. What are the advantages of peer to peer systems over client-server systems?
(May/June 2016)
In peer to peer networking, each connected computers acts as a server and a
workstation. Therefore, there is no need to use a dedicated server. All the authorized users can
use their respective client computer to access the required files. This can lead to saving more
overhead costs.

3. What is the purpose of system programs?(May/June 2016)


System programs can be thought of as bundles of useful system calls. They provide
basic functionality to users so that users do not need to write their own programs to solve
common problems.

4. Mention the objectives of an operating systems?(Nov/Dec 2017)


` To make the computer system convenient to use in an efficient manner. To hide the
details of the hardware resources from the users. To provide users a convenient interface to
use the computer system.

[Link] is SYSGEN and system boot?(Nov/Dec 2017)

SYSGEN program obtains information concerning the specific. configuration of the


hardware system.
• Bootstrapping – code stored in ROM that is able to locate the kernel, load it into memory.
• Booting: Start of the actual execution of the OS.

[Link] is difference between trap and interrupt?(Apr/May 2018)

The trap is a signal raised by a user program instructing the operating system to
perform some functionality immediately. The interrupt is a signal to the CPU emitted by
hardware that indicates an event that requires immediate attention.

[Link] the purpose of system calls.(Apr/May 2018)

System call provides the services of the operating system to the user programs via
Application Program Interface(API). It provides an interface between a process and
operating system to allow user-level processes to request services of the operating system.
System calls are the only entry points into the kernel system
[Link] are the main advantage of multiprocessor systems?.(Nov/Dec 2019)

The advantages of the multiprocessing system are: Increased Throughput − By


increasing the number of processors, more work can be completed in a unit time. Cost Saving
− Parallel system shares the memory, buses, peripherals etc. Multiprocessor system thus saves
money as compared to multiple single systems.

[Link] term trap or an exception.(Nov/Dec 2019)

A trap is an exception in a user process. It's caused by division by zero or invalid


memory access.

[Link] is Interrupt?(Nov/Dec 2021)

The interrupt is a signal emitted by hardware or software when a process or an event


needs immediate attention. It alerts the processor to a high-priority process requiring
interruption of the current working process.

[Link] System calls and system programs.(Nov/Dec 2021)

System programs are executable files while system calls are C routines which interact
with operating system features and can be compiled into system programs.A system call is a
way for a user program to interface with the operating system. The program requests several
services, and the OS responds by invoking a series of system calls to satisfy the request. A
system call can be written in assembly language or a high-level language like C or Pascal.

[Link] the services provided by an OperatingSystem?

Program execution I/O Operation


File-System manipulation Communications
Error detection

[Link] is the Kernel?

A more common definition is that the OS is the one program running at all times on
the computer, usually called the kernel, with all else being application programs.

[Link] is meant by Mainframe Systems?


Mainframe systems are the first computers developed to tackle many commercial and
scientific applications. These systems are developed from the batch systems and then
multiprogramming system and finally time sharing systems.

[Link] is meant by Batch Systems?

Operators batched together jobs with similar needs and ran through the computer as a
[Link] operators would sort programs into batches with similar requirements and as
system become available, it would run each batch.
[Link] is meant by Multiprogramming?
Several users simultaneously compete for system resources (i.e) the job currently
waiting for I/O will yield the CPU to another job which is ready to do calculations, if another
job is waiting. Thus it increases CPU utilization and system throughput.

[Link] is meant by Time-Sharing Systems?

Time Sharing is a logical extension of multiprogramming .Here, CPU executes


multiple jobs by switching among them, but the switches occur so frequently that the users
can interact with each program while it is running.

[Link] are the Components of a Computer System?

Application Programs System Program OperatingSystem Computer Hardware

[Link] are the advantages of Multiprogramming?

Increased System Throughput Increased CPU utilization

[Link] is Multiprocessor System?

Multiprocessor systems have systems more than one processor for communication,
sharing the computer bus, the memory, clock & peripheral devices.

21. What are the advantages of multiprocessors?


Increased throughput Economy of scale Increased reliability

22. What are Multiprocessor Systems & give their advantages?

Multiprocessor systems also known as parallel systems or tightly coupled systems are
systems that have more than one processor in close communication, sharing the computer bus,
the clock and sometimes memory & peripheral devices. Their main advantages are,
Increased throughput Economy of scale Increased reliability

23. What are the different types of Multiprocessing?

Symmetric multiprocessing (SMP): In SMP each processor runs an identical copy of


the OS & these copies communicate with one another as needed. All processors are peers.
Examples are Windows NT, Solaris, Digital UNIX, and OS/2 &Linux.
Asymmetric multiprocessing: Each processor is assigned a specific task. A master
processor controls the system; the other processors look to the master for instructions or
predefined tasks. It defines a master-slave relationship. Example: SunOS Version4.

24. What is meant by clustered system?


Clustered systems are collection of multiple CPUs to accomplish computational work.
Those systems share storage and are closely linked via LAN networking.

25. What are the types of clustering?


Asymmetric Clustering
Symmetric Clustering & Clustering over a WAN
26. What is meant by Asymmetric Clustering?
In this clustering, one machine is in hot standby mode, while the other is running the
application. The hot standby machine just monitors the active server. If that server fails,
hot standby host become the actives server.

27. What is meant by Symmetric clustering?


Two or more hosts are running applications and they are monitoring each other. This
clustering requires more than one application be available to run and it uses all of the
available hardware.

28. What is meant by parallel clusters?


Parallel clusters allow multiple hosts to access the same data on the shared storage.
Each machine has full access to all data in the database.

29. What is meant by Real time system?


Real time systems are systems that have their in-built characteristics as supplying
immediate response. In real time system, each process is assigned a certain level of priority
according to the relative importance of the events to be processed.

30. What are the advantages of distributed systems?


 Resource sharing
 Load balancing
 Reliability Communication link easy

31. What are the applications of real-time systems?
 Controlling the machines Instruments Industrial process
 Landing & tasking off aero planes Real time simulations
 Military applications.
32. What are the types of Real times systems?
Hard Real Time System Soft Real Time System

33. What is meant by Hard Real time systems?


They are generally required to and they guarantee that the critical tasks are completed
in given amount of time.

34. What is meant by soft real times system?

It provides priority to the tasks based on their criticality. It does not


guarantee completion of critical tasks in time.

35. What is meant by distributed systems?


A distributed system is basically a collection of autonomous computer systems which
co- operate with one another through their h/w and s/w interconnections.

36. What are the disadvantages of distributed systems?


 Security weakness
 Over dependence on performance and reliability
 Maintenance and control become complex
37. What are the modes of operation in Hardware Protection?
 User Mode
 Monitor Mode

38. What are Operating Services?


Normally, an operating system provides certain services to programs and to the users
of those programs. Some of them are:
Program Execution. I/O operations
File-system manipulation Communications Error Detection

39. What is System Programs?

System programs provide a convenient environment for program development and


execution. Some of these programs are user interfaces to system calls and others are
more complex.
Some of them are:
 File Management Status Information File modification
 Programming Language support Program loading,
 Execution and communication.
UNIT-II
Process Management

1. Define process?

A process is more than a program code, which is sometime known as the text section.
IT also includes the current activity, as represented by the value of the program counter and
the processor’s registers.

2. Under What circumstances is user level threads is better than the kernel level
threads?(May/June 2016)

User level thread Kernel level thread


User thread are implemented by users. kernel threads are implemented by OS.
OS doesn’t recognize user level threads. Kernel threads are recognized by OS.
Implementation of User threads is easy. Implementation of Kernel thread is complicated.

3. What is the meaning of the term busy waiting?(May/June 2016)


Busy waiting means that a process is waiting for a condition to be satisfied in a tight
loop without relinquishing the processor.

4. Name and draw five different process states with proper definition (Nov/Dec 2017)
New (Create) – In this step, the process is about to be created but not yet created,
it is the program which is present in secondary memory that will be picked up by OS to create
the process.
Ready – New -> Ready to run. After the creation of a process, the process enters the
ready state i.e. the process is loaded into the main memory. The process here is ready to run
and is waiting to get the CPU time for its execution. Processes that are ready for execution by
the CPU are maintained in a queue for ready processes.
Run – The process is chosen by CPU for execution and the instructions within the process are
executed by any one of the available CPU cores.
Blocked or wait – Whenever the process requests access to I/O or needs input from the user
or needs access to a critical region(the lock for which is already acquired) it enters the blocked
or wait state. The process continues to wait in the main memory and does not require CPU.
Once the I/O operation is completed the process goes to the ready state.
Terminated or completed – Process is killed as well as PCB is deleted.
Suspend ready – Process that was initially in the ready state but were swapped out of main
memory (refer Virtual Memory topic) and placed onto external storage by scheduler are said
to be in suspend ready state. The process will transition back to ready state whenever the
process is again brought onto the main memory.
Suspend wait or suspend blocked – Similar to suspend ready but uses the process which was
performing I/O operation and lack of main memory caused them to move to secondary
[Link] work is finished it may go to suspend ready.

5. Elucidate mutex locks with its procedure.(Nov/Dec 2017)


A mutex provides mutual exclusion, either producer or consumer can have the key
(mutex) and proceed with their work. As long as the buffer is filled by the producer, the
consumer needs to wait, and vice versa.

6. What are the benefits of synchronous and asynchronous communication?(Apr/May


2018)
Benefits of synchronous:
 This reduces overhead bits
 It overcomes the two main deficiencies of the asynchronous method, that of in
efficiency and lack of error detection.
Benefits of asynchronous:
 The character is self-contained & Transmitter and receiver need not be synchronized
 Transmitting and receiving clocks are independent of each other

7. Give an programming example in which multithreading does not provide better


performance than a single threaded solutions.(Apr/May 2018)
An interactive GUI program such as a debugger where a thread is used to monitor user
input,another thread represents the running application, and a third thread monitors
performance.

8. State the primary distinction between short term and CPU scheduler.(Nov/Dec 2019)
A short-term scheduler selects a process which has to be executed next and allocates
CPU. Short-term scheduler selects a process from the ready queue.....Explanation: The
primary distinction between the short-term scheduler and the long-term scheduler is the
frequency of their execution.

9. What are the conditions must hold for a deadlock to occur?.(Nov/Dec 2019)
Mutual exclusion: processes require exclusive control of its resources (not sharing). Hold
and wait: process may wait for a resource while holding others. irreversible: unable to reset to
an earlier state where resources not held.
10. Define Semaphore.(Nov/Dec 2021)
Semaphore is a variable or abstract data type used to control access to a common
resource by multiple threads and avoid critical section problems in a concurrent system
such as a multitasking operating system. Semaphores are a type of synchronization primitives.

11. What is the difference between thread and process?(Nov/Dec 2021)


A process is a program under execution i.e an active program. A thread is a lightweight
process that can be managed independently by a scheduler. Processes require more time for
context switching as they are more heavy. Threads require less time for context switching as
they are lighter than processes.

12. What is meant by the state of the process?


The state of the process is defined in part by the current activity of that process.
Each process may be in one of the following states.
New: The process is being created. Running: Instruction are being executed
Waiting: The process is waiting for some event to occur. Ready: The process is waiting to be
assigned to a processor Terminated: The process has finished execution.

13. Define process control block contain?


Each process is represented in the operating system by a process control block (PCB)
also called as task control block. The PCB simply serves as the repository for any
information that may vary from process to process.

14. What does PCB contain?


Process state Program counter CPU registers CPU scheduling information Memory
management information Accounting information.

15. What are the 3 different types of scheduling queues?


Job Queue: As process enters the system they are put into job queue.
Ready Queue: The processes that are residing in the main memory and are ready and
waiting to execute are kept in the queue
Device Queue: The list of processes waiting for particular I/O device is called a device
queue.

16. Define schedulers?


A process migrates between the various scheduling throughout its lifetime. The
operating system must select, for scheduling purposes, processes from these queues in some
fashion. The selection process is carried out by the appropriate scheduler.

17. What are the types of scheduler?


Long term scheduler or job scheduler selects processes from the pool and load them
into the memory for execution. Short term scheduler or CPU scheduler, select among the
processes that are ready to execute and allocates the CPU to one of them.

18. Define critical section?


If a system consist on n processes {P0, P1,……., Pn-1}.Each process has a segment
of code called a critical section, in which the process may be changing common variables,
updating a table , writing a file. The important feature of this system is that, when one process
is in its critical section, no other process is to be allowed to execute in its critical section.
19. What requirement is to be satisfied for a solution of a critical section problem?
A solution to the critical section problem must satisfy the following 3 requirements.
Mutual exclusion: If process P1 is executing in its critical section, then no other
processes can be executing in their critical sections.
Progress: If no process is executing in its critical section and some processes wish to
enter their critical sections, then only those processes that are not executing in
their remainder section can participate in the decision on which will enter its
critical section next, and this selection cannot be postponed in definitely.
Bounded waiting: There exists a bound on the number of times that other processes
are allowed to enter their critical section after a process has made a request to enter
its critical section and before that request is granted.
20. Define semaphores.
Semaphore is a synchronization toll. A semaphore S is an integer variable that apart
from initialization is accessed only through 2 standard atomic [Link] Signal

21. Define Starvation in deadlock?


A problem related to deadlock is indefinite blocking or starvation, a situation where
processes wait indefinitely within a semaphore. Indefinite blocking may occur if we add and
remove processes from the list associated with a semaphore in LIFO order.

22. Name dome classic problem of synchronization?


The Bounded – Buffer Problem The Reader – Writer Problem
The Dining –Philosophers Problem

23. Define deadlock?


A process request resources; if the resource are not available at that time, the process
enters a wait state. Waiting processes may never change state, because the resources they are
requested are held by other waiting processes. This situation is called deadlock.

24. What is the sequence of operation by which a process utilizes a resource?


Under the normal mode of operation, a process may utilize a resource in only the
following sequence:
Request: If the request cannot be granted immediately, then the requesting process must wait
Until it can acquire the response.
Use: The process can operate on the resource. Release: The process releases the resource

25. Give the condition necessary for a deadlock situation to arise?


A deadlock situation can arise if the following 4 condition hold simultaneously in a
system. Mutual Exclusion Hold and Wait No preemption Circular Wait

26. Define ‘SafeState”?


A state is safe if the system allocates resources to each process in some order and
still avoid deadlock.

27. What is the use of cooperating processes?


Information sharing: Since several users may be interested in the same piece of
information, we must provide an environment to allow concurrent access to these type
of resources.
Computation speedup: If we want a particular task to run faster, we must break it into
subtask, each of which executing in parallel with others.
Modularity: We may want to construct the system in a modular fashion, dividing the
system functions into separate processes or thread.
Convenience: Even an individual user may have many tasks on which to work at one time.
For instance a user is editing, printing and computing in parallel.

28. Define deadlock-avoidance algorithm?


A deadlock-avoidance algorithm dynamically examines the resource allocation state
to ensure that a circular wait condition can never exist. The resource allocation state is
defined by the number of available and allocated resources, and the maximum demand of the
processes.

29. What are the benefits of multithreaded programming?


 Responsiveness Resource sharing Economy
 Utilization of multiprocessor rarchitecture

30. Define deadlock detection diction?


If a system does not employ either a deadlock-prevention or a deadlock avoidance
algorithm, then a deadlock situation may occur. In this environment, the system must provide:
An algorithm that examines the state of the system to determine whether a deadlock has
occurred An algorithm to recover from the deadlock.

31. Define race condition.


When several process access and manipulate same data concurrently, then the outcome
of the execution depends on particular order in which the access takes place is called race
condition. To avoid race condition, only one process at a time can manipulate the shared
variable.

32. What is critical section problem?


Consider a system consists of ‘n‘processes. Each process has segment of Code called
a critical section, in which the process may be changing common variables, updating a table,
writing a file. When one process is executing in its critical section, no other process can be
allowed to execute in its critical section.

33. Define busy waiting and spinlock.


When a process is in its critical section, any other process that tries to enter its critical
section must loop continuously in the entry code. This is called as busy waiting and this type
of semaphore is also called a spinlock, because the process while waiting for the lock.

34. What are the requirements that a solution to the critical section problem must
satisfy?
The three requirements are Mutual Exclusion Progress
Bounded waiting

35. Define entry section and exit section.


The critical section problem is to design a protocol that the processes can use to
cooperate. 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.
36. What are conditions under which a deadlock situation mayarise?
A deadlock situation can arise if the following four conditions hold Simultaneously in
a system: a. Mutual exclusion b. Hold and wait c. No pre-emption d. Circular wait.

37. What is a resource-allocation graph?


Deadlocks can be described more precisely in terms of a directed graph called a
system resource allocation graph. This graph consists of a set of vertices V and a set of edges
E. The set of vertices V is partitioned into two different types of nodes; P the set consisting of
all active processes in the system and R the set consisting of all resource types in the system.
UNIT-III
Memory Management

1. Define Dynamic Loading.


To obtain better memory-space utilization dynamic loading is used. With dynamic
loading, a routine is not loaded until it is called. All routines are kept on disk in a relocatable
load format. The main program is loaded into memory and executed. If the routine needs
another routine, the calling routine checks whether the routine has been loaded. If not, the
relocatable linking loader is called to load the desired program into memory.

2. How does the system detect thrashing?(May/June 2016)


The system can detect thrashing by evaluating the level of CPU utilization as
compared to the level of multiprogramming. It can be eliminated by reducing the level of
multiprogramming.

3. Name the differences between logical and physical addresses.(May/June 2016)


The logical address is used like a reference, to access the physical address. The
fundamental difference between logical and physical address is that logical address is
generated by CPU during a program execution whereas, the physical address refers to a
location in the memory unit.

4. Write about swapping(Nov/Dec 2017)


Swapping is a memory management scheme in which any process can be temporarily
swapped from main memory to secondary memory so that the main memory can be made
available for other processes. It is used to improve main memory utilization.

5. Consider the following page reference string: 123456789101112 then find the FIFO
for it(Nov/Dec 2017)
Page fault is 9

6. Define External fragmentation.(Apri/May 2018)


External fragmentation arises when free memory is separated into small blocks and is
interspersed by allocated memory. It is a weakness of certain storage allocation algorithms,
when they fail to order memory used by programs efficiently.

7. What are the counting based page replacement algorithm?(Apr/May 2018)


Counting Based Page Replacement Algorithm. It requires that the page with smallest
count to be replaced. It is based on the argument that the page with the smallest count was
probably just brought in and has yet to be used.
8. Why is it important to scale up system bus and device speeds as CPU speed increases?
(Nov/Dec 2019)
If the CPU speed increase but system bus and device speeds can't scale up, the CPU
can't speed up for waiting the I/O service. Then, the system bus and device speeds become
bottle neck. So, it is important to scale up system bus and device speeds while the CPU speed
increases.

9. Under what circumference do page faults occur? .(Nov/Dec 2019)


A page fault occurs when a program attempts to access data or code that is in its
address space, but is not currently located in the system RAM.

10. Define Swapping.(Nov/Dec 2021)


Swapping is a mechanism in which a process can be swapped temporarily out of
main memory (or move) to secondary storage (disk) and make that memory available to other
processes.

11. What is thrashing?.(Nov/Dec 2021)


In a virtual storage system (an operating system that manages its logical storage or
memory in units called pages), thrashing is a condition in which excessive paging operations
are taking place. A system that is thrashing can be perceived as either a very slow system or
one that has come to a halt.

12. Define Dynamic Linking.


Dynamic linking is similar to dynamic loading, rather that loading being postponed
until execution time, linking is postponed. This feature is usually used with system libraries,
such as language subroutine libraries. A stub is included in the image for each library-routine
reference. The stub is a small piece of code that indicates how to locate the appropriate
memory- resident library routine, or how to load the library if the routine is not already
present.

13. What are Overlays?


To enable a process to be larger than the amount of memory allocated to it, overlays
are used. The idea of overlays is to keep in memory only those instructions and data that are
needed at a given time. When other instructions are needed, they are loaded into space
occupied previously by instructions that are no longer needed.

14. Define Swapping.


A process needs to be in memory to be executed. However a process can be swapped
temporarily out of memory to a backing store and then brought back into memory for
continued execution. This process is called swapping.

15. What do you mean by BestFit?


Best fit allocates the smallest hole that is big enough. The entire list has to be
searched, unless it is sorted by size. This strategy produces the smallest left overhole.

16. What do you mean by FirstFit?


First fit allocates the first hole that is big enough. Searching can either start at the
beginning of the set of holes or where the previous first-fit search ended. Searching can be
stopped as soon as a free hole that is big enough is found.
17. How is memory protected in a paged environment?
Protection bits that are associated with each frame accomplish memory protection in a
paged environment. The protection bits can be checked to verify that no writes arebeing made
to a read- only page.

18. What is External Fragmentation?

External fragmentation exists when enough total memory space exists to satisfy a
request, but it is not contiguous; storage is fragmented into a large number of small holes.

19. What is Internal Fragmentation?


When the allocated memory may be slightly larger than the requested memory, the
difference between these two numbers is internal fragmentation.

20. What do you mean by Compaction?


Compaction is a solution to external fragmentation. The memory contents are shuffled
to place all free memory together in one large block. It is possible only if relocation is
dynamic, and is done at execution time.

21. What are Pages and Frames?

Paging is a memory management scheme that permits the physical -address space of a
process to be non-contiguous. In the case of paging, physical memory is broken into fixed-
sized blocks called frames and logical memory is broken into blocks of the same size called
pages.

22. What is the use of Valid-Invalid Bits in Paging?


When the bit is set to valid, this value indicates that the associated page is in the
process’s logical address space, and is thus a legal page. If the bit is said to invalid, this value
indicates that the page is not in the process’s logical address space. Using the valid-invalid bit
traps illegal addresses.

23. What is the basic method of Segmentation?

Segmentation is a memory management scheme that supports the user view of


memory. A logical address space is a collection of segments. The logical address consists of
segment number and offset. If the offset is legal, it is added to the segment base to produce the
address in physical memory of the desired byte.

24.A Program containing relocatable code was created, assuming it would be loaded at
Address 0. In its code, the program refers to the following addresses:
50,78,150,152,154. If the program is loaded into memory starting at location 250, how
do those addresses have to be adjusted?
All addresses need to be adjusted upward by [Link] the adjusted addresses would be
300, 328, 400, 402, and 404.

25. What is Virtual Memory?


Virtual memory is a technique that allows the execution of processes that may not be
completely in memory. It is the separation of user logical memory from physical memory.
This separation provides an extremely large virtual memory, when only a smaller physical
memory is available.
26. What is Demand Paging?
Virtual memory is commonly implemented by demand paging. In demand paging, the
pager brings only those necessary pages into memory instead of swapping in a whole process.
Thus it avoids reading into memory pages that will not be used anyway, decreasing the swap
time and the amount of physical memory needed.

27. Define Lazy Swapper.


Rather than swapping the entire process into main memory, a lazy swapper is used. A
lazy swapper never swaps a page into memory unless that page will beneeded.

28. What is a Pure Demand Paging?

When starting execution of a process with no pages in memory, the operating system
sets the instruction pointer to the first instruction of the process, which is on a non-memory
resident page, the process immediately faults for the page. After this page is brought into
memory, the process continues to execute, faulting as necessary until every page that it needs
is in memory. At that point, it can execute with no more faults. This schema is pure demand
paging.

29. Define Effective Access Time.


Let p be the probability of a page fault close to 0; that is, there will be only a few page
faults. The effective access time is,
Effective access time = (1-p)*ma+p*page fault time ma: memory access time

30. Define Secondary Memory.

This 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 the
disk used for this purpose is known as swap space.

31. What is the basic approach of Page Replacement?

If no frame is free is available, find one that is not currently being used and free it. A
frame can be freed by writing its contents to swap space, and changing the page table to
indicate that the page is no longer in memory. Now the freed frame can be used to hold the
page for which the process faulted.

32. What is the various Page Replacement Algorithms used for Page Replacement?

FIFO page replacement Optimal page replacement


LRU page replacement
LRU approximation page replacement Counting based page replacement Page
buffering algorithm.

33. What are the major problems to implement Demand Paging?

The two major problems to implement demand paging is developing,


Frame allocation algorithm
Page replacement algorithm
34. What is a Reference String?
An algorithm is evaluated by running it on a particular string of memory references
and computing the number of page faults. The string of memory reference is called a
reference string.

35. What is virtual memory?

Virtual memory is a technique that allows the execution of processes that may not be
completely in memory. It is the separation of user logical memory from physical memory.
This separation provides an extremely large virtual memory, when only a smaller physical
memory is available.

36. Define secondary memory.

This 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 the
disk used for this purpose is known as swap space.
UNIT-IV
Storage Management

1. What is a File?
A file is a named collection of related information that is recorded on secondary storage.
A file contains either programs or data. A file has certain “structure” based on its type.
File attributes: Name, identifier, type, size, location, protection, time, date
File operations: creation, reading, writing, repositioning, deleting, truncating,
appending, renaming File types: executable, object, library, source code etc.

2. Suppose the disk rotates at 7200rpm. What is the average rotational latency of the disk
drive? (Nov/Dec 2017)
Average rotational latency is time for 1/2 revolution. Example: 7200 RPM. One rotation
= 60s / 7200 = 8.33ms.

3. Enlist different types of directory structure.(Nov/Dec 2017)

Types of Directory Structures


1. Single-level directory structure. Single level directory structure has only one
directory which is called the root directory. ...
2. Two-level directory structure. ...
3. Hierarchical Directory Structure. ...
4. Tree Directory Structure. ...
5. Acyclic-Graph Directory Structure.

4. Why is rotational latency usually not considered in disk scheduling?(May/June 2016)


Most disk scheduling only use seek time. Most disk scheduling do not consider
rotational frequency because in most modern system, the actual physical location of blocks in
not available.
5. How does DMA increase system concurrency?(May/June 2016)
DMA increases system concurrency by allowing the CPU to perform tasks while the
DMA system transfers data via the system and memory buses. Hardware design is
complicated because the DMA controller must be integrated into the system and the system
must allow the DMA controller to be a bus master.

6. State the typical bad-sector transactions.(Apri/May 2018)


A bad sector is an unusable part or subdivision within a track on a magnetic or optical
disc located on a computer's hard disk or flash drive. It typically forms as a result of physical
damage or, rarely, the operating system's (OS) inability to access the information.

7. What is the advantage of bit vector approach in free space management?(Apri/May


2018)
An advantage of this approach is that the addresses of a group of free disk blocks can
be found easily. This approach stores the address of the first free disk block and a number n of
free contiguous disk blocks that follow the first block

8. Why it is important to balance file system I/O among the disks and controllers on a
system in a Multitasking environment?(Nov/Dec 2019)
By balancing I/O among disks and controllers, neither an individual disk nor a
controller is overwhelmed, so that bottleneck is avoided.

9. Why is it important to scale up system bus and device speeds as CPU speed increases?
(Nov/Dec 2019)
Because the communication between a fast CPU and a slow device or between a fast
CPU and a deviceusing a slow bus can be a bottleneck for the whole system.

10. What is file mounting.(Nov/Dec 2021)


Mounting refers to making a group of files in a file system structure accessible to user
or group of users. It is done by attaching a root directory from one file system to that of
another. This ensures that the other directory or device appears as a directory or subdirectory
of that system.

11. Name any three file attributes. (Nov/Dec 2021)


Type.
Location.
Size.
Protection.
Time and Date.

12. List the various File Attributes.


A file has certain other attributes, which vary from one operating system to another,
but typically consist of these: Name, identifier, type, location, size, protection, time, date and
user identification.

13. What are the various File Operations?


The basic file operations are,
Creating afile
Writing a file Reading afile
Repositioning within a file Deleting afile
Truncating a file

14. What is the information associated with an Open File?


Several pieces of information are associated with an open file which may be:
File pointer
File open count
Disk location of the file Access rights

15. What are the different Accessing Methods of a File?


The different types of accessing a file,are:
Sequential access: Information in the file is accessed sequentially
Direct access: Information in the file can be accessed without any particular order.
Other access methods: Creating index for the file, indexed sequential access method

16. What is Directory?


The device directory or simply known as directory records information- such as name,
location, size, and type for all files on that particular partition. The directory can be viewed as
a symbol table that translates file names into their directoryentries.

17. What are the operations that can be performed on a Directory?


The operations that can be performed on a directory are,
Search for a file Create a file Delete a file Rename a file Listdirectory
Traverse the file system

18. What are the most common schemes for defining the Logical Structure of a Directory?
The most common schemes for defining the logical structure of adirectory
Single-Level Directory Two-level Directory
Tree-Structured Directories Acyclic-Graph Directories General Graph Directory

19. Define UFD and MFD.


In the two-level directory structure, each user has own user file directory Each UFD
has a similar structure, but lists only the files of a single user. When a job starts the system‟s
master file directory

20. What is a Path Name?


A pathname is the path from the root through all subdirectories to a specified file. In a
two-level directory structure a user name and a file name define a pathname.

21. What is Access Control List?


The most general scheme to implement identity-dependent access is to associate with
each file and directory an access control unit.
22. Define Equal Allocation.
The way to split „m’ frames among „n’ processes is to give everyone an equal share,
m/n frames. For instance, if there are 93 frames and 5 processes, each process will get 18
frames. The leftover 3 frames could be used as a free-frame buffer pool. This scheme is called
equal allocation.
23. What is the cause of Thrashing? How does the system detect thrashing? Once it
detects thrashing, what can the system do to eliminate this problem?
Thrashing is caused by under allocation of the minimum number of pages required by
a process, forcing it to continuously page fault. The system can detect thrashing by evaluating
the level of CPU utilization as compared to the level of multiprogramming. It can be
eliminated by reducing the level of multiprogramming.

24. If the average page faults service time of 25 ms and a memory access time of
[Link] the effective access time.
Effective access time = (1-p) *ma + p*page fault time = (1-p) *100+p*25000000
= 100-100p+25000000*p = 100 + 24999900p

25. What is Belady’s Anomaly?


For some page replacement algorithms, the page fault rate may increase as the number
of allocated frames increases.

26. What are the types of Path Names?


Path names can be of two types.
Absolute path name: Begins at the root and follows a path down to the specified file,
giving the directory names on the path.
Relative path name: Defines a path from the current directory.

27. What is meant by Locality of Reference?


The locality model states that, as a process executes, it moves from locality to locality.
Locality is of two types.
Spatial locality Temporal locality.

28. Define Seek Time and Latency Time.


The time taken by the head to move to the appropriate cylinder or track is called seek
time. Once the head is at right track, it must wait until the desired block rotates under the
read- write head. This delay is latency time.

29. What are the Allocation Methods of a Disk Space?


Three major methods of allocating disk space which are widely in use are Contiguous
allocation Linked allocation Indexed allocation

30. What are the advantages of Contiguous Allocation?


The advantages are,
Supports direct access Supports sequential access
Number of disk seeks is minimal.

31. What are the drawbacks of Contiguous Allocation of Disk Space?


The disadvantages are,
Suffers from external fragmentation Suffers from internal fragmentation Difficulty in
finding spacefor a new file File cannot be extended Size of the file is to be declared in
advance

32. What are the advantages of Linked Allocation?


The advantages are,
No external fragmentation
Size of the file does not need to be declared
33. What are the disadvantages of Linked Allocation?
The disadvantages are,
Used only for sequential access of files. Direct access is not supported
Memory space required for the pointers.
Reliability is compromised if the pointers are lost or damaged

34. What are the various Disk-Scheduling Algorithms?


The various disk-scheduling algorithms are, First Come First Served Scheduling
Shortest Seek Time First Scheduling SCAN Scheduling C-SCAN Scheduling
LOOKscheduling

35. What are the techniques used for performing I/O.


Programmed I/O Interrupt driven I/O Direct Memory Access

36. Give an example of an application in which data in a file should be accessed in the
following order:
Sequentially - Print the content of the file.
Randomly - Print the content of record i. This record can be found using hashing or
index techniques
UNIT V
VIRTUAL MACHINES AND MOBILE OS

1. What are Virtual Machines in Operating System?


A virtual machine (VM) is a virtual environment which functions as a virtual
computer system with its own CPU, memory, network interface, and storage, created on a
physical hardware system.

[Link] the Characteristics of virtual machines


The characteristics of the virtual machines are as follows −

 Multiple OS systems use the same hardware and partition resources between virtual
computers.
 Separate Security and configuration identity.
 Ability to move the virtual computers between the physical host computers as
holistically integrated files.

[Link] the difference between the single OS with no VM and Multiple OS with VM
4. Give the major benefits of virtual machines for operating-system designers and users.
 The multiple Operating system environments exist simultaneously on the same
machine, which is isolated from each other.
 Virtual machine offers an instruction set architecture which differs from real
computer.
 Using virtual machines, there is easy maintenance, application provisioning,
availability and convenient recovery
5. What is an Operating System?
An operating system is a construct that allows the user application programs to
interact with the system hardware. Operating system by itself does not provide any function
but it provides an atmosphere in which different applications and programs can do useful
work.

[Link] are the functions of operating systems


An operating system provides mainly three functions, they are
Convenience
Efficiency
Evolution Ability

[Link] the brief history of operating system


Generation Year Electronic Device Used Operating System Device
Used

First Generation 1945 - 1955 Vacuum Tubes Plug Boards

Second 1955 - 1965 Transistors Batch Systems


Generation

Third 1965-1980 Integrated Circuits Multiprogramming


Generation

Fourth 1980 - Large scale Integration Personal Computers


Generation Present Devices

[Link] the different types of operating system


 Batch Operating Systems
 Time Sharing Operating Systems
 Multiprocessor Operating Systems
 Distributed Operating Systems
 Real-Time Operating Systems
9. What are the levels of memory in the Operating System?
 Registers
 Caches memory
 Main or Primary Memory
 Secondary Memory
10. What are the functions of the operating system?
The function of the operating system (OS) are
 Security
 Control over system performance
 Job Accounting
 Error detecting aids
 Coordination between other software and users
 Memory Management
 Processor Management
 Device Management
 File Management
11. What are operating system design goals?
 Concurrent Systems
 Security and Privacy
 Resource Sharing
 Changes in Hardware and Software
 Portable Operating Systems
 Backward Compatibility
 No Specific User Type
12. What are operating system services?
The operating system is software which handles the computer's functionality like
scheduling, input/output operation resource allocation, file system manipulation, etc.
It acts as an interface between the computer hardware and the user.
Operating Systems Services
The services offered by the operating system are as follows −
 Input/Output operation
 Resource allocation
 File system manipulation
 User interface
 Program execution
 Communication
 Security
[Link] are the main roles of operating system
The two main roles of the operating system are
 Resource Management
 Security
14. What are system calls in Operating System?
The interface between a process and an operating system is provided by system calls.
In general, system calls are available as assembly language instructions. They are also
included in the manuals used by the assembly level programmers. System calls are usually
made when a process in user mode requires access to a resource

[Link] are the different types of system call?


 Process Control
 File Management
 Device Management
 Information Maintenance
 Communication
16. What are simple machines?
A simple machine is a tool that makes our task easier and faster by changing the
magnitude and direction of the applied force.

17. What are the Privileged and Non-Privileged instructions in Operating System?
Privileged instructions
These are called machine level instructions that are executed when the processor is in privileged
mode.
The examples include the following −
 Shut down the system
 Change the contents of a control register.
 Jump into kernel code.
 Sending commands to I/O devices.
Non-Privileged Instructions
Non-Privileged mode is also called User mode or it is called as safe instructions.
The examples include the following −
 Load and store instructions
 Add, Subtract etc.
18. How are system calls connected to the operating system?
System calls are a method to program for communicating through an operating
system. Application developers unable to possess straight access with system calls might be
able to access with API.

[Link] are the differences between Unix and Linux Operating System?

UNIX copyrighted Operating system which is used by IBM AIX, Sun Solaris and HP-UX etc.,
Most of the UNIX systems are commercial in nature.

Linux is considered as UNIX clone. But the traditional companies won't accept "Unix-like"
but want the Unix trademark. Linux Is Just a Kernel and not the complete Operating system.

20. What is a process in Operating System?

A process is an active program i.e a program that is under execution. It is more than the
program code as it includes the program counter, process stack, registers, program code etc.
Compared to this, the program code is only the text section.

A program is not a process by itself as the program is a passive entity, such as file contents,
while the process is an active entity containing program counter, resources etc

[Link] is Process States.


A process changes its state as it executes. This state partially depends on the current
activity of a process.
[Link] are the different schedulers that are used for process scheduling .
 Long Term Scheduler
 Short Term Scheduler
 Medium Term Scheduler

23. What are the user goals of Operating Systems?

User Goals
The user goals or requirements should be as follows −
 The OS usage should be convenient
 Should be easy to use and easy to learn
 Should be safe and secure to use and information handling, and security should be
robust
 Should be fast in response to the user requests
24. What are the system goals of Operating Systems?

System Goals
The system design requirements should be as follows −

 The OS should be easy to design, maintain and also to implement.


 Updates should be delivered in an easy way.
 Adequate security and privacy should be implemented.
 Resource sharing should be enabled for processes.
 Should support present software and hardware and should be scalable for future
requirements.
 Should be backward compatible.
25. What are the essential properties of the different types of operating systems?
 Batch Operating system
 Interactive operating system
 Time sharing Operating system
 Real-time operating system
 Network operating system
 Symmetric Multiprocessing (SMP)
 Distributed Operating system
 Clustered Operating system
 Handheld

You might also like