Essay Questions Part2
Essay Questions Part2
Is the segment of code that a Process is about changing shared variables, updating
table, writing file.
2) What is Mutual Exclusion in the context of process synchronization?
If process Pi is executing in its critical section, then no other processes can be
executing in their critical sections
3) What are the different approaches taken by the OS to handle critical sections? Explain
one of them.
Two approaches depending on if kernel is preemptive or non- preemptive
Preemptive – allows preemption of process when running in kernel mode
Non-preemptive – runs until exits kernel mode, blocks, or voluntarily yields CPU
Essentially free of race conditions in kernel mode
4) Many systems provide hardware support for implementing the critical section code,
list three of them.
. Memory barriers
Hardware instructions
Atomic variables
5) What are semaphores in the context of process synchronization?
Synchronization tool that provides more sophisticated ways (than Mutex locks) for
process to synchronize their activities.
6) List the different types of semaphores implementation and explain one of them.
Counting semaphore – integer value can range over an unrestricted domain
Binary semaphore – integer value can range only between 0 and 1
7) how are semaphores implemented?
With each semaphore there is an associated waiting queue
Each entry in a waiting queue has two data items:
value (of type integer)
pointer to next record in the list
8) What are monitors in the context of process synchronization?
A high-level abstraction that provides a convenient and effective mechanism for
process synchronization
9) How are monitors implemented?
Abstract data type, internal variables only accessible by code within the procedure
Only one process may be active within the monitor at a time
10) What is liveness in the context of process execution?
Liveness refers to a set of properties that a system must satisfy to ensure processes
make progress.
11) What is Deadlock in the context of process execution?
Deadlock – two or more processes are waiting indefinitely for an event that can be
caused by only one of the waiting processes
12) What is Starvation in the context of process execution?
Starvation – indefinite blocking. A process may never be removed from the semaphore
queue in which it is suspended
13) Deadlock can arise if four conditions hold simultaneously, what are they?
Mutual exclusion
Hold and wait
No preemption
Circular wait
14) What is Mutual exclusion?
only one process at a time can use a shared resource
15) What is Hold and wait in the context of process execution?
a process holding at least one resource is waiting to acquire additional resources
held by other processes
16) What is No preemption in the context of OS scheduling algorithm?
a resource can be released only voluntarily by the process holding it, after that
process has completed its task
17) What is Circular wait ?
there exists a set {P0, P1, …, Pn} of waiting processes such that P0 is waiting for a
resource that is held by P1, P1 is waiting for a resource that is held by P2, …, Pn–1 is
waiting for a resource that is held by Pn, and Pn is waiting for a resource that is held
by P0
18) What is Resource-Allocation Graph?
A set of vertices V and a set of edges
19) If Resource-Allocation graph contains a cycle, does this mean a deadlock?
if only one instance per resource type, then deadlock
if several instances per resource type, possibility of deadlock
20) What are the different methods applied by the OS to handle deadlock?
Ensure that the system will never enter a deadlock state:
Allow the system to enter a deadlock state and then recover
Ignore the problem and pretend that deadlocks never occur in the system
21) What are the different approaches to Ensure that the system will never enter a
deadlock state?
Deadlock prevention
Deadlock avoidance
22) Who deadlock prevention can be implemented?
Invalidate one of the four necessary conditions for deadlock:
Mutual exclusion
Hold and wait
No preemption
Circular wait
23) How to keep a system in the safe state?
When a process requests an available resource, system must decide if immediate
allocation leaves the system in a safe state
24) Who to Recovery from Deadlock in case of resource preemption?
Selecting a victim – minimize cost
Rollback – return to some safe state, restart process for that state
25) How can we censure that a process can access only access those addresses in it
address space.
We can provide this protection by using a pair of base and limit registers define the
logical address space of a process
26) How is the Hardware Address Protection is implemented?
The CPU must check every memory access generated in user mode to be sure it is
between base and limit for that user
27) Address binding of instructions and data to memory addresses can happen at three
different stages, list all of them and explain only one.
Compile time: If memory location known a priori, absolute code can be generated;
must recompile code if starting location changes
Load time: Must generate relocatable code if memory location is not known at
compile time
Execution time: Binding delayed until run time if the process can be moved during
its execution from one memory segment to another
28) Explain when address binding can take place at compile time.
If memory location known a priori, absolute code can be generated;
29) The concept of a logical address space that is bound to a separate physical address
space is central to proper memory management, what is the different between them?
Logical address – generated by the CPU; also referred to as virtual address
Physical address – address seen by the memory unit
30) In which situation Dynamic Loading is used?
The entire program does need to be in memory to execute Routine is not loaded until
it is called
31) What is Static linking?
system libraries and program code combined by the loader into the binary program
image.
32) List the different memory fragmentation types and explain one of them.
External Fragmentation – total memory space exists to satisfy a request, but it is not
contiguous
Internal Fragmentation – allocated memory may be slightly larger than requested
memory; this size difference is memory internal to a partition, but not being used
33) What is the role of device drivers?
Device drivers encapsulate device details
Present uniform device-access interface to I/O subsystem
34) List at least three of the Security Violation Categories and explain one of them.
Breach of confidentiality
Unauthorized reading of data
Breach of integrity
Unauthorized modification of data
Breach of availability
Unauthorized destruction of data
Theft of service
Unauthorized use of resources
Denial of service (DOS)
Prevention of legitimate use
35) List at least three of the Security Violation Methods and explain one of them
Masquerading (breach authentication)
Pretending to be an authorized user to escalate privileges
Replay attack
As is or with message modification
Man-in-the-middle attack
Intruder sits in data flow, masquerading as sender to receiver and vice versa
Session hijacking
Intercept an already-established session to bypass authentication
Privilege escalation
Common attack type with access beyond what a user or resource is supposed to have
36) To ensure effective Security, it must occur at four levels, list three of them and
explain one:
Physical
Data centers, servers, connected terminals
Application
Benign or malicious apps can cause security problems
Operating System
Protection mechanisms, debugging
Network
Intercepted communications, interruption, DOS
37) Trojan Horse is one of the program threats, explain it.
Code segment that misuses its environment
Exploits mechanisms for allowing programs written by users to be executed by other
users Spyware, pop-up browser windows, covert channels
38) In which situation Code-injection attack occurs?
when system code is not malicious but has bugs allowing executable code to be
added or modified
39) Port scanning is one of the System and Network Threats, explain it.
Automated attempt to connect to a range of ports on one or a range of IP addresses
Detection of answering service protocol
Detection of OS and version running on system
40) Denial of Service is one of the System and Network Threats, explain it.
Overload the targeted computer preventing it from doing any useful work
Distributed Denial-of-Service (DDoS) come from multiple sites at once
41) What is the Fundamental idea behind virtualizations?
– abstract hardware of a single computer into several different execution
environments
42) A virtual environment is composed of the three parts, list all of them and explain only
one.
Host – underlying hardware system
Virtual machine manager (VMM) or hypervisor – creates and runs virtual
machines by providing interface that is identical to the host
(Except in the case of paravirtualization)
Guest – process provided with virtual copy of the host
Usually an operating system
43) The Implementation of VMMs vary and can have different hypervisors
implementation, explain one of them.
hypervisors - Operating-system-like software built to provide virtualization
Including VMware ESX, Joyent SmartOS, and Citrix XenServer
hypervisors - Hardware-based solutions that provide support for virtual machine
creation and management via firmware
IBM LPARs and Oracle LDOMs are examples