SlideShare a Scribd company logo
OPERATING SYSTEM
INTERVIEW QUESTIONS
BASIC QUESTIONS WITH ANSWERS
1. What is an operating system?
 An operating system is a program that acts as an intermediary between the user and
the computer hardware. The purpose of an OS is to provide a convenient environment
in which user can execute programs in a convenient and efficient manner.
2. What are the different operating systems?
 Batched operating systems
 Multi-programmed operating systems
 timesharing operating systems
 Distributed operating systems
 Real-time operating systems
3. What are the basic functions of an operating system?
 Operating system controls and coordinates the use of the hardware among the various
applications programs for various uses. Operating system acts as resource allocator and
manager. Also operating system is control program which controls the user programs to
prevent errors and improper use of the computer. It is especially concerned with the
operation and control of I/O devices.
4. What is kernel?
 Kernel is the core and essential part of computer operating system that provides basic
services for all parts of OS.
5. What is difference between micro kernel and macro kernel?
 Micro kernel is a kernel which run services those are minimal for operating system
performance. In this kernel all other operations are performed by processor.
 Macro Kernel is a combination of micro and monolithic kernel. In monolithic kernel all
operating system code is in single executable image.
6. What is dead lock?
 Deadlock is a situation or condition where the two processes are waiting for each other
to complete so that they can start. This result both the processes to hang.
7. What is a process?
 A program in execution is called a process.
 Processes are of two types:
1. Operating system processes
2. User processes
8. What are the states of a process?
 New
 Running
 Waiting
 Ready
 Terminated
9. What is starvation and aging?
 Starvation is Resource management problem where a process does not get the
resources it needs for a long time because the resources are being allocated to other
processes.
 Aging is a technique to avoid starvation in a scheduling system.
10. What is semaphore?
 Semaphore is a variable, whose status reports common resource, Semaphore is of two
types one is Binary semaphore and other is Counting semaphore.
11. What is context switching?
 Transferring the control from one process to other process requires saving the state of
the old process and loading the saved state for new process. This task is known as
context switching.
12. What is a thread?
 A thread is a program line under execution. Thread sometimes called a light-weight
process, is a basic unit of CPU utilization; it comprises a thread id, a program counter,
a register set, and a stack
13. What is process synchronization?
 A situation, where several processes access and manipulate the same data concurrently
and the outcome of the execution depends on the particular order in which the access
takes place, is called race condition. To guard against the race condition we need to
ensure that only one process at a time can be manipulating the same data. The
technique we use for this is called process synchronization.
14. What is virtual memory?
 Virtual memory is hardware technique where the system appears to have more memory
that it actually does. This is done by time-sharing, the physical memory and storage
parts of the memory one disk when they are not actively being used.
15. What is thrashing?
 It is a phenomenon in virtual memory schemes when the processor spends most of its
time swapping pages, rather than executing instructions. This is due to an inordinate
number of page faults.
16. What is fragmentation? Tell about different types of fragmentation?
 When many of free blocks are too small to satisfy any request then fragmentation
occurs. External fragmentation and internal fragmentation are two types of
fragmentation. External Fragmentation happens when a dynamic memory allocation
algorithm allocates some memory and a small piece is left over that cannot be
effectively used. Internal fragmentation is the space wasted inside of allocated
memory blocks because of restriction on the allowed sizes of allocated blocks.
17. What are necessary conditions for dead lock?
 1. Mutual exclusion (where at least one resource is non-sharable)
 2. Hold and wait (where a process holds one resource and waits for other resource)
 3. No pre-emption (where the resources can’t be pre-empted)
 4. Circular wait (where p[i] is waiting for p[j] to release a resource. i = 1,2,…n
j=if (i!=n) then i+1
else 1 )
18. What is cache memory?
 Cache memory is random access memory (RAM) that a computer microprocessor can
access more quickly than it can access regular RAM. As the microprocessor processes
data, it looks first in the cache memory and if it finds the data there (from a previous
reading of data), it does not have to do the more time-consuming reading of data from
larger memory.
19. What is logical and physical addresses space?
 Logical address space is generated from CPU; it bound to a separate physical address
space is central to proper memory management. Physical address space is seen by the
memory unit. Logical address space is virtual address space. Both these address space
will be same at compile time but differ at execution time.
20. Differentiate between Complier and Interpreter?
 An interpreter reads one instruction at a time and carries out the actions implied by
that instruction. It does not perform any translation. But a compiler translates the
entire instructions
21. What is Throughput, Turnaround time, waiting time and Response time?
 Throughput – number of processes that complete their execution per time unit
 Turnaround time – amount of time to execute a particular process
 Waiting time – amount of time a process has been waiting in the ready queue
 Response time – amount of time it takes from when a request was submitted until the
first response is produced, not output (for time-sharing environment)
22. What is a Real-Time System?
 A real time process is a process that must respond to the events within a certain time
period. A real time operating system is an operating system that can run real time
processes successfully
23. What is Memory-Management Unit (MMU)?
 Hardware device that maps virtual to physical address. In MMU scheme, the value in
the relocation register is added to every address generated by a user process at the
time it is sent to memory.
 ->The user program deals with logical addresses; it never sees the real physical
addresses
24. What is a trap and trapdoor?
 Trapdoor is a secret undocumented entry point into a program used to grant access
without normal methods of access authentication. A trap is a software
interrupt, usually the result of an error condition.
25. When is a system in safe state?
 The set of dispatchable processes is in a safe state if there exists at least one temporal
