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

Operating System Short Questions Guide

Uploaded by

Niraj Chaudhary
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)
15 views24 pages

Operating System Short Questions Guide

Uploaded by

Niraj Chaudhary
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

8/31/2019 IT 307: Operating

System
Very Short Questions

Sujesh Manandhar
FOR: MORGAN INTERNATIONAL COLLEGE (BIM 8TH SEMESTER)
CONTACT: 9841146073
1

Unit 1

1. What is operating system?


Ans: An operating system is a program that manages a computer’s hardware
and provide a basis for application programs and act as an intermediary
between the computer user and the computer hardware.
2. What are operating system goals?
3. List out the types of operating system?
Ans: Batch operating system, time sharing operating system, distributed
operating system, network operating system, and real time operating system,
open and closed source operating system.
4. What is open source operating system?
Ans: Open source operating system are those available in source code format
rather than as compiled binary code.
5. List out the function of operating system?
Ans: resource management, memory management, process management,
storage management, protection and security.
6. What do you mean by bootstrap program?
Ans: bootstrap program is an initial program which is run when the computer
is powered on which initialize all the aspect of the system form CPU register
to device controller to memory content.
7. What is kernel?
Ans: An operating system is the one program running at all times on the
computer which is known as kernel.
8. How work is processed in batch operating system?
Ans: Batch system processed the job in bulk with predetermined input from
file or other data source. Each users do not interact with computer directly.
They prepare the job which consists of program, data and some control
information about the nature of the job and submit to the operator.
9. What do you mean by real time operating system?
Ans: It is the data processing system in which time interval to process and
responds the input is small i.e. service is provided in less time.

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
2

10. What is trap or exception?


Ans: A trap or exception is a software generated interrupt caused either by
an error (for e.g. division by zero) or by specific request from user program.
11. List out the types of operating system structure?
Ans: simple structure, layered approach, microkernel.
12. What do you mean by thread?
Ans: Threads like process are a mechanism to allow a program to do more
than one thing at a time. Thread is the basic unit of CPU utilization; it
comprises a thread id, a program counter, register set and stack.
13. What are the advantages of multithreading?
Ans: responsiveness, resource sharing, economy.
14. What is Pthreads?
Ans: It refers to the POSIX standard defining an API for thread creation and
synchronization. This is a specification for thread behavior not an
implementation.
15. List out the models of multithreading?
Ans: many to one model, one to one model, many to many model.
16. What do you mean by resource in term of operating system?
Ans: operating system resource are all the physical and virtual component of
limited availability within a computer system. Data, routines, file storage,
CPU time, input output device, network connection, memory areas etc. are
operating system resources.

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
3

Unit 2
1. Define process.
Ans: A process is a program in execution. When the program is loaded into
the memory it becomes process and it is divided into four section: stack, heap,
text and data.
2. What does process’s stack contains?
Ans: process stack contains temporary data like function, parameter, return
address and local variables.
3. What does data section contains?
Ans: data section contains global variable and includes heap also which is a
memory that is dynamically allocated during process run time.
4. What is a program?
Ans: Program is a passive entity such as file containing a set of instruction
stored on the disk whereas process is an active entity with a program counter
specifying the next instruction to execute and a set of associated resources.
5. List out the state of process?
Ans: new, running, waiting, ready and terminated.
6. What is Process Control Block (PCB)?
Ans: It is the data structure maintained by the operating system for every
process which simply serves as the repository for an information that may vary
from process to process.
7. What might be the content of PCB?
Ans: process state, program counter, CPU register, CPU scheduling
information, memory management information, accounting information, I/O
status information.
8. What is process context switching?
Ans: it is the process of saving the state of current process to switch the CPU
to another process. This task is known as context switch. Because of this CPU
can resumes the process execution from the same point at which it has been
stopped.
9. What happens when the context switch occur?

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
4

