Introduction operating system

Introduction operating system

Operating System Notes:

Qus 1: What is an Operating System?
ans: A program that acts as an intermediary between a user of a computer and the computer hardware.


Qus 2: What is a type of Operating System?
ans: There are three types-

  1. Batch os
  2. Multi-Programing os
  3. Multi-Tasking / Timesharing os

Qus 3: What is an Advantage of Multiprocessor systems?
Ans: Multiprocessor systems have many advantages here are three main advantages of it:
1. Increased throughput. By increasing the number of processors, we expect to get more work done in less time. The speed-up ratio with N processors is not N, however; rather, it is less than N. When multiple processors cooperate on a task, a certain amount of overhead is incurred in keeping all the parts working correctly. This overhead, plus contention for shared resources, lowers the expected gain from additional processors. Similarly, N programmers working closely together do not produce N times the amount of work a single programmer would produce.

2. Economy of scale. Multiprocessor systems can cost less than equivalent multiple single-processor systems because they can share peripherals, mass storage, and power supplies. If several programs operate on the same set of data, it is cheaper to store those data on one disk and to have all the processors share them than to have many computers with local disks and many copies of the data.

3. Increased reliability. If functions can be distributed properly among several processors, then the failure of one processor will not halt the system, only slow it down. If we have ten processors and one fails, then each of the remaining nine processors can pick up a share of the work of the failed processor. Thus, the entire system runs only 10 percent slower, rather than failing altogether.


Qus 4: What are the Advantages of a multiprocessor system over a single processor system?
Ans: Advantages of a multiprocessor system over a single processor system
1. The multi-processor system will have a high throughput compared to the single-processor system. As there are multiprocessors, the task will be completed in less time.

2. Multiprocessor systems are cost-saving. here, the same memory and hardware device are shared by multiple processors, which reduces cost.

3. Multiple processor systems are highly reliable compared to single processor systems. Here, if a single processor fails, the system will not stop functioning as other processors are running. Thus multi processors system is highly reliable. 

Qus 5: What are the differences between multi-programming and  multi-tasking / Timesharing
Ans: Differences between multi-programming and  multi-tasking / Time sharing (Memorize only 5 sentences that is enough)
 
Differences between multi-programming and multi-tasking

S.No

Multi-tasking Multi-programming
01. Time Sharing is known as the multiprogramming logical extension and also many processes are being allocated with computer resources at different time slots Multiprogramming is known as the operating system which allows the execution of multiple processes by the process monitoring and also corrects them in between the process
02. multiple users can share the processor time and it is because it is known as the time-sharing operating system. With the help of this, the problem of memory underutilization Can be solved and Many programs can be run at a time that is why it is called multiprogramming.
03. This processor can be used by two or more users in their terminal. In this, the process can be executed only by a single processor.
04. Time-sharing has a fixed time slice no fixed time slice in this 
05.  Power is taken off before the finishing of execution. E power is not taken off.
06. Same or less time on each process is being taken no same time to work on different processes is there 
07. time-sharing dormers on the time to switch between different processes. It doesn't depend on the time in between the processes 
08. This model has multiple programs and multiple users. It has multiple programming with the system is multiple programs.
09. This maximizes response time. This also maximizes response time.
10. Eg Windows NT. MAC operating system
11. Multi-tasking's main concept is for a single CPU. Multi-tasking Main concept is for a single CPU.
12. The processor is used in time-sharing mode. switching happens when either the allowed time expires or when their other reason for the current process needs to wait. Here the operating system simply switches to, and executes, another job when the current job needs to wait.
13. Switching and time-sharing are used Switching is used
14. Increase Cpu Utilization and responsiveness by organizing jobs. Increase Cpu Utilization by organizing a job 
15. The main purpose is that extend the CPU utilization by increasing responsiveness time-sharing. The main purpose is that reduce CPU idle time for as long as possible.


Qus 6: Explain The Goal Of Multiprogramming or the Main Purpose of a Multiprogramming 
Ans: Multiprogramming is used to gather multiple processes in the CPU queue at a time. The higher the number of processes in the queue the higher the degree of multiprogramming. Multiprogramming is done to increase the throughput and do multiple works simultaneously which saves time.


Qus 7: What is multitasking and why is it important to a computer?
Ans: multitasking is a process of executing multiple tasks simultaneously. we use this concept for utilizing the CPU.in multitasking only a single CPU is involved but it can switch from one program to another programs so fastly that's why it gives the appearance of executing all of the programs simultaneously. It permits the processes to run. Concurrently on the program. For example, running the spreadsheet program and you are working with a word processor also.


Qus 8: What is the goal of timesharing and how is it different from the goal of traditional multiprogramming?
Ans: In time sharing a fixed amount of time slice or time quantum is there for which a process can run and then it will be context switched and the next process will be loaded. A process can run only for a time equal to a time slice then other processes will come and later the previous process will again be executed. 

Qus 9: What are Clustered Systems?
Ans:
  • * Like multiprocessor systems, but multiple systems working together
    •    Usually sharing storage via a storage-area network (SAN)
    •   Provides a high-availability service that survives failures
      •      Asymmetric clustering has one machine in hot-standby mode
      •     Symmetric clustering has multiple nodes running applications, monitoring each other
    •   Some clusters are for high-performance computing (HPC)
      •      Applications must be written to use parallelization
    •    Some have distributed lock managers (DLM) to avoid conflicting operations

Qus 10: Responsible for Process Management
Ans:
The operating system is responsible for the following activities in connection with process management:

• Scheduling processes and threads on the CPUs
• Creating and deleting both user and system processes
• Suspending and resuming processes
• Providing mechanisms for process synchronization
• Providing mechanisms for process communication


Qus 11: Responsible for Memory Management
ans:
The operating system is responsible for the following activities in connection with memory management:

• Keeping track of which parts of memory are currently being used and who is using them
• Deciding which processes and data to move into and out of memory
• Allocating and deallocating memory space as needed


Qus 12: Responsible for Storage Or File Management
ans:
The operating system is responsible for the following activities in connection with file management:

• Creating and deleting files
• Creating and deleting directories to organize files
• Supporting primitives for manipulating files and directories
• Mapping files onto secondary storage
• Backing up files on stable storage media.

 


Qus 13: What are the differences between symmetric and asymmetric multiprocessing
ans: Differences between symmetric and asymmetric multiprocessing (Memorize only 5 sentences that is enough)
 
Differences between symmetric and asymmetric multiprocessing
S no. Symmetric multiprocessing Asymmetric multiprocessing
01 Symmetric multiprocessing is a system where multiple CPUs use a single shared main memory in which they have equal and complete access to the shared resources, input, and output devices. In asymmetric multiprocessing systems, CPUs are not treated equally. There is a master CPU that executes the tasks/processes of the operating system and other CPUs are slaves in the master-slave architecture.
02 In symmetric multiprocessing, all the processors have the same architecture (as they work simultaneously using shared resources). They also have separate ready queues to schedule on their own and execute the tasks. asymmetric multiprocessing system, the architecture of the processors can be different. The master processor assigns the processes or tasks to the slave CPUs.
03 Symmetric multiprocessing systems are costlier because CPUs are complex in design and need to be coded to work in a shared environment.  asymmetric multiprocessing systems are cheaper as they are easier to design and there is the freedom to use different processors and main tasks are handled by the master CPU only.
04 Tasks of the operating system are done by the individual processor. The task of the operating system is done by the master processor. 
05 Symmetric multiprocessing systems are costlier asymmetric multiprocessing systems are cheaper.
06 Symmetric multiprocessing systems are complex to design. asymmetric multiprocessing systems are easier to design.
07 The architecture of each processor is the same. All processors can exhibit different architecture
08 It is suitable for homogeneous cores It is suitable for homogeneous or heterogeneous cores.



Qus 14: What are the Disadvantages of a multiprocessor system?
Ans: Disadvantages of multiprocessor system -
 Deadlock - The biggest problem of any type of multiprocessing system is a deadlock, a condition where two processes are dependent on the same resource or have conflicting needs. This creates a loop that is hard to break.
High Memory requirement - As multiple processors work in this system, each processor uses shared memory but their memory requirement can't be compromised. Each processor demands an ample amount of memory which significantly increases when processors are multiple.
Communication - To complete a task by distributing it in subtasks, the processors need to communicate with each other to update the status of all the subtasks, assemble the task at the end, prevent deadlock, preserve integrity, etc. This communication is very complex to implement.  

Ques 15: What are Batch OS and its problem?
Batch OS: This type of operating system doesn’t interact with the computer directly. There is an operator who takes similar jobs having the same requirements and groups them into batches.
Problems:
1. Lack of interaction between the user and the job.
2. CPU is often idle because the speed of I/O is slower than the CPU.
3. Difficult to provide the desired priority.
batch-os-diagram-worldtimetech

Que 16: Cluster Systems explain?
ans: Cluster Systems :
1. Two or more individual systems or nodes are joined together 
2. Each node may be a single processor system or multiprocessor system.
3. Share storage and are linked via LAN or a faster interconnect.
  •  Can be structured asymmetrically or symmetrically.

Que 17: what is Fault Tolerant
Ans: Fault Tolerant: This is the ability of a system to continue operating without interruption when one or more of its components fail. 


Que 18: what is Graceful degradation?
Graceful degradation: If one processor fails, the system will not halt. This ability to continue working despite hardware failure is known as graceful degradation.


Ques 19: Diagram of the multi-programming system?
Ans:
multi-programming-system-diagram-worldtimetech

Ques 20: Diagram of time sharing?
Ans:
time-sharing-diagram-worldtimetech

Ques 21: What is the type of multiprocessor?
Ans: There are three types 
1. Asymmetric multiprocessor system(ASM).
2. Symmetric multiprocessor system(SMP).
3. Cluster multiprocessor system.