order in which all processes can be run to completion without resulting in a deadlock.
26. Explain the concept of the Distributed systems?
 Distributed systems work in a network. They can share the network
resources, communicate with each other.
27. What is Marshalling?
 The process of packaging and sending interface method parameters across thread or
process boundaries.
28. What is a long term scheduler & short term schedulers?
 Long term schedulers are the job schedulers that select processes from the job queue
and load them into memory for execution. The short term schedulers are the CPU
schedulers that select a process from the ready queue and allocate the CPU to one of
them.
29. Explain the meaning of mutex.
 Mutex is the short form for ‘Mutual Exclusion object’. A mutex allows multiple threads
for sharing the same resource. The resource can be file. A mutex with a unique name is
created at the time of starting a program. A mutex must be locked from other
threads, when any thread that needs the resource. When the data is no longer used /
needed, the mutex is set to unlock.
30. What is cycle stealing?
 We encounter cycle stealing in the context of Direct Memory Access (DMA). Either the
DMA controller can use the data bus when the CPU does not need it, or it may force the
CPU to temporarily suspend operation. The latter technique is called cycle stealing.
Note that cycle stealing can be done only at specific break points in an instruction
cycle.
31. What is page cannibalizing?
 Page swapping or page replacements are called page cannibalizing.
32. What is cache-coherency?
 In a multiprocessor system there exist several caches each may containing a copy of
same variable A. Then a change in one cache should immediately be reflected in all
other caches this process of maintaining the same value of a data in all the caches s
called cache-coherency.
33. What is a daemon?
 Daemon is a program that runs in the background without user’s interaction. A daemon
runs in a multitasking operating system like UNIX. A daemon is initiated and controlled
by special programs known as ‘processes’.
34. What is pre-emptive and non-pre-emptive scheduling?
 Pre-emptive scheduling: The pre-emptive scheduling is prioritized. The highest priority
process should always be the process that is currently utilized.
 Non-Pre-emptive scheduling: When a process enters the state of running, the state of
that process is not deleted from the scheduler until it finishes its service time.
35. What is SMP?
 To achieve maximum efficiency and reliability a mode of operation known as symmetric
multiprocessing is used. In essence, with SMP any process or threads can be assigned to
any processor.
36. What is process migration?
 It is the transfer of sufficient amount of the state of process from one machine to the
target machine.
37. Difference between Primary storage and secondary storage?
 Primary memory is the main memory (Hard disk, RAM) where the operating system
resides.
 Secondary memory can be external devices like CD, floppy magnetic discs etc.
secondary storage cannot be directly accessed by the CPU and is also external memory
storage.
38. What is busy waiting?
 The repeated execution of a loop of code while waiting for an event to occur is called
busy-waiting. The CPU is not engaged in any real productive activity during this period,
and the process does not progress toward completion.
39. Define compactions.
 Compaction is a process in which the free space is collected in a large memory chunk
to make some space available for processes.
40. What are residence monitors?
 Early operating systems were called residence monitors.
42. What is a device queue?
 A list of processes waiting for a particular I/O device is called device queue.
43. What are the different types of Real-Time Scheduling?
 Hard real-time systems required to complete a critical task within a guaranteed
amount of time.
 Soft real-time computing requires that critical processes receive priority over less
fortunate ones.
44. What is relative path and absolute path?
 Absolute path-- Exact path from root directory.
 Relative path-- Relative to the current path.
45. What are the disadvantages of context switching?
 Time taken for switching from one process to other is pure over head. Because the
system does no useful work while switching. So one of the solutions is to go for
threading when ever possible.
46. What is DRAM?
 Dynamic Ram stores the data in the form of Capacitance, and Static RAM stores the
data in Voltages.
47. What is a data register and address register?
 Data registers - can be assigned to a variety of functions by the programmer. They can
be used with any machine instruction that performs operations on data.
 Address registers - contain main memory addresses of data and instructions or they
contain a portion of the address that is used in the calculation of the complete
addresses.
48. What are local and global page replacements?
 Local replacement means that an incoming page is brought in only to the relevant
process' address space. Global replacement policy allows any page frame from any
process to be replaced. The latter is applicable to variable partitions model only.
49. Explain the concept of the batched operating systems?
 In batched operating system the users gives their jobs to the operator who sorts the
programs according to their requirements and executes them. This is time consuming
but makes the CPU busy all the time.
50. What is SCSI?
 SCSI - Small computer systems interface is a type of interface used for computer
components such as hard drives, optical drives, scanners and tape drives. It is a
competing technology to standard IDE (Integrated Drive Electronics).
51.When is a system in safe state?
 The set of dispatchable processes is in a safe state if there exists at least one temporal
order in which all processes can be run to completion without resulting in a deadlock.
53. What is an idle thread?
 The special thread a dispatcher will execute when no ready thread is found.
54. What is FTDisk?
 It is a fault tolerance disk driver for Windows NT.
55.What is Dispatcher?
 Dispatcher module gives control of the CPU to the process selected by the short-term
scheduler; this involves: Switching context, Switching to user mode, Jumping to the
proper location in the user program to restart that program, dispatch latency – time it
takes for the dispatcher to stop one process and start another running.
56. What is a drawback of MVT?
 ability to support multiple processors
 virtual storage
 source level debugging
57. When does the condition 'rendezvous' arise?
 In message passing, it is the condition in which, both, the sender and receiver are