Ans: When a context switch occur the kernel saves the context of old process
in its PCB and load the saved context of the new process scheduled to run.
10. What is process address space?
Ans: An address space is the range of valid address in the memory that are
available for the program or process i.e. the memory, process and program can
access. It means a space that is allocated in memory for a process.
11. What are the segments of usable address?
Ans: A text segment that contains the executable image of the program. A data
segment contains the heap of dynamically allocated data. A stack segment
contains the function call stack.
12. What is the work of fork (), exec (), join (), exit ()?
Ans: the work of fork () is to create new process. The work of exec () is to
replace the process’s memory space with new program and starts its execution.
The work of join is to wait for termination of the current running child process.
The work of exit () is to terminate the process execution.
13. What is zombie process?
Ans: A process that has been terminated but whose parent has not yet called
wait() is known as zombie process.
14. What is independent and cooperating process?
Ans: Any process that does not shares the data with any other process is
independent process. Such process cannot affect or be affected by the other
processes executing in the system. Any process that shares data with other
processes is a cooperating process. Such process can affect or be affected by
other process executing in the system.
15. What are the ways of interprocess communication?
Ans: shared memory and message pasing.
16. How message are passed between processes using shared memory?
Ans: In shared memory, a region of the memory that is shared by the
cooperating process is established. The process can then exchange information
by reading and writing data to the shared region.
17. How message is passed in direct communication?

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
5

Ans: Under direct communication, each process that wants to communicate


must explicitly name the recipient or sender of the communication. This
scheme exhibits either symmetry in addressing where both the sender and the
receiver process must name the other to communicate or asymmetry in address
where only sender name the recipient but recipient is not required to name the
sender.
18. How message is passed in in-direct communication?
Ans: With the indirect communication the message are sent to receive from
mail box or ports. Each mail-box have a unique identification and can be view
abstractly as an object into which message can be placed and removed by
process. Two process can communicate if they have shared mail-box.
19. What is the work of scheduler?
Ans: the work of scheduler is to select the appropriate process from the queue
for execution.

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
6

Unit 3

1. What do you mean by scheduling?


Ans: scheduling is the process which allows one process to use the CPU while
execution of another process is in hold due to unavailability of any resources
like CPU cycle time, I/O etc. Its aim is to utilize the CPU time up to maximum
level.
2. What is the work of CPU scheduler?
Ans: This scheduler selects the process from the group of processes in memory
that are ready to execute and allocates the CPU to that process.
3. In which situation CPU scheduling decision takes place?
 When a process switches from the running state to the waiting state. For
e.g. the result of an I/O request or an invocation of wait() for the
termination of child.
 When a process switches from running state to the ready state for e.g.
when an interrupt occur.
 When a process switches from the waiting state to ready state for e.g. at
completion of I/O
 When a process terminates.
4. Differentiate between preemptive and non-preemptive scheduling?
Preemptive Scheduling Non-Preemptive Scheduling

CPU is allocated to process for limited CPU is allocated to process until it


time finish execution or terminate or
switches to waiting state.
The executing process are interrupted The process are not interrupted in the
in middle of execution if highest middle of the execution and other
priority process will arrives process have to wait until running
process terminates
There is overhead of switching the No overhead of switching the process
process from ready to running state from ready to running state
and maintaining the ready queue.
It suffers from starvation problem It may also suffer starvation if a
because the low priority process have process with longer burst time is
to wait if high priority processes running CPU.
frequently arrives.

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
7

It is flexible as it allows critical It is rigid


process to execute first
It is cost associated as it has to It is not cost associated
maintain the integrity of shared data

5. What is the work of dispatcher?


Ans: the work of dispatcher involves switching the context, switching to user
mode, jumping to the proper location in the user program to restart that
program.
6. What is dispatcher?
Ans: Dispatcher is the module or component involved in CPU scheduling that
gives the control of the CPU to the process selected by the short-term
scheduler.
7. What is dispatch latency?
Ans: The time it takes for dispatcher to stop one process and start another
process is known as dispatch latency.
8. What are the criteria for scheduling?
Ans: CPU utilization, throughput, turnaround time, waiting time and response
time.
9. What is CPU utilization and throughput?
Ans: CPU utilization of the process of keeping the CPU as busy as possible
i.e. maximum using of CPU or not keeping CPU idle. Throughput is the
measure of work or measure of number of process that are completed per time.
10. What is turnaround time, waiting time and response time?
Ans: The interval from the time of submission of the process to the time of
completion is turnaround time. Mathematically:
Mathematically, Turnaround time = Complete Time (CT) – Burst Time (BT)
Waiting time is the sum of the period spent waiting in the ready queue. CPU
scheduling algorithm only affects the amount of time that a process spends
waiting in the ready queue. Mathematically:
Waiting Time = Total turnaround time – Burst time

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
8

