Operating System Question Paper with Answer BCA Notes Pdf

Operating System Question Paper with Answer BCA Notes Pdf

Study notes on Operating System from BCA solved exam papers. Explore OS concepts, comprehend memory allocation and process management, and expand your understanding for future success.

Dudes 🤔.. You want more useful details regarding this subject. Please keep in mind this as well. Important Questions For Operating System: * Important Short Questions * Solved Question Paper * Syllabus

Section A: Operating System Very Short Question Answers

Q1. Define different a file system.

Ans. The different file system are explained below:

Q2. What is purpose of system calls?

Ans. System calls act as a conduit between the process and the operating system. System calls enable user-level programmes to request services from the operating system that the process itself is not permitted to do. In order to handle the trap, the operating system will enter kernel mode, where it will have access to privileged instructions and will be able to perform the necessary service on behalf of the user-level process. Because of the vital nature of the procedures, the operating system performs them every time they are required. For example, in I/O, a process contains a system call instructing the operating system to read or write a specific location, and the operating system fulfils this request.

Q3. What is the principle advantage of multiprogramming?

Ans.

Q4. What is hard and soft semaphore?

Ans. A semaphore is a variable. There are two types of semaphores :

Binary semaphores are associated with two methods (up, down/lock, unlock). Binary semaphores can only take two values (0/1). They are employed in the acquisition of locks. When a resource is available, the process in charge sets the semaphore to 1, otherwise it is set to 0. Counting semaphores with values larger than one are commonly used to assign resources from a pool of identical resources.

Q5. How measure reliability for H/W disk?

Ans. The major measures of H/W disc reliability are capacity, access time, data transfer rate, and reliability. The period between when a read or write request is sent and when data transfer begins is known as access time.

Section B: Operating System Short Question Answers

Q6. On a system using paging and segmentation, The virtual address space consists of up to 8 segments where each segment can be up to 2 bytes long. The hardware page each segment into 256 bytes pages. How many bits in the virtual address specify the:

(i) Segment number.

(ii) Page number.

(iii) offset within page.

(iv) Entire virtual address.

Ans. (i) Segment Number: Virtual address space consists of up to 8 segments,

∴ 3 bits are needed to specify segment number.

(ii) Page Number: Hardware pages each segments into 256 byte pages.

So 256 = 2 8 byte pages

Size of segment is 2 29 bytes pages

∴ 2 29 /2 8 = 2 29-8 = 2 21 = 21 Pages

∴ 21 bits are required to specify the page number.

(iii) Offset within Page: For 2 8 byte page, 8 bits are needed.

(iv) Entire Virtual Address:

= Segment number + Page number + Offset

Q7. Discuss characteristics of device which effect on supervisor call interface.

Ans. The characteristics of operating systems are as follows:

Q8. What methods determines how a file’s records are allocated into blocks?

Ans. File’s Allocation Methods: The allocation methods define how the files are stored in the disk blocks. There are three main disk space or file allocation methods:

(a) Contiguous Allocation: In this scheme, each file occupies a contiguous set of blocks on the disk. For example, if a file requires n blocks and is given a block b as the starting location, then the blocks assigned to the file will be: b, b + 1, b + 2, ….b + n – 1. This means that given the starting block address and the length of the file (in terms of blocks required), we can determine the blocks occupied by the file. The directory entry for a file with contiguous allocation contains: address of starting block and length of the allocated portion.

Advantages: The advantages of contiguous allocation are as follow:

Disadvantages: The disadvantages of contiguous allocation are as follows:

(b) Linked List Allocation: In this scheme, each file is a linked list of disk blocks which need not be contiguous. The disk blocks can be scattered anywhere on the disk.

The directory entry contains a pointer to the starting and the ending file block. Each block contains a pointer to the next block occupied by the file.

Advantages: The advantages of linked list allocation are as follows:

Disadvantages: The disadvantages of linked list allocation are as follows:

(c) Indexed Allocation: In this scheme, a special block known as the index block contains the pointers to all the blocks occupied by a file. Each file has its own index block. The ith entry in the index block contains the disk address of the ith file block.

Advantages: The advantages of index allocation are as follows:

Disadvantages: The disadvantages of indexed allocation are as follows:

Section C: Operating System Detailed Question Answer

Q9. Define multiprocessor system. What are difference between symmetric and asymmetric multiprocessing? Explain, advantages and disadvantage of multiprocessor systems.

Ans. Multiprocessor System

A multiprocessor system is defined as ‘a system with more than one processor’ and more precisely.

In other words, A multiprocessor is a computer system with two or more Central Processing Units (CPUS), with each one sharing the common main memory as well as the peripherals. This helps in simultaneous processing of programme.

Difference between Symmetric and Asymmetric Multiprocessing

S. No.Symmetric multiprocessing Asymmetric multiprocessing
1.In symmetric multiprocessing, all the processors are treated equally. In asymmetric multiprocessing, the processors are not treated equally.
2.Task of the operating system are done individual processor. Task of the operating system are done by master processor.
3.Symmetric multiprocessing systems are costlier. Asymmetric multiprocessing systems are cheaper.
4.Symmetric multiprocessing systems are complex to design. Asymmetric multiprocessing systems are easier to design.
5.The architecture of each processor is the same.All processors Can exhibit. different architecture.

Advantages of Multiprocessor Systems: The advantages of multiprocessor systems are as follows:

Disadvantages of Multiprocessor Systems: The disadvantages of multiprocessor systems are as follows:

Q10. Write short notes on following:

(i) Deadlock prevention

Ans. Deadlock prevention approaches manage resources in such a way that at least one of the four required conditions of deadlock is not met. It rejects at least one of the conditions necessary for a deadlock to develop. Deadlock prevention strategies do not make proper use of a resource.

(ii) Disk swap-space management

Ans. Virtual memory uses disc space as an extension of main memory in swap space management. Because disc access is substantially slower than RAM access, employing swap space inhibits system performance. The primary purpose of swap space design and implementation is to provide the highest possible throughput for the virtual memory system.

(iii) Real time system

Ans. A Real Time Operating System (RTOS) is an OS designed for real-time applications. These operating systems respond to application requests in near real time. Programmers have more control over process priorities with a real-time operating system. The process priority level of an application may be higher than that of a system process. Real-time operating systems minimise crucial areas of system code, making the interruption of the programme nearly critical.

The level of consistency in the length of time it takes to accept and execute an application’s task is a crucial feature of a real time OS; the variability is jitter. Jitter is lower in a hard real time operating system than in a soft real time operating system. The primary design goal is to ensure a soft or hard performance category rather than high throughput. A soft real time operating system can typically or generally fulfil a deadline, but a hard real time operating system can meet a deadline deterministically.

A real-time operating system has a sophisticated scheduling algorithm. Although scheduler flexibility allows for broader computer-system orchestration of process priorities, a real-time operating system is typically dedicated to a small group of applications. Minimal interrupt latency and thread switching delay are important features in a real time OS, although a real time OS is valued more for how consistently it can respond than for the quantity of work it can complete in a given period of time.

A Real Time Operating System (RTO) is a computing environment that responds to input in real time. A real-time deadline can be so short that the system response appears to be immediate. However, the phrase “real time computing” has also been used to represent “slow real time” output with a longer but definite time limit.

It’s as simple as envisioning yourself in a computer game to learn the difference between real time and regular operating systems. Each action you do in the game is analogous to a programme running in that environment. Because you can count on a precise “lag time,” a game with a real-time operating system for its environment can feel like an extension of your body. The time between your action request and the computer’s visible execution of your action request. A normal operating system, on the other hand, may feel disjointed due to inconsistent lag time. Real-time programmes and their operating system environments must prioritise deadline actualization over all else in order to achieve time reliability. In the gaming example, this might result in dropped frames or lower visual quality when reaction time and visual effects conflict.

(iv) Page replacement