blocked until the message is delivered.
58. What is process spawning?
 When the OS at the explicit request of another process creates a process, this action is
called process spawning
59. What are the reasons for process suspension?
 swapping
 interactive user request
 timing
 parent process request
60. What are the sub-components of I/O manager in Windows NT?
 Network redirector/ Server
 Cache manager.
 File systems
 Network driver
 Device driver
IMPORTANT QUESTIONS
 VMWARE INC
1. What is the difference between paging and swapping? In windows OS, "My
Computer", we see the option of paging, what does that mean?
 Paging: If a certain memory location is not present in RAM then a page fault
takes place. This causes the page which contains this memory location to be
brought into ram. (Sometimes prefetching can also bring pages into RAM). This
way of dealing with memory in terms of pages is called paging.
 Swapping: When the main memory is full and now if there is a page fault, then
replacement will take place. The page to be evicted is placed in a backing
store (usually dedicated memory on disk). This is swapping. If later this page is
needed, it will be reloaded from backing store
2. When we click on the power button of our Laptop, what happens immediately
and how the windows is loaded?
 once you press the laptop power button the CPU initializes itself from some clock
trigger and then if the battery power is enough it then proceeds and checks systems
ROM BIOS to look for start-up functions and instructions it then checks the POST
check(power on self-test) and then again checks the power and continues to check the
HDD, cd, floppy disks and other peripheral devices connected to it. it then checks the
os line for it boot up we can select the boot sequence and then go ahead for it. then if
your laptop has both UNIX and windows then the grub get loaded and then on we can
select the boot loader.
 MICROSOFT:
1. If we open a new tab in a browser, is it a new process or thread? and what if
we open a new window of the browser?
Depends on the browser. On Chrome, its a new process whenever you open a
tab. On Firefox it is thread. Windows IE a new process is opened.
2. How OS decide how much memory is needed as virtual memory ? Max % of
memory which can be available as virtual memory?
Total Virtual memory depends on the number of processes. If OS does not
find enough space in internal memory then it use external memory for that
process, or other process, to run that process. as all blocks are not needed at
anytime, so OS uses lest required external memory to run that process. but there
is no restriction on size. It depends upon OS performance, and and in some sense
on processing speed.
3. Does it always happen that stack always grows downwards & heap grows
upwards? If its so, then how does OS keeps the heap area protected from the
interference of the stack & vice-versa? If its not, then what factors affect it?
OS version ? Compiler? Anything else?
Actually it is not a RULE that a stack will always grow downwards and the
heap will always grow upwards. It depends on the OS that you are using. But in
most of the modern systems stack generally grows downwards and heap grows
upwards.
In the modern system there is actually no chance of collision. If the stack is full
and it tries to enter into the heap area then you will get a stack overflow error.
On the other hand if heap is full then the call to "malloc()" will return null. Now
it depends on the programmer to check whether malloc() returned null or not.
 BLOOMBERG LP:
1. How do applications communicate with kernel?
Using shell with the help of a system call.
2. What happens if the parent process ends before the child process?
There are a few cases
1. Some parents terminate their child processes
2. Else if the process continues execution such a process is called as orphan
process
3. What is better(why and how): multi processes OR single process with multiple
threads?
 Single Process with multiple threads... Simple reason is that threads are light weight
when compared to processes during context switch. Since the threads of a process
share the same address space, the address space need not be changed every time a
context switch occurs. This is not the same case with different processes.
4. What are the different forms of IPC in UNIX?
 IPC are mainly divided into two catagories
 Local IPC
 Pipes , Message Queue, Semaphore, Sockets, Signals, Shared Memory.
 Remote IPC
 Internet Domain Specific socket
 Transport layer I/f (TLI)
 Remote Procedure call (RPC)
QUESTIONS BASED ON PROBLEMS
1. What is the best solution to external fragmentation problem?
a. Mutual Exclusion
b. Synchronization
c. Priority Queue
d. Paging
Answer: d. Paging
 Paging is the solution to external fragmentation problem which is to permit the logical
address space of a process to be non-contiguous, thus allowing a process to be
allocating physical memory wherever the latter is available.
2. What is the average waiting time for the following processes with non preemptive
SJF (Shortest Job First).
Process Arrival Time Burst Time
P1 0 8
P2 1 4
P3 2 9
P4 3 5
a. 6.5 b. 6.75 c. 7.5 d 7.75
Solution: d. 7.75
 Gantt Chart for non-pre-emptive SJF
 Here the average waiting time is 0 + (8-1) + (17-2) + (12 - 3) = 31/4 = 7.75
P1 P2 P3 P4
0 8 12 17 26
3. What is the average waiting time for the following processes with preemptive SJF
(Shortest Job First).
Process Arrival Time Burst Time
P1 0 8
P2 1 4
P3 2 9
P4 3 5
1. 6.5 2. 6.75 3. 7.5 4. 7.75
Solution: 1. 6.5
Gantt Chart for pre-emptive SJF
 The average waiting time for this example is ((10-1) + (1-1) + (17-2) + (5-3))/4 = 26/4 =
6.5
 So, preemptive SJF is better than SJF.
P1 P2 P4 P1 P3
0 1 5 10 17 26
4. Which of the following is the amount of time to execute a particular process ?
a. Throughput
b. Turnaround time
c. Waiting time
d Response time
Answer: b Turnaround time
 Turnaround time – amount of time to execute a particular process.