Response time is measure of the time from the submission of a request until
the first response is produced. It is the time process takes to start responding
not the time it takes to output the response.
11. What do you mean by starvation problem?
Ans: If there are more high priority process then low priority process have to
wait for longer time. This can leave some low priority process waiting
indefinitely. This is known as starvation problem.
12. What is aging?
Ans: it is the solution for the starvation problem which involves gradually
increasing the priority of the process that wait in the system for a long time.
13. What is interrupt latency?
Ans: Interrupt latency refers to the period of time from the arrival of an
interrupt at the CPU to the start of the routine that service the interrupt.

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
9

Unit 4

1. What is process synchronization?


Ans: Process synchronization means sharing system resources by processes in
such a way that, concurrent access to shared data is handled thereby
minimizing the chance of inconsistent data.
2. What is race condition?
Ans: when several process access and manipulate the same data concurrently
and the outcome of the execution depends on the particular order in which the
access takes place known as race condition.
3. What is critical section?
Ans: Critical section is a piece of code that access a shared resources (data
structure) that must not be concurrently accessed by more than one thread of
execution. If a process at any point of time, wants to access common sharable
variable, table or file then the process is trying to enter in its critical section.
4. What are the condition that must be satisfy to solve critical section
problem?
Ans: mutual exclusion, progress and bounded waiting.
5. List out the types of solution for critical section problem?
And: Peterson solution, semaphore, mutex lock, synchronization hardware.
6. What is semaphore?
Ans: Semaphore is a resource that contains an integer value and allows process
to synchronize by testing and setting this value on a single atomic operation.
It is an integer variable, apart from initialization is accessed through two
standard atomic operation: wait () and signal ().
7. Differentiate between counting and binary semaphore?
8. What is the disadvantage of semaphore?
Ans: The disadvantage of semaphore is busy waiting that is when one process
is in critical section then other process that request for critical section are loop
indefinitely until the process exit from critical section.
9. How mutex lock works:

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
10

Ans: Here, a process must acquire the lock before entering a critical section
and releases the lock when it exist from the critical section. The acquire ()
function acquires the lock and release () function releases the lock.
10. What is deadlock?
Ans: Deadlock is a situation where a set of processes are blocked because each
process is holding a resource and waiting for another resource acquired by
some other process. For e.g. when two train approach each other at a crossing
both shall come to a full stop and neither shall start up again until the other
has gone.
11. What are the condition for deadlock?
Ans: A deadlock situation can arise if the following conditions hold
simultaneously in a system: mutual exclusion, hold and wait, no preemption
and circular wait.
12. What are the methods for handling deadlock?
 Protocols can be used to prevent or avoid deadlock ensuring that
system will never enter a deadlock state
 Allowing the system to enter a deadlock state, detect it and recover
 Ignoring the problem and pretending that deadlock never occur in
the system.
13. What is deadlock prevention?
Ans: it is a technique that provides a set of method to ensure that at least one
of the necessary conditions (mutual exclusion, hold and wait, no preemption
and circular wait) cannot hold.
14. What are the deadlock avoidance mechanism?
Ans: resource allocation graph algorithm and bankers algorithm.
15. Define mutual exclusion, hold and wait?
Ans: in this, at least one resource must be held in a non-sharable mode i.e.
only one process at a time can use the resource. If another process request for
such resource then the process must be delayed until the resource has been
released.
In hold and wait, a process must be holding at least one resource and waiting
to acquire additional resources that are currently being held by other
processes.

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
11

Unit 5

1. What is memory management?


Ans: Memory management is the functionality of an operating system which
handles or manage primary memory, keeps tracks of each and every memory
location and moves process back and forth between the main memory and
disk during execution. It is not only concerned with accessing the memory
but also for correct operation and protection required in memory for smooth
execution.
2. What is the work of base and limit register?
Ans: base register holds the smallest legal physical memory address. The limit
register specifies the size of the range. For e.g. if the base register holds
300040 and the limit register is 120900 then the program can legally access
all addresses from 300040 to 420939.
3. What is address binding?
Ans: Address binding refers to mapping of such logical address to physical
address. Each binding is the mapping form one address space to another.
4. List out the different representation of the address?
Ans: Symbolic address, relative address and physical address.
5. What is logical and physical address?
Ans: An address generated by the CPU is commonly referred to as a logical
address. It is generated by the CPU while a program is running. This address
is used as a reference to access the physical memory location by CPU.
An address seen by the memory unit i.e. the one loaded into the memory
address register of the memory is commonly referred as physical address. It
identifies a physical location of required data in memory.
6. What is logical and physical address space?
Ans: The set of all logical addresses generated by a program is a logical
address space. The set of all the physical address corresponding to the logical
addresses is a physical address space.

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
12

7. Differentiate between logical and physical address?


Logical Address Physical Address
It is generated by the CPU in It is the exact location that exist in
perspective of program memory unit.
The set of all logical addresses The set of all the physical address
generated by a CPU in reference to corresponding to the logical addresses
program is a logical address space. is a physical address space.

The logical address does not exist Physical address is the location in the
physically in the memory memory that can be accessed
physically
User can view the logical address of User can never view the physical
program address of memory
User can use the logical address to Logical address must convert to
access physical address. physical address in order to execute
program.
Generated by CPU Computed by MMU

8. What is dynamic loading and dynamic linking?


Ans: Dynamic loading is a mechanism in which only the required routines are
loaded into memory first and other routines are loaded only when they are
required or called i.e. a routine is not loaded until it is called.
Dynamic linking is the mechanism in which all the required system libraries
are linked or reference to a user program whenever it is required or run i.e.
system libraries are not linked until execution time
9. What is stub?
Ans: A stub is a piece of code that indicates how to locate the appropriate
library routines or how to load the library if the routine is not already present.
When a stub is executed it checks to see whether the needed routine is already
in memory or not. If it is not program load the routine into memory.
10. What is external and internal fragmentation?
Ans: External fragmentation is a problem that exist when there is enough
total memory space to satisfy a request but request cannot be allocated due to
lack of available contiguous memory.
Internal fragmentation is a problem that exist when the process cannot use
or fully utilize all the space of allocated memory due to the size of process less

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
13

than exact space of memory. That is unused memory that is internal to


partition.
11. What do you mean by compaction?
Ans: it is the solution to external fragmentation which shuffle the memory
content so as to place all free memory together in one large block.
12. What is swapping?
Ans: A swapping is the mechanism in which process can be swapped or
replaced temporarily out of main memory to secondary storage (disk) and
make that memory available to another process.
13. What is virtual memory?
Ans: Virtual memory is a technique that allows the execution of the processes
that are not completely in a memory. Virtual memory involves the separation
of logical memory as perceived by users from physical memory. This
separation allows an extremely large virtual memory to be provided for user
when only a smaller physical memory is available
14. What is virtual address space?
Ans: it refers to the logical view of how a process is stored in memory. This
view is that a process begins at a certain logical address (say 0) and exist in
contiguous memory.
15. What do you mean by page hit and page fault?
Ans: If a CPU request a page that is already available in main memory then it
causes page hit. If a CPU request the page that is not in main memory or have
not brought in main memory then it causes a page fault.
16. How first fit, best fit and worst bit works?
17. Why worst fit is better than best fit?
Ans because worst fit left the big memory gap or hole such that left out portion
will be big enough to be useful for other process. It reduces the rate of
production of small gap.

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
14

Unit 6

1. What is a file?
Ans: A file is a named collection of related information that is recorded on
secondary storage. Commonly file represents program both source and object
forms and data.
2. What is source and executable file?
Ans: A source file is a sequence of function each of which is further organized
as declarations followed by executable statement. An executable file is a
series of code section that the loader can bring into memory and execute.
3. What are the attributes of file?
Ans: name, identifier, type, location, size, protection, time, data and user
identification.
4. List out the types of file access method?
Ans: sequential access, direct access, index access.
5. How file is accessed in sequential access mode?
Ans: In this access method, information in the file is processed in order,
one record after the other. A read operation read_next() reads the next
portion of the file and causes a pointer to move ahead by one. Similarly,
the write operation write_next() appends to the end of the file and advances
to the end of newly written material i.e. the new end of a file.
6. How file is accessed in direct access mode?
Ans: Direct access is also known as relative access in which a file is made
up of fixed length logical record that allow programs to read and write
records rapidly in no particular order. read_next() is modified as read(n)
and write_next() is modified as write(n) where n is the block number. The
block number provided by the user is a relative block number.
7. What is directory?
Ans: A directory is a location for storing a file on a computer i.e. a container
that is used to contain folder and file. It organizes the file and folder into
hierarchical manner.
8. What are the operation that can be performed in directory?

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
15