Ans. Page Replacement : A page fault happens when a user programme is executed. The operating system analyses its internal table to ensure that this is a page fault and not an unauthorised memory access. The operating system detects that the necessary page resides on the backup store, but there are no free frames listed, and all memory is in use, necessitating page replacement.

Q11. (i) What computer bus? Different list different type of bus.

Ans. Computer Bus

A computer bus is a subsystem that connects and transfers data between computer components. An internal bus, for example, links computer internals to the motherboard. A ‘bus topology’ or design can also be used to describe digital links in different ways.

Different Types of Computer Bus

The various types of computer bus are explained below:

(ii) What is architecture of peripheral component interconnect bus?

Ans. The CPU and extension boards such as modem cards, network cards, and sound cards are connected through a Peripheral Component Interconnect Bus (PCI bus). These extension boards are typically inserted into motherboard expansion slots.

The PCI local bus has supplanted the Video Electronics Standards Association (VESA) local bus and the Industry Standard Architecture (ISA) bus as the common standard for a PC expansion bus. USB has essentially supplanted PCI.

This term is also known as conventional PCI or simply PCI.

PCI requirements include:

The peripheral component interconnect special interest group standardises PCI requirements. Most PCs today do not have expansion cards, but rather components built into the motherboard. Specific cards continue to use the PCI bus. However, for practical purposes, the PCl expansion card has been superseded by USB.

The operating system looks for all PCI buses during system startup to obtain information about the resources required by each device. The operating system (OS) connects with each device and allocates system resources like as memory, interrupt requests, and allotted input/output (I/O) space.

Q12. What is demand paging? How page fault occurs? What are factors that affect the determination of the page size?

Ans. Demand Paging : The most prevalent virtual memory system is demand paging. Demand paging works in the same way as a paging system with swapping. The backup store is a switching device where programmes are stored. When we need to run a programme, we load it into memory. We employ a lazy swapper instead of swapping the complete programme into memory. The lazy swapper will never swap a page into memory unless it is absolutely necessary. There are numerous benefits to utilising a lazy swapper. It reduces swap time and the amount of physical memory required, allowing for more multiprogramming.

A page fault happens when a page is accessed that has not been brought into main memory. If the memory access is invalid, the operating system aborts the programme. If it is valid, a free frame is found and I/O is requested to read the required page into it.

The main factors affecting page size are explained below:

(a) About the Task: The size of data page is determined by the buffer pool in which you define the table space. For example, a table space that is defined in a 4 kB buffer pool has 4 kB page sizes. and one that is defined in an 8 kB buffer pool has 8 kB page sizes.

Data in table spaces is stored and allocated in record segments. Any record segment can be 4 kB in size, or the size determined by the buffer pool (4 kB, & kB, 16 kB or 32 kB). In a table space with 4 kB record segments, an 8 kB page size requires two 4 kB records, and a 32 kB pages size requires eight 4 kB records.

(b) Procedure: To choose data page sizes, use the following approaches:

Use the default of 4 kB page sizes as a starting point when access to the datåis random and only a few rows per page are needed.

If row sizes are very small, using the 4 kB page size is recommended.

Use larger page sizes in the following situations:

When the size of individual rows is greater than 4 kB.

When you can achieve higher density on disk by choosing a large page size.

Q13. What is thread? Discuss different approaches for implementation of process threads.

Ans. Processes and Threads : We can think of a thread as basically a lightweight process. In order to understand this let us consider the two main characteristics of a process :

Unit of Resource Ownership : A process is allocated :

Unit of Dispatching : A process is an execution path through one or more programs :

If we treat these two characteristics as being independent (as does modern OS theory).

The unit of resource ownership is usually referred to as a process or task. These Processes have:

The unit of dispatching is usually referred to a thread ora lightweight process. Thus, a thread :

Benefits of Threads vs Processes : If implemented correctly then threads have some advantages of (multi) processes, They take :

Address space in particular. So, data produced by one thread is immediately available to all the other threads.