1. What is 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 is turn around time?
The delay between job submission and job completion is called turn
around time.
3. What is spooling?
Spooling-Simultaneous peripheral operations on line. It is a high-speed
device like a disk is interposed between a running program and a low –speed
device involved with the program in input/output. It disassociates a running
program from the slow operation of devices like printers.
4. What is distributed system?
Distributed system or loosely coupled systems consists of a collection
of processors that do not share memory or a clock. Instead each processor has
its own local memory. The processors communicate with one another through
various communication lines, such as high speed buses or telephone lines.
5. What is tightly coupled system?
Some systems have more than one processor in close communication,
sharing the computer bus, the clock, and sometimes memory and peripheral
devices. These systems are referred to as tightly coupled systems.
6. Why are distributed systems desirable?
Distributed systems are desirable for the following reasons;
· Resource sharing
· Computation speedup
· Reliability
· Communication
7. What are System calls?
System calls provide the interface between a process and the Operating
system. System Calls are also called as Monitor call or Operating-system
function call. When a system call is executed, it is treated as by the hardware
as software interrupt. Control passes through the interrupt vector to a service
routine in the operating system, and the mode bit is set to monitor mode.
8. What are the categories of system programs?
i. File Management
ii. Status Information
iii. File Modification
iv. Programming Language Support
v. Program loading and execution
vi. Communications
9. List the services provided by an Operating System?
· Program execution
· I/O Operation
· File-System manipulation
· Communications
· Error detection
10. What are the two types of real time systems?
i. Hard real time system
ii. Soft real time system
11. What is an Interactive computer system?
Interactive computer system provides direct communication between the
user and the system. The user gives instructions to the operating system or to
a program directly, using a keyboard or mouse, and waits for immediate results.
12. What is the difference between Hard real time system and Soft real
time system?
A hard real time system guarantees that critical tasks complete on time.
In a soft real time system, a critical real-time task gets priority over the
other tasks, and retains that priority until it completes. Soft real time
systems have more limited utility than do hard real-time systems.
13. Short notes on Time Sharing System?
Time-sharing or multitasking is a logical extension of multiprogramming.
It allows many users to share the computer simultaneously. The 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.
14. Write the difference between multiprogramming and non
multiprogramming?
In a non multiprogrammed system, the CPU would sit idle. In a
multiprogramming system, the operating system simply switches to and executes
another job. When that job needs to wait, the CPU is switched to another job,
and so on. Eventually, the first job finishes waiting and gets the CPU back. As
long as there is always some job to execute, the CPU will never be idle.
15. What is Dual- Mode Operation?
The dual mode operation provides us with the means for protecting the
operating system from errant users and errant users from one another. User mode
and monitor mode are the two modes. Mode bit is attached to the hardware of the
computer to indicate the current mode. Mode bit is ‘0’ for monitor mode and ‘1’
for user mode.
16. What are the design goals of an operating system?
The requirements can be divided into two basic groups: User goals and
System goals. Users desire that the system should be convenient and easy to
use, easy to learn, reliable, safe and fast. The Operating system should be
easy to design, implement, and maintain.
17. What are the advantages of implementing an Operating system in
higher-level
languages?
The code can be written faster, is more compact, and is easier to
understand and debug. An operating system is far easier to port (to move to some
other hardware) if it is written in higher-level language.
18. What are the disadvantages of implementing an Operating system in
higher level
languages?
The major disadvantages are,
· Reduced speed
· Increase in storage requirements.
19. What are the five major categories of System Calls?
· Process Control
· File-management
· Device-management
· Information maintenance
· Communications
20. What is a Process?
A process is a program in execution. It is more than a program code
which includes the current activity, as represented by the value of program
counter and the content of processor’s registers. It also includes the process
stack, containing temporary data and a data section containing global
variables.
21. Write all the states of the process?
New ,Running ,Waiting ,Ready ,Terminated.
22. What is context switch?
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.
23. Write notes on Process Control Block?
Each process is represented in the Operating system by a process control
block or task control block. It contains many information associated with a
specific process, including process state, program counter, CPU registers, CPU
scheduling information, Memory management information, accounting information
and I/O information.
24. What is swapping?
Medium-term scheduler removes the process from memory. At some later
time, the process can be reintroduced into memory and its execution can be
continued where it left off. This scheme is called swapping.
25. What is cascading termination?
The parent is exiting, and the
operating system does not allow a child to continue if its parent terminates.
On such systems, if a process terminates (either normally or abnormally), then all its children must also
be terminated. This phenomenon, referred to as cascading termination.
26. Write the difference between single thread and multithread.
In a single thread, one task can be executed at a time. In multithread,
more than one task can be executed at a time.
27. What is the use of fork and execve system calls?
Fork is a System call by which a new process is created. Execve is also
a System call, which is used after a fork by one of the two processes to
replace the process memory space with a new program.
28. Differentiate long term scheduler and short term scheduler?
The long-term scheduler or job scheduler selects processes from the job
pool and loads them into memory for execution.
The short-term scheduler or CPU scheduler selects from among the process
that are ready to execute, and allocates the CPU to one of them.
29. What is the main advantage of the layered approach to System design?
The main advantage of layered approach is modularity. The layers are
selected such that each uses functions and services of only lower-level layers.
This approach simplifies debugging and system verification.
30. What are the two I/O methods?
Synchronous I/O
Asynchronous I/O.
31. Write the difference between synchronous I/O and asynchronous I/O?
In the case of synchronous I/O, once the I/O is started, then at I/O
completion, control is returned to the user process. In the case of
asynchronous I/O, returns control to the user program without waiting for the
I/O to complete.
32. What do you mean by co-operating processes?
A process is cooperating if it can affect or affected by the other
processes executing in the system. Clearly, any process that shares data with
other processes is a cooperating process.
33. What are the benefits of cooperating processes?
· Information sharing
· Computation speedup
· Modularity
· Convenience.
34. What is Preemptive scheduling?
i. When a process switches from the running state to the ready state
(for ex, when an interrupt occurs)
ii. When a process switches from the waiting state to the ready state
(for ex, completion of I/O)
35. What is dispatcher?
The dispatcher is the module that gives control of the CPU to the
process selected by the short-term scheduler. This function involves switching
context, Switching to user mode and jumping to the proper location in the user
program to restart that program.
36. What is dispatch latency?
The time taken by the dispatcher to stop one process and start another
running is known as dispatch latency.
37. What is non preemptive scheduling?
Under non preemptive scheduling, once the CPU has been allocated to a
process, the process keeps the CPU until it releases the CPU either by
terminating or by switching to the waiting state
38. Mention some scheduling criteria?
CPU utilization , Throughput , Turnaround time , Waiting time , Response
time
39. What is waiting time in CPU scheduling?
Waiting time is the sum of periods spent waiting in the ready queue. CPU
scheduling algorithm affects only the amount of time that a process spends
waiting in the ready queue.
40. What is Response time in CPU scheduling?
Response time is the measure of the time from the submission of a
request until the first response is produced.
41. Define throughput in CPU scheduling?
Throughput in CPU scheduling is the number of processes that are
completed per unit time. For long processes, this rate may be one process per
hour; for short transactions, throughput might be 10 processes per second.
42. How can we say the First Come First Served scheduling algorithm is
non preemptive?
Once the CPU has been allocated to a process, that process keeps the CPU
until it releases the CPU, either by terminating or by requesting I/O. So we
can say the First Come First Served scheduling algorithm is non preemptive.
43. Short note on critical section problem?
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,
and so on.
44. What are the three requirements for the solution to critical section
problem?
a. Mutual Exclusion
b. Progress
c. Bounded Waiting
45. What is semaphore?
A Semaphore ‘S’ is a Synchronization tool which is an integer value
that, apart from initialization, is accessed only through two standard atomic
operations; wait and signal. Semaphores can be used to deal with the n-process
critical section problem. It can be also used to solve various Synchronization
problems.
46. What are the two types of Semaphore?
a. Counting semaphores
b. Binary semaphores.
47. What is the difference between counting and binary semaphores?
A counting semaphore is a semaphore with an integer value that can range
over an unrestricted domain. A binary semaphore is a semaphore with an integer
value that can range between 0 and 1.It is simpler to implement than a counting
semaphore.
48. Write some classical problems of synchronization?
The Bounded-Buffer Problem, Readers-Writers Problem, Dining Philosophers
Problem
49. When the error will occur when we use the semaphore?
i. When the process interchanges the order in which the wait and signal
operations on the semaphore mutex.
ii. When a process replaces a signal (mutex) with wait (mutex).
iii. When a process omits the wait (mutex), or the signal (mutex), or
both.
50. What is Interprocess Communication?
Interprocess communication provides a mechanism to allow the cooperating
processes to communicate with each other and to synchronize their actions.
Interprocess-communication is best provided by a message system.
51. Define deadlock?
A process request resource; if the resources are not available at that
time, the process enters a wait state. It may happen that waiting processes
will never again change state, because the resources they have requested are
held by other waiting processes. This
situation is called a deadlock.
52. What are the four conditions under which a deadlock situation can
arise?
a. Mutual exclusion
b. Hold and wait
c. No preemption
d. Circular wait
53. Short notes on direct communication.
In the direct communication, each process that wants to communicate must
explicitly name the recipient or sender of the communication. In this
scheme, the send
and receive primitives are defined as follows:
Send (P, message). Send a message to process P.
Receive (Q, message). Receive message from process Q.
54. What are the methods for dealing the deadlock problem?
i. Use a protocol to ensure that the system will never enter a deadlock
state.
ii. Allow the system to enter the deadlock state and then recover.
iii. Ignore the problem all together, and pretend that deadlocks never
occur in the
system.
55. Write short note on 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. Vertices is partitioned into; P the set consisting of all
processes in the system
and R the set consisting of all resource types in the system.
56. Define requested edge and assignment edge.
A directed edge from process Pi to resource type Rj is denoted by PiRj
it signifies that process pi requested an instances of resource type Rj. A directed
edge from resource type Rj to process Pi is denoted by Rj
Pi, it signifies that an instance of resource type has been allocated to
a process Pi. A directed edge PiRj is called a requested type. A directed edge
RjPi is called an assignment edge.
57. Define safe state and unsafe state.
A safe state is not a deadlock state. Conversely, a deadlock state is an
unsafe state.
Not all unsafe states are deadlocks. An unsafe state may lead to a
deadlock.
58. What is deadlock avoidance?
Deadlock avoidance requires that the operating system be given in
advance additional information concerning which resources a process will
request and use during its life time.
59. What is deadlock prevention?
Deadlock prevention is a set of methods for ensuring that at least one
of the necessary cannot hold. These methods prevent deadlocks by constraining
how requests for resources can be made.
60. Differentiate deadlock and starvation.
A set of processes is in deadlock state when every process in the set is
waiting for an event that can be caused only by the other process in the set.
Starvation or indefinite blocking is a situation where processes wait
indefinitely within the semaphore.
61. What is the difference between logical and physical addresses?
An address generated by the CPU is commonly referred to as a logical
address, whereas an address seen by the memory unit is commonly referred to as
physical address.
62. What do you mean by best fit?
Best fit allocates the smallest hole that is big enough. Entire list has
to be searched, unless it is sorted by size. This strategy produces the
smallest leftover hole.
63. What do you mean by first fit?
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-search ended. Searching can be stopped as soon as a free hole that is big
enough is found.
64. 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 are being made to a read-only page.
65. 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.
66. 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.
67. What are the common strategies to select a free hole from the set of
available holes?
a. First fit
b. Best fit
c. Worst fit
68. 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.
69. What are pages and frames?
Paging is a memory management scheme that permits the physical-address
space of a process to be noncontiguous. 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.
70. 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.
71. 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.
72. 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.
73. What is 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.
74. How does page replacement takes place in optimal algorithm?
In Optimal algorithm, it replaces the page that will not be used for the
longest period of time. Optimal algorithm has the lowest page-fault rate of all
algorithms.
75. What is the disadvantage of optimal page replacement algorithm?
Even though optimal algorithm has the smallest page fault-rate, it is
difficult to implement, because it requires future knowledge of the reference
string. As a result, it
is used mainly for comparison studies.
76. Define thrashing?
High paging activity is called thrashing. A process is thrashing if it
is spending more time paging than executing. The page fault rate increases
tremendously during thrashing.
77. How is thrashing prevented using Page-Fault Frequency strategy?
In order to control the page-fault rate, a upper and lower bounds are
established on the desired page-fault rate. If the actual page-fault rate
exceeds the upper limit, the process is allocated with another frame. If it
falls below the lower limit, a frame is removed from that process. Thus, page-fault
rate can be controlled to prevent thrashing.
78. 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.
79. What are the allocation methods of a disk space?
Contiguous allocation
Linked allocation
Indexed allocation
80. What are the drawbacks of contiguous allocation of disk space?
· Suffers from external fragmentation
· Suffers from internal fragmentation
· Difficulty in finding space for a new file.
· Size of the file is to be declared in advance.
81. What are the disadvantages of linked allocation?
· Used only for sequential access of files.
· Space required for the pointers.
· Reliability.
82. What are the advantages of Indexed allocation?
· No external-fragmentation problem
· Solves the size-declaration problems.
· Supports direct access
83. What are the advantages of Contiguous allocation?
· Supports direct access and sequential access
· Number of disk seeks is minimal
84. What are the advantages of Linked allocation?
No external fragmentation
Size of the file does not need to be declared.
85. How Free-space management is implemented using bit vector?
Free-space list is implemented as a bit map or bit vector. Each block is
represented
by 1 bit. If the block is free, the bit is 1; if the block is allocated,
the bit is 0.
86. Define rotational latency?
Rotational latency is the additional time waiting for the disk to rotate
the desired to the disk to rotate the desired sector to the disk head.
87. What are the various Disk-Scheduling algorithms?
· First Come First Served Scheduling
· Shortest Seek Time First Scheduling
· SCAN Scheduling
· C-SCAN Scheduling
· LOOKScheduling
88. What is a file?
A file is a named collection of related information that is recorded on
the secondary storage. Commonly, files represent programs and data. In general,
file is a sequence of bits, bytes, lines, or records.
89. List the various file attributes?
Name,Identifier,Type,Location,Size,Protection,Time,date and user
identification.
90. What are the various file operations?
· Creating a file
· Writing a file
· Reading a file
· Repositioning within a file
· Deleting a file
· Truncating a file.
91. What are the Access methods for files?
Sequential Access
Direct Access
Indexed Access.
92. What is the use of relative block number in direct access?
The relative block number allows the operating system to decide where
the file should be placed , and helps to prevent the user from accessing
portions of the file system that may not be part if his file.
93. 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 directory entries.
94. What are the most common schemes for defining the logical structure
of a directory?
Single-Level Directory
Two-level Directory
Tree-Structured Directories
Acyclic-Graph Directories
General Graph Directory.
95. What is kernel in LINUX Systems?
The kernel is responsible for maintaining all the important abstractions
of the operating system, including things as virtual memory and processes.
96. Name some of the most popular shells?
Bourne shell , Berkley shell , Korn shell
97. What are the components of a LINUX system?
Kernel , System libraries , System utilities
98. What are the components available in the kernel module?
The module management , Driver registration , Conflict resolution
mechanism
99. What do you mean by worst fit?
Worst fit allocates the largest hole. Entire list must be searched,
unless it is sorted by size. This strategy produces the largest leftover hole,
which may be more useful than the smallest leftover hole from a best-fit
approach.
100. What are the advantages of segmentation?
A particular advantage of segmentation is the association of protection
bits with the segments to prevent illegal accesses to memory. Another advantage
involves the sharing of code or data.
thank you...
by oshin