-
Notifications
You must be signed in to change notification settings - Fork 0
/
answers2.txt
20 lines (10 loc) · 4.36 KB
/
answers2.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
An operating system has three main functions: manage the computer's resources, such as the central processing unit, memory, disk drives, and printers,establish a user interface, and execute and provide services for applications software.
Mutual Exclusion: When two people meet in the landings, they can’t just walk through because there is space only for one person. This condition to allow only one person (or process) to use the step between them (or the resource) is the first condition necessary for the occurrence of the deadlock. Hold and Wait: When the 2 people refuses to retreat and hold their grounds, it is called holding. This is the next necessary condition for the the deadlock. No Preemption: For resolving the deadlock one can simply cancel one of the processes for other to continue. But Operating System doesn’t do so. It allocates the resources to the processors for as much time needed until the task is completed. Hence, there is no temporary reallocation of the resources. It is third condition for deadlock. Circular Wait :When the two people refuses to retreat and wait for each other to retreat, so that they can complete their task, it is called circular wait. It is the last condition for the deadlock to occur.
The process with less execution time suffer i.e. waiting time is often quite long. Favors CPU Bound process then I/O bound process. Advantages – It is simple and easy to understand. Disadvantages - The process with less execution time suffer i.e. waiting time is often quite long. This effect results in lower CPU and device utilization.
The banker’s algorithm is a resource allocation and deadlock avoidance algorithm that tests for safety by simulating the allocation for predetermined maximum possible amounts of all resources, then makes an “s-state” check to test for possible activities, before deciding whether allocation should be allowed to continue. Banker’s algorithm is named so because it is used in banking system to check whether loan can be sanctioned to a person or not
There are two types of fragmentation in OS which are given as: Internal fragmentation, and External fragmentation. Internal fragmentation happens when the memory is split into mounted sized blocks. Whenever a method request for the memory, the mounted sized block is allotted to the method. just in case the memory allotted to the method is somewhat larger than the memory requested, then the distinction between allotted and requested memory is that the Internal fragmentation. External fragmentation happens when there’s a sufficient quantity of area within the memory to satisfy the memory request of a method. however the process’s memory request cannot be fulfilled because the memory offered is during a non-contiguous manner. Either you apply first-fit or best-fit memory allocation strategy it’ll cause external fragmentation.
Spooling is the process of sending data to a spool, or temporary storage area in the computer's memory. This data may contain files or processes. Like a spool of thread, the data can build up within the spool as multiple files or jobs are sent to it.
Semaphore is simply a variable that is non-negative and shared between threads. A semaphore is a signaling mechanism, and a thread that is waiting on a semaphore can be signaled by another thread. It uses two atomic operations, 1)wait, and 2) signal for the process synchronization.The two types of Semaphores are : Binary Semaphore and Counting Semaphore.
Belady’s Anomaly is the phenomenon of increasing the number of page faults on increasing the number of frames in main memory.
Some of the most important benefits of MT are: Improved throughput. Many concurrent compute operations and I/O requests within a single process. Simultaneous and fully symmetric use of multiple processors for computation and I/O.Superior application responsiveness. Improved server responsiveness. Large or complex requests or slow clients don't block other requests for service. The overall throughput of the server is much greater.Minimized system resource usage.
Processes in the operating system can be in any of the following states: New- The process is being created.Ready- The process is waiting to be assigned to a processor.Running - Instructions are being executed.Waiting - The process is waiting for some event to occur(such as an I/O completion or reception of a signal).Terminated- The process has finished execution.