Ans: search for a file, create a file, delete a file, list a directory, rename a file
and traverse a file.
9. List out the structure of directory?
Ans: Single level directory, two level directory, tree structure directory,
acyclic graph directory and general graph directory.
10. What do you mean by mounting:
Ans: Mounting is a process by which operating system makes files and
directories on a storage device (such as hard drive, CD-ROM etc.) available
for users to access via the computers file system. Unmounting is a process in
which the operating system cuts off all the user access to file and directories
on the mount file, making the storage device safe for removal.
11. What are the file allocation method:
Ans: contigous allocation, linked allocation, indexed allocation.
12. What is free space management?
Ans: It is the process of reusing the space of disk from the deleted files for
new files. To keep the track of free disk space the system maintains a free
space list. The free space list records all free disk block (those not allocated to
some file or directory).
13. How free space list can be implemented?
Ans: using bit vector, linked list, grouping and counting.
14. What is seek time, rotational latency and disk bandwidth?
Ans: seek time is the time for the disk arm to move the heads to the cylinder
containing the desired sector. Rotational latency is the additional time for the
disk to rotate the desired sector to the disk head. The disk bandwidth is the
total number of bytes transferred divided by the total time between the first
request for service and the completion of the last transfer.
15. What is swap space?
Ans: Swap space is the space in the secondary memory which is a substitute
of physical memory and is used as virtual memory which contains process
memory image. Swap space helps the computer’s operating system in
pretending that it have more RAM that it actually has. It is also called swap
file.
16. What is bit vector?

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
16

Ans: It is also known as bit map in which each block is represented by 1 bit.
If the block is free the bit is 1. If the block is allocated then the bit is 0.
17. How grouping works:
Ans: This approach stores the n free block into first free block i.e. first block
that is free stores the address of n free block. Out of these n block, n-1 block
are actually free and last block contains the address of next free n block.
18. How counting works?
Ans: Here, rather than keeping the list of n free disk’s address the address of
the first free block and the number of n of free contiguous free block that
follow the first block is recorded in list. Each entry in the free space list then
consists of a disk address and a count.

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
17

Unit 7
1. What is protection?
Ans: Protection refers to a mechanism for controlling the access of program,
process or users to the resource defined by a computer system. This
mechanism must provide a means for specifying control to be imposed
together with the means of enforcement.
2. What is protection domain and access right?
Ans: A domain is a collection of access right in an ordered pair <object-
name, right-set>. The ability to execute operation on an object is an access
right.
3. What is access control?
Ans: It is the process of controlling the operation of the process on the
resources of the system by some means like creating access right for each
user based on the her role, creating user account and password in control list
etc. It protects the data from unauthorized read and write operations.
4. What is discretionary, mandatory and role based access control?
Ans: in discretionary access control owner or administrator grant the
privilege who can access the resource in which mode.
In mandatory, which data and users are classify into various security level
and permit the user to access the resource based on his/her security
classification.
In role based, policies and privilege are enforced based on the concept of
role i.e. it restricts the access to the resources based on individual or groups
defined by business function rather than identities of individual user.
5. What do you mean by security?
Ans: Security refers to the specified steps or measures used to protect the
system from internal as well as external threat, unauthorized access, remote
intrusion etc.
6. What is threat, attack and attacker?
Ans: A threat is a potential violation of security, which exist when there is
circumstances, capability, action or event that can breach a security and cause
harm.
Those action that can cause the security violation to occur is said to be attack.
Those who execute such action or cause them to be executed are called
attackers.
7. What is denial of service and denial of receipt?

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
18

Ans: denial of service is a long term inhibition of service. The attacker prevent
the server from providing a service.
Denial of receipt is a false denial an entity received some information or
message. It is a form of deception.
8. What is authentication and authorization?
Ans: Authentication is the binding of an identity to a subject. It is the process
of determining whether someone or something is, in fact who or what it is
declared to be.
Authorization is the process of checking the authenticated user’s privilege or
permission to access the resource of the system. It is the process by which
entity gets permission to access a resource or to perform a restricted operation.
9. Differentitate between authentication and authorization?
Ans:
Authentication Authorization
It is the process of checking a user’s Authorization is the process of
details to identify him and to grant checking the authenticated user’s
access him to the system. privilege or permission to access the
resource of the system
Checks the user’s or process’s details Checks user’s privilege to access
for identification resources
It verifies user’s credential It validates user permission
Form authentication entity gets access From authorization entity gets
to the system permission to access a resource or to
perform a restricted operation.
Occurs before authorization Occurs after authentication
Some mechanism used for Some mechanism used for
authentication are user passwords, authorization are access right based on
biometric, one time password etc. role, owner or group.
For example: a student should For example: he can access the books,
authenticate himself before accessing articles, videos and other material
library management system based on the permission given to him

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
19

10. Differentiate between security policy and security mechanism?


Ans:
Security Policy Security mechanism
Security policy is just a statement Security mechanism is a procedure
about what is allowed and not allowed how to implement the security policy
to do in system
It is the set of rules or defined It is the exact tools, methodology or
protection mechanism to be used to procedure to enforce security
enforce security
Policies decide what will be done. Mechanism determines how
something will be done.
Without policy it is impossible to Without mechanism it is not possible
determine what is permissible, what is to enforce a security policy.
not allowed, what mechanism is
required etc.
For example: user must be For example: user must inset their
authenticated to the ATM before any debit card and pin number to get
transaction. It is a security policy authenticated

11. What is encryption and decryption?


Ans: Encryption is the process of converting the plain text into another
separate non-understandable word using encryption algorithm.
Decryption is the process of converting cipher text into known plain text using
decryption algorithm.

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
20

Unit 8

1. What is device management?


Ans: Device management is the process of managing the implementation,
operation and maintenance of physical or virtual device. Device controller
works like an interface between a device and device driver.
2. What is poling?
Ans: Poling is the process by where the computer or controlling device waits
for an external device to check for its readiness or state. It is a simplest way to
communicate with processor. Polling is the process of periodically checking
the status of the device to see if it is time for the next I/O operation.
3. What is DMA?
Ans: DMA means CPU grants I/O authority to read from or write to memory
without its involvement. That is DMA controller controls the exchange of data
between main memory and the I/O device and CPU is only involved at the
beginning and end of the transfer an interrupted only after entire block has
been transferred.
4. What is I/O interface?
Ans: The method that is used to transfer information between internal storage
and external I/O devices is known as I/O interface.
5. List out the different ways of data transfer from different devices?
Ans: Character stream or block, sequential or random access, synchronous or
asynchronous, sharable or dedicated, read-write, read only or write only.
6. How character stream transfer data?
Ans: A character stream device transfer bytes one by one and basic system
calls in character interface enable an application to get () or put () one character
at a time. A keyboard is an example of device that is accessed through a
character stream interface.
7. How block device transfer data?
Ans: Block device transfer a block of byte as a unit. The block device interface
captures all the aspects necessary for accessing disk drives and other block
oriented device.

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
21

8. What is device driver?


Ans: Device driver is a computer program that operates or controls a particular
types of device attached to a computer. Drivers are hardware dependent and
operating system specific and enables one or more hardware device to
communicate with operating system.
9. What is serial communication?
Ans: It is a method of communicating data between devices in which the
individual data bits being sent sequentially. Serial communication may be
asynchronous and synchronous.
10. What is direct access storage device?
Ans: Any device that can directly read and write to a specific place on a disk.
It stores the data in discrete location with address. Example of this type of
device are hard drive, optical drives and most magnetic storage device.
11. What is sequential access storage device?
Ans: It is a class of data storage device that read stored data in a sequence.
Sequential access devices are usually a form of magnetic storage or optical
storage. Sequential access is the reading of any file by searching from the
storage device from the beginning.

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
22

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)
23

Prepared By: Sujesh Manandhar For: Morgan International College (BIM 8th Sem.)

Common questions

Powered by AI

Preemptive scheduling allows a high-priority process to interrupt a currently running lower-priority process, which leads to flexibility and allows critical processes to execute first. However, it incurs an overhead due to the necessity of switching processes, which can lead to a problem known as starvation if low-priority processes get postponed indefinitely . Non-preemptive scheduling, on the other hand, runs a process to completion before switching, eliminating the overhead of frequent switching. However, this lack of flexibility can keep the CPU idle if a process gets blocked and can also lead to starvation if a process with a longer burst time runs for a lengthy period .

Direct Memory Access (DMA) enhances system performance by allowing peripheral devices to send or receive data to/from memory without constant CPU intervention. This reduces the CPU's workload, as it only gets involved at the beginning and end of the data transfer. Traditional I/O operations require the CPU to be involved continuously, leading to increased CPU overhead and slower data transfer rates. DMA significantly speeds up data transfer processes, especially important in applications requiring intensive data movement between peripherals and memory .

The CPU scheduler is responsible for selecting the process from the ready queue that is ready to execute and then assigning CPU time to it, which is crucial for balancing the workload and optimizing CPU performance. The dispatcher, however, is involved in the actual mechanism of transferring control of the CPU to the process selected by the scheduler. It handles context switching, changing to user mode, and restarting process execution. While the scheduler mainly decides which process to run, the dispatcher executes the instructions needed for the transition .

A race condition occurs when multiple processes access and modify shared data concurrently and the program's behavior is contingent on the sequence in which the access takes place. This often leads to unpredictable results and can compromise data consistency and system stability. It can happen, for example, when processes are performing read and write operations on shared variables without adequate synchronization measures, such as mutex locks or semaphores. Race conditions can result in various bugs and vulnerabilities in systems, thus affecting reliability negatively .

Mutual exclusion ensures that only one process can be in its critical section at any time, preventing conflicting operations on shared resources. Progress prevents processes from getting into a deadlock whereby no process proceeds because they are all in some state of waiting. Bounded waiting ensures that every process eventually gets a chance to enter its critical section, preventing indefinite postponement and solving potential starvation issues. All these conditions work together to maintain data consistency and system stability in a multi-tasking environment .

High dispatch latency in a multitasking operating system implies a significant delay in transitioning control from one process to another. This can lead to decreased system responsiveness and slower execution of processes, particularly in systems where quick context switches are critical, such as real-time systems. High latency can increase waiting times and reduce throughput, as the time spent on switching processes adds to the overall execution time, impacting system efficiency .

Process context switching is crucial for multitasking as it involves storing the state (context) of a currently running process so that it can resume from the same point later, enabling the CPU to switch between processes efficiently. This involves saving the old process's context in the Process Control Block (PCB) and loading a new process's context onto the CPU to resume its execution. The ability to save and restore process states means multiple processes can be managed concurrently, leading to optimized CPU utilization and improved system responsiveness .

Semaphores and mutex locks are both used to control access to shared resources. A semaphore can be a signaling mechanism and is not bound to a single thread; it can access multiple processes. It uses two atomic operations, wait() and signal(). Mutex locks, however, are binary and primarily used to control access by a single thread at a time, making it exclusive to that particular thread until it is released. This distinction gives semaphores more versatility for complex signaling scenarios, whereas mutex locks are efficient for exclusive access .

The Process Control Block (PCB) serves as a data structure that stores all the necessary information related to a specific process, including its current state, program counter, CPU register contents, memory management information, and I/O status. It is essential for context switching, as the operating system uses the PCB to save the current state of a process when it is not currently executed, allowing it to resume from the same point at a later time. This is fundamental to the multitasking capabilities of an operating system .

Discretionary Access Control (DAC) is based on the assumption that the resource owner determines access rights; it offers flexibility but can lead to inconsistent security enforcement. Mandatory Access Control (MAC) involves strict security classifications, with permissions being predetermined and unchangeable by users, leading to more robust and uniform security enforcement. Role-Based Access Control (RBAC) organizes permissions according to user roles rather than individual identities, efficiently handling large user groups by assigning specific access rights based on organizational roles, making it easier to manage permissions in larger systems .

You might also like