5. Which of the following is the number of processes that complete their execution per
time unit?
a. Throughput b. Turnaround time c. Waiting time d. Response time
Answer: a. Throughput
 Throughput – number of processes that complete their execution per time unit.
Turnaround time – amount of time to execute a particular process. Waiting time –
amount of time a process has been waiting in the ready queue. Response time – amount
of time it takes from when a request was submitted until the first response is
produced, not output (for time-sharing environment).
THANK YOU
S SRIRAM
CSE – IV YR
Ad

More Related Content

What's hot (20)

Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
Kumar Pritam
 
Operating system overview concepts ppt
Operating system overview concepts pptOperating system overview concepts ppt
Operating system overview concepts ppt
RajendraPrasad Alladi
 
Deadlock ppt
Deadlock ppt Deadlock ppt
Deadlock ppt
Sweetestangel Kochar
 
Types of Programming Languages
Types of Programming LanguagesTypes of Programming Languages
Types of Programming Languages
Juhi Bhoyar
 
Multiprocessor system
Multiprocessor system Multiprocessor system
Multiprocessor system
Mr. Vikram Singh Slathia
 
Thread scheduling in Operating Systems
Thread scheduling in Operating SystemsThread scheduling in Operating Systems
Thread scheduling in Operating Systems
Nitish Gulati
 
Multi processor scheduling
Multi  processor schedulingMulti  processor scheduling
Multi processor scheduling
Shashank Kapoor
 
Structure of Operating System
Structure of Operating System Structure of Operating System
Structure of Operating System
anand hd
 
Complete Operating System notes
Complete Operating System notesComplete Operating System notes
Complete Operating System notes
Lakshmi Sarvani Videla
 
Services provided by os
Services provided by osServices provided by os
Services provided by os
Sumant Diwakar
 
Distributed operating system(os)
Distributed operating system(os)Distributed operating system(os)
Distributed operating system(os)
Dinesh Modak
 
Threads (operating System)
Threads (operating System)Threads (operating System)
Threads (operating System)
Prakhar Maurya
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
usmankiyani1
 
Ch1-Operating System Concept
Ch1-Operating System ConceptCh1-Operating System Concept
Ch1-Operating System Concept
Muhammad Bilal Tariq
 
deadlock avoidance
deadlock avoidancedeadlock avoidance
deadlock avoidance
wahab13
 
Multiprocessor architecture
Multiprocessor architectureMultiprocessor architecture
Multiprocessor architecture
Arpan Baishya
 
Os Threads
Os ThreadsOs Threads
Os Threads
Salman Memon
 
Computer system architecture
Computer system architectureComputer system architecture
Computer system architecture
venkateswarlu G
 
Kernel. Operating System
Kernel. Operating SystemKernel. Operating System
Kernel. Operating System
pratikkadam78
 
6 multiprogramming & time sharing
6 multiprogramming & time sharing6 multiprogramming & time sharing
6 multiprogramming & time sharing
myrajendra
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
Kumar Pritam
 
Operating system overview concepts ppt
Operating system overview concepts pptOperating system overview concepts ppt
Operating system overview concepts ppt
RajendraPrasad Alladi
 
Types of Programming Languages
Types of Programming LanguagesTypes of Programming Languages
Types of Programming Languages
Juhi Bhoyar
 
Thread scheduling in Operating Systems
Thread scheduling in Operating SystemsThread scheduling in Operating Systems
Thread scheduling in Operating Systems
Nitish Gulati
 
Multi processor scheduling
Multi  processor schedulingMulti  processor scheduling
Multi processor scheduling
Shashank Kapoor
 
Structure of Operating System
Structure of Operating System Structure of Operating System
Structure of Operating System
anand hd
 
Services provided by os
Services provided by osServices provided by os
Services provided by os
Sumant Diwakar
 
Distributed operating system(os)
Distributed operating system(os)Distributed operating system(os)
Distributed operating system(os)
Dinesh Modak
 
Threads (operating System)
Threads (operating System)Threads (operating System)
Threads (operating System)
Prakhar Maurya
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
usmankiyani1
 
deadlock avoidance
deadlock avoidancedeadlock avoidance
deadlock avoidance
wahab13
 
Multiprocessor architecture
Multiprocessor architectureMultiprocessor architecture
Multiprocessor architecture
Arpan Baishya
 
Computer system architecture
Computer system architectureComputer system architecture
Computer system architecture
venkateswarlu G
 
Kernel. Operating System
Kernel. Operating SystemKernel. Operating System
Kernel. Operating System
pratikkadam78
 
6 multiprogramming & time sharing
6 multiprogramming & time sharing6 multiprogramming & time sharing
6 multiprogramming & time sharing
myrajendra
 

Viewers also liked (11)

Operating system
Operating systemOperating system
Operating system
Jessore University of Science & Technology, Jessore.
 
Top 9 operating systems interview questions answers
Top 9 operating systems interview questions answersTop 9 operating systems interview questions answers
Top 9 operating systems interview questions answers
jonhmart036
 
23 deadlock
23 deadlock23 deadlock
23 deadlock
myrajendra
 
12 process control blocks
12 process control blocks12 process control blocks
12 process control blocks
myrajendra
 
Deadlock
DeadlockDeadlock
Deadlock
Gaurav Singh Chandel
 
Operating System Deadlock Galvin
Operating System  Deadlock GalvinOperating System  Deadlock Galvin
Operating System Deadlock Galvin
Sonali Chauhan
 
Os solved question paper
Os solved question paperOs solved question paper
Os solved question paper
Ankit Bhatnagar
 
Top 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and AnswersTop 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and Answers
iimjobs and hirist
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
Harshith Meela
 
Visual Basic Codes And Screen Designs
Visual Basic Codes And Screen DesignsVisual Basic Codes And Screen Designs
Visual Basic Codes And Screen Designs
prcastano
 
Guided Reading: Making the Most of It
Guided Reading: Making the Most of ItGuided Reading: Making the Most of It
Guided Reading: Making the Most of It
Jennifer Jones
 
Ad

Similar to Operating system interview question (20)

OPERATING SYSTEM - SHORT NOTES
OPERATING SYSTEM - SHORT NOTESOPERATING SYSTEM - SHORT NOTES
OPERATING SYSTEM - SHORT NOTES
suthi
 
Firo
FiroFiro
Firo
Firaol Motuma
 
Operating system
Operating systemOperating system
Operating system
abhinavgarg12345
 
Os question
Os questionOs question
Os question
saurav-IT
 
Os
OsOs
Os
manish katara
 
MC 7204 OS Question Bank with Answer
MC 7204 OS Question Bank with AnswerMC 7204 OS Question Bank with Answer
MC 7204 OS Question Bank with Answer
sellappasiva
 
Operating System and related questions
Operating System and related questionsOperating System and related questions
Operating System and related questions
imdurgesh
 
Operating System Simple Introduction
Operating System Simple IntroductionOperating System Simple Introduction
Operating System Simple Introduction
Diwash Sapkota
 
Unit 4 Real Time Operating System
Unit 4 Real Time Operating SystemUnit 4 Real Time Operating System
Unit 4 Real Time Operating System
Dr. Pankaj Zope
 
Operating system Interview Questions
Operating system Interview QuestionsOperating system Interview Questions
Operating system Interview Questions
Kuntal Bhowmick
 
Operating system. short answes and Interview questions .pdf
Operating system. short answes and Interview questions .pdfOperating system. short answes and Interview questions .pdf
Operating system. short answes and Interview questions .pdf
harikrishnahari6276
 
Unit v
Unit vUnit v
Unit v
Jamia Hamdard
 
Operating system
Operating systemOperating system
Operating system
ǷřiţëƧh Chąuhąn
 
Operating system
Operating systemOperating system
Operating system
chetan handa
 
Operating syestem class 9 notes.doc
Operating syestem class 9 notes.docOperating syestem class 9 notes.doc
Operating syestem class 9 notes.doc
vinayakaggarwal9
 
OS ppt.pdf
OS ppt.pdfOS ppt.pdf
OS ppt.pdf
PavanKumarPNVS
 
100-E
100-E100-E
100-E
ANISH KUSHWAHA
 
Process Management Operating Systems .pptx
Process Management        Operating Systems .pptxProcess Management        Operating Systems .pptx
Process Management Operating Systems .pptx
SAIKRISHNADURVASULA2
 
Unit 1os processes and threads
Unit 1os processes and threadsUnit 1os processes and threads
Unit 1os processes and threads
donny101
 
Understanding Basics of OS
Understanding Basics of OSUnderstanding Basics of OS
Understanding Basics of OS
E.M.G.yadava womens college
 
OPERATING SYSTEM - SHORT NOTES
OPERATING SYSTEM - SHORT NOTESOPERATING SYSTEM - SHORT NOTES
OPERATING SYSTEM - SHORT NOTES
suthi
 
MC 7204 OS Question Bank with Answer
MC 7204 OS Question Bank with AnswerMC 7204 OS Question Bank with Answer
MC 7204 OS Question Bank with Answer
sellappasiva
 
Operating System and related questions
Operating System and related questionsOperating System and related questions
Operating System and related questions
imdurgesh
 
Operating System Simple Introduction
Operating System Simple IntroductionOperating System Simple Introduction
Operating System Simple Introduction
Diwash Sapkota
 
Unit 4 Real Time Operating System
Unit 4 Real Time Operating SystemUnit 4 Real Time Operating System
Unit 4 Real Time Operating System
Dr. Pankaj Zope
 
Operating system Interview Questions
Operating system Interview QuestionsOperating system Interview Questions
Operating system Interview Questions
Kuntal Bhowmick
 
Operating system. short answes and Interview questions .pdf
Operating system. short answes and Interview questions .pdfOperating system. short answes and Interview questions .pdf
Operating system. short answes and Interview questions .pdf
harikrishnahari6276
 
Operating syestem class 9 notes.doc
Operating syestem class 9 notes.docOperating syestem class 9 notes.doc
Operating syestem class 9 notes.doc
vinayakaggarwal9
 
Process Management Operating Systems .pptx
Process Management        Operating Systems .pptxProcess Management        Operating Systems .pptx
Process Management Operating Systems .pptx
SAIKRISHNADURVASULA2
 
Unit 1os processes and threads
Unit 1os processes and threadsUnit 1os processes and threads
Unit 1os processes and threads
donny101
 
Ad

Recently uploaded (20)

Botany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic ExcellenceBotany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic Excellence
online college homework help
 
spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)
Mohamed Rizk Khodair
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18
Celine George
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
Botany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic ExcellenceBotany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic Excellence
online college homework help
 
spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)
Mohamed Rizk Khodair
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18
Celine George
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 

Operating system interview question

  • 2. BASIC QUESTIONS WITH ANSWERS 1. What is an operating system?  An operating system is a program that acts as an intermediary between the user and the computer hardware. The purpose of an OS is to provide a convenient environment in which user can execute programs in a convenient and efficient manner. 2. What are the different operating systems?  Batched operating systems  Multi-programmed operating systems  timesharing operating systems  Distributed operating systems  Real-time operating systems 3. What are the basic functions of an operating system?  Operating system controls and coordinates the use of the hardware among the various applications programs for various uses. Operating system acts as resource allocator and manager. Also operating system is control program which controls the user programs to prevent errors and improper use of the computer. It is especially concerned with the operation and control of I/O devices.
  • 3. 4. What is kernel?  Kernel is the core and essential part of computer operating system that provides basic services for all parts of OS. 5. What is difference between micro kernel and macro kernel?  Micro kernel is a kernel which run services those are minimal for operating system performance. In this kernel all other operations are performed by processor.  Macro Kernel is a combination of micro and monolithic kernel. In monolithic kernel all operating system code is in single executable image. 6. What is dead lock?  Deadlock is a situation or condition where the two processes are waiting for each other to complete so that they can start. This result both the processes to hang. 7. What is a process?  A program in execution is called a process.  Processes are of two types: 1. Operating system processes 2. User processes
  • 4. 8. What are the states of a process?  New  Running  Waiting  Ready  Terminated 9. What is starvation and aging?  Starvation is Resource management problem where a process does not get the resources it needs for a long time because the resources are being allocated to other processes.  Aging is a technique to avoid starvation in a scheduling system. 10. What is semaphore?  Semaphore is a variable, whose status reports common resource, Semaphore is of two types one is Binary semaphore and other is Counting semaphore. 11. What is context switching?  Transferring the control from one process to other process requires saving the state of the old process and loading the saved state for new process. This task is known as context switching.
  • 5. 12. What is a thread?  A thread is a program line under execution. Thread sometimes called a light-weight process, is a basic unit of CPU utilization; it comprises a thread id, a program counter, a register set, and a stack 13. What is process synchronization?  A situation, where several processes access and manipulate the same data concurrently and the outcome of the execution depends on the particular order in which the access takes place, is called race condition. To guard against the race condition we need to ensure that only one process at a time can be manipulating the same data. The technique we use for this is called process synchronization. 14. What is virtual memory?  Virtual memory is hardware technique where the system appears to have more memory that it actually does. This is done by time-sharing, the physical memory and storage parts of the memory one disk when they are not actively being used. 15. What is thrashing?  It is a phenomenon in virtual memory schemes when the processor spends most of its time swapping pages, rather than executing instructions. This is due to an inordinate number of page faults.
  • 6. 16. What is fragmentation? Tell about different types of fragmentation?  When many of free blocks are too small to satisfy any request then fragmentation occurs. External fragmentation and internal fragmentation are two types of fragmentation. External Fragmentation happens when a dynamic memory allocation algorithm allocates some memory and a small piece is left over that cannot be effectively used. Internal fragmentation is the space wasted inside of allocated memory blocks because of restriction on the allowed sizes of allocated blocks. 17. What are necessary conditions for dead lock?  1. Mutual exclusion (where at least one resource is non-sharable)  2. Hold and wait (where a process holds one resource and waits for other resource)  3. No pre-emption (where the resources can’t be pre-empted)  4. Circular wait (where p[i] is waiting for p[j] to release a resource. i = 1,2,…n j=if (i!=n) then i+1 else 1 ) 18. What is cache memory?  Cache memory is random access memory (RAM) that a computer microprocessor can access more quickly than it can access regular RAM. As the microprocessor processes data, it looks first in the cache memory and if it finds the data there (from a previous reading of data), it does not have to do the more time-consuming reading of data from larger memory.
  • 7. 19. What is logical and physical addresses space?  Logical address space is generated from CPU; it bound to a separate physical address space is central to proper memory management. Physical address space is seen by the memory unit. Logical address space is virtual address space. Both these address space will be same at compile time but differ at execution time. 20. Differentiate between Complier and Interpreter?  An interpreter reads one instruction at a time and carries out the actions implied by that instruction. It does not perform any translation. But a compiler translates the entire instructions 21. What is Throughput, Turnaround time, waiting time and Response time?  Throughput – number of processes that complete their execution per time unit  Turnaround time – amount of time to execute a particular process  Waiting time – amount of time a process has been waiting in the ready queue  Response time – amount of time it takes from when a request was submitted until the first response is produced, not output (for time-sharing environment) 22. What is a Real-Time System?  A real time process is a process that must respond to the events within a certain time period. A real time operating system is an operating system that can run real time processes successfully
  • 8. 23. What is Memory-Management Unit (MMU)?  Hardware device that maps virtual to physical address. In MMU scheme, the value in the relocation register is added to every address generated by a user process at the time it is sent to memory.  ->The user program deals with logical addresses; it never sees the real physical addresses 24. What is a trap and trapdoor?  Trapdoor is a secret undocumented entry point into a program used to grant access without normal methods of access authentication. A trap is a software interrupt, usually the result of an error condition. 25. When is a system in safe state?  The set of dispatchable processes is in a safe state if there exists at least one temporal order in which all processes can be run to completion without resulting in a deadlock. 26. Explain the concept of the Distributed systems?  Distributed systems work in a network. They can share the network resources, communicate with each other. 27. What is Marshalling?  The process of packaging and sending interface method parameters across thread or process boundaries.
  • 9. 28. What is a long term scheduler & short term schedulers?  Long term schedulers are the job schedulers that select processes from the job queue and load them into memory for execution. The short term schedulers are the CPU schedulers that select a process from the ready queue and allocate the CPU to one of them. 29. Explain the meaning of mutex.  Mutex is the short form for ‘Mutual Exclusion object’. A mutex allows multiple threads for sharing the same resource. The resource can be file. A mutex with a unique name is created at the time of starting a program. A mutex must be locked from other threads, when any thread that needs the resource. When the data is no longer used / needed, the mutex is set to unlock. 30. What is cycle stealing?  We encounter cycle stealing in the context of Direct Memory Access (DMA). Either the DMA controller can use the data bus when the CPU does not need it, or it may force the CPU to temporarily suspend operation. The latter technique is called cycle stealing. Note that cycle stealing can be done only at specific break points in an instruction cycle. 31. What is page cannibalizing?  Page swapping or page replacements are called page cannibalizing.
  • 10. 32. What is cache-coherency?  In a multiprocessor system there exist several caches each may containing a copy of same variable A. Then a change in one cache should immediately be reflected in all other caches this process of maintaining the same value of a data in all the caches s called cache-coherency. 33. What is a daemon?  Daemon is a program that runs in the background without user’s interaction. A daemon runs in a multitasking operating system like UNIX. A daemon is initiated and controlled by special programs known as ‘processes’. 34. What is pre-emptive and non-pre-emptive scheduling?  Pre-emptive scheduling: The pre-emptive scheduling is prioritized. The highest priority process should always be the process that is currently utilized.  Non-Pre-emptive scheduling: When a process enters the state of running, the state of that process is not deleted from the scheduler until it finishes its service time. 35. What is SMP?  To achieve maximum efficiency and reliability a mode of operation known as symmetric multiprocessing is used. In essence, with SMP any process or threads can be assigned to any processor.
  • 11. 36. What is process migration?  It is the transfer of sufficient amount of the state of process from one machine to the target machine. 37. Difference between Primary storage and secondary storage?  Primary memory is the main memory (Hard disk, RAM) where the operating system resides.  Secondary memory can be external devices like CD, floppy magnetic discs etc. secondary storage cannot be directly accessed by the CPU and is also external memory storage. 38. What is busy waiting?  The repeated execution of a loop of code while waiting for an event to occur is called busy-waiting. The CPU is not engaged in any real productive activity during this period, and the process does not progress toward completion. 39. Define compactions.  Compaction is a process in which the free space is collected in a large memory chunk to make some space available for processes. 40. What are residence monitors?  Early operating systems were called residence monitors.
  • 12. 42. What is a device queue?  A list of processes waiting for a particular I/O device is called device queue. 43. What are the different types of Real-Time Scheduling?  Hard real-time systems required to complete a critical task within a guaranteed amount of time.  Soft real-time computing requires that critical processes receive priority over less fortunate ones. 44. What is relative path and absolute path?  Absolute path-- Exact path from root directory.  Relative path-- Relative to the current path. 45. What are the disadvantages of context switching?  Time taken for switching from one process to other is pure over head. Because the system does no useful work while switching. So one of the solutions is to go for threading when ever possible. 46. What is DRAM?  Dynamic Ram stores the data in the form of Capacitance, and Static RAM stores the data in Voltages.
  • 13. 47. What is a data register and address register?  Data registers - can be assigned to a variety of functions by the programmer. They can be used with any machine instruction that performs operations on data.  Address registers - contain main memory addresses of data and instructions or they contain a portion of the address that is used in the calculation of the complete addresses. 48. What are local and global page replacements?  Local replacement means that an incoming page is brought in only to the relevant process' address space. Global replacement policy allows any page frame from any process to be replaced. The latter is applicable to variable partitions model only. 49. Explain the concept of the batched operating systems?  In batched operating system the users gives their jobs to the operator who sorts the programs according to their requirements and executes them. This is time consuming but makes the CPU busy all the time. 50. What is SCSI?  SCSI - Small computer systems interface is a type of interface used for computer components such as hard drives, optical drives, scanners and tape drives. It is a competing technology to standard IDE (Integrated Drive Electronics).
  • 14. 51.When is a system in safe state?  The set of dispatchable processes is in a safe state if there exists at least one temporal order in which all processes can be run to completion without resulting in a deadlock. 53. What is an idle thread?  The special thread a dispatcher will execute when no ready thread is found. 54. What is FTDisk?  It is a fault tolerance disk driver for Windows NT. 55.What is Dispatcher?  Dispatcher module gives control of the CPU to the process selected by the short-term scheduler; this involves: Switching context, Switching to user mode, Jumping to the proper location in the user program to restart that program, dispatch latency – time it takes for the dispatcher to stop one process and start another running. 56. What is a drawback of MVT?  ability to support multiple processors  virtual storage  source level debugging
  • 15. 57. When does the condition 'rendezvous' arise?  In message passing, it is the condition in which, both, the sender and receiver are blocked until the message is delivered. 58. What is process spawning?  When the OS at the explicit request of another process creates a process, this action is called process spawning 59. What are the reasons for process suspension?  swapping  interactive user request  timing  parent process request 60. What are the sub-components of I/O manager in Windows NT?  Network redirector/ Server  Cache manager.  File systems  Network driver  Device driver
  • 16. IMPORTANT QUESTIONS  VMWARE INC 1. What is the difference between paging and swapping? In windows OS, "My Computer", we see the option of paging, what does that mean?  Paging: If a certain memory location is not present in RAM then a page fault takes place. This causes the page which contains this memory location to be brought into ram. (Sometimes prefetching can also bring pages into RAM). This way of dealing with memory in terms of pages is called paging.  Swapping: When the main memory is full and now if there is a page fault, then replacement will take place. The page to be evicted is placed in a backing store (usually dedicated memory on disk). This is swapping. If later this page is needed, it will be reloaded from backing store
  • 17. 2. When we click on the power button of our Laptop, what happens immediately and how the windows is loaded?  once you press the laptop power button the CPU initializes itself from some clock trigger and then if the battery power is enough it then proceeds and checks systems ROM BIOS to look for start-up functions and instructions it then checks the POST check(power on self-test) and then again checks the power and continues to check the HDD, cd, floppy disks and other peripheral devices connected to it. it then checks the os line for it boot up we can select the boot sequence and then go ahead for it. then if your laptop has both UNIX and windows then the grub get loaded and then on we can select the boot loader.
  • 18.  MICROSOFT: 1. If we open a new tab in a browser, is it a new process or thread? and what if we open a new window of the browser? Depends on the browser. On Chrome, its a new process whenever you open a tab. On Firefox it is thread. Windows IE a new process is opened. 2. How OS decide how much memory is needed as virtual memory ? Max % of memory which can be available as virtual memory? Total Virtual memory depends on the number of processes. If OS does not find enough space in internal memory then it use external memory for that process, or other process, to run that process. as all blocks are not needed at anytime, so OS uses lest required external memory to run that process. but there is no restriction on size. It depends upon OS performance, and and in some sense on processing speed. 3. Does it always happen that stack always grows downwards & heap grows upwards? If its so, then how does OS keeps the heap area protected from the interference of the stack & vice-versa? If its not, then what factors affect it? OS version ? Compiler? Anything else?
  • 19. Actually it is not a RULE that a stack will always grow downwards and the heap will always grow upwards. It depends on the OS that you are using. But in most of the modern systems stack generally grows downwards and heap grows upwards. In the modern system there is actually no chance of collision. If the stack is full and it tries to enter into the heap area then you will get a stack overflow error. On the other hand if heap is full then the call to "malloc()" will return null. Now it depends on the programmer to check whether malloc() returned null or not.  BLOOMBERG LP: 1. How do applications communicate with kernel? Using shell with the help of a system call. 2. What happens if the parent process ends before the child process? There are a few cases 1. Some parents terminate their child processes 2. Else if the process continues execution such a process is called as orphan process
  • 20. 3. What is better(why and how): multi processes OR single process with multiple threads?  Single Process with multiple threads... Simple reason is that threads are light weight when compared to processes during context switch. Since the threads of a process share the same address space, the address space need not be changed every time a context switch occurs. This is not the same case with different processes. 4. What are the different forms of IPC in UNIX?  IPC are mainly divided into two catagories  Local IPC  Pipes , Message Queue, Semaphore, Sockets, Signals, Shared Memory.  Remote IPC  Internet Domain Specific socket  Transport layer I/f (TLI)  Remote Procedure call (RPC)
  • 21. QUESTIONS BASED ON PROBLEMS 1. What is the best solution to external fragmentation problem? a. Mutual Exclusion b. Synchronization c. Priority Queue d. Paging Answer: d. Paging  Paging is the solution to external fragmentation problem which is to permit the logical address space of a process to be non-contiguous, thus allowing a process to be allocating physical memory wherever the latter is available.
  • 22. 2. What is the average waiting time for the following processes with non preemptive SJF (Shortest Job First). Process Arrival Time Burst Time P1 0 8 P2 1 4 P3 2 9 P4 3 5 a. 6.5 b. 6.75 c. 7.5 d 7.75 Solution: d. 7.75  Gantt Chart for non-pre-emptive SJF  Here the average waiting time is 0 + (8-1) + (17-2) + (12 - 3) = 31/4 = 7.75 P1 P2 P3 P4 0 8 12 17 26
  • 23. 3. What is the average waiting time for the following processes with preemptive SJF (Shortest Job First). Process Arrival Time Burst Time P1 0 8 P2 1 4 P3 2 9 P4 3 5 1. 6.5 2. 6.75 3. 7.5 4. 7.75 Solution: 1. 6.5 Gantt Chart for pre-emptive SJF  The average waiting time for this example is ((10-1) + (1-1) + (17-2) + (5-3))/4 = 26/4 = 6.5  So, preemptive SJF is better than SJF. P1 P2 P4 P1 P3 0 1 5 10 17 26
  • 24. 4. Which of the following is the amount of time to execute a particular process ? a. Throughput b. Turnaround time c. Waiting time d Response time Answer: b Turnaround time  Turnaround time – amount of time to execute a particular process. 5. Which of the following is the number of processes that complete their execution per time unit? a. Throughput b. Turnaround time c. Waiting time d. Response time Answer: a. Throughput  Throughput – number of processes that complete their execution per time unit. Turnaround time – amount of time to execute a particular process. Waiting time – amount of time a process has been waiting in the ready queue. Response time – amount of time it takes from when a request was submitted until the first response is produced, not output (for time-sharing environment).
  翻译: