Operating System 2 Marks (NEP & CBCS) Questions with Answers (Important)

2 Marks (Important)

1. List the goals of OS. (19)
– Efficiency
– Performance
– Convenience
– Security
– Scalability
– Portability
– Reliability
– Maintainability

2. Define thread. State the major advantage of thread.
A thread refers to a single sequential flow of activities being executed in a process.
Advantages :
– Threads minimize the context switching time .
– Efficient communication

3. What is the need for an OS?
It manages the computer’s memory and processes, as well as of it’s software and hardware.

4. Define term CPU scheduling and throughput.
– CPU scheduling refers to the switching between processes that are being executed.
– Throughput is the amount of work completed in a unit if time or is the process executed to number of jobs completed in a unit of time.

5. What is multiprogramming?
Multiprogramming OS is an ability of an operating system that executes more than one program using a single processor machine.

6. Mention the types of Inter Process Communication.
– Pipe
– message passing
– message queue
– shorted memory
– direct communication

7. Define process/ list the state of a process.(19)
A process is a program in execution. It is a unit of work that is being carried out by the
operating system.
A process has a number of states
– New: The process has just been created and is not yet ready to run.
– Ready: The process is ready to run but is waiting for the CPU.
– Running: The process is currently using the CPU.
– Waiting: The process is waiting for an event to occur, such as an I/O operation to complete.
– Terminated: The process has finished running and is no longer in the system.

8. Define context switching.(19)
The context switching is a technique or method used by the operating system to switch a process from one state to another to execute it’s function using CPU’s in the system.

9. Define system call. List it types.(22)
System calls are a fundamental part of operating system . they can provide a interface between user-level application and the operating system kernel.

10.Define batch operating system.(21)
A batch operating system is a type of operating system in which programs are submitted to the system in batches and executed one after the other. Batch operating systems are typically used in mainframe computers and are well-suited for tasks that do not require interaction with the user, such as data processing and batch printing.

11.Applications of real time OS.(21)
– Air traffic control
– Robotics
– Telecommunications
– Medical devices
– Industrial control
– Networked control systems
– Embedded systems

12.Define schedulers lists its types.
A scheduler is a type of system software that allows you to handle process scheduling. Types : long term, short term and medium term.

13.List the functions of operating system.(18)(same as services of os)

14.Services of OS.(21)
– Process management
– Memory management
– File management
– Device drivers
– Security
– Networking
– Utilities
– Applications
– Program Execution
– I/O Operations
– Communication Services

15.What is thread? difference between user level and kernel level thread.
A thread is a lightweight process that exists within a process. It is a single sequential flow of control within a process.

OS

16. Define turn around time.
Turnaround time (TAT) in operating systems is the total time it takes for a process to complete from the time it is submitted to the time it is terminated. It is measured in seconds or milliseconds.

17. Define waiting time.
Waiting time in operating systems is the time a process spends in the ready queue waiting to be scheduled for execution on the CPU. It is measured in seconds or
milliseconds.

18. Define burst time.
In operating systems, burst time is the amount of time a process takes to execute on the CPU. It is also known as execution time or running time. The burst time is akey factor in CPU scheduling.

19. What is response time.
In operating systems, response time is the time it takes for a process to start responding to a request. It is measured in seconds or milliseconds.

20. Define schedulers list its type.
A scheduler is a part of the operating system that decides which process to run on the CPU next. There are two main types of schedulers.
1. Long-term scheduler
2. Short-term scheduler
3. Medium-term scheduler

21. Define multithreading.
Multithreading is a programming technique that allows multiple threads to run concurrently within a single process.
1. User-level threading
2. Kernal-level threading

22. List the thread libraries.
1. POSIX thread
2. Win32 thread
3. Java thread
4. Boost thread

23 What is CPU scheduling and list its type.
CPU scheduling is the process of deciding which process should be executed on the CPU at a time. It is an important part of operating systems because it determines how the CPU is shared among the processes that are running.
• Preemptive
• non-preemptive

24.What is multi processor? List it’s approaches.
A multiprocessor is a computer system with multiple central processing units (CPUs). This allows the system to execute multiple tasks simultaneously, which can improve performance.
1. Symmetric multiprocessing (SMP)
2. Asymmetric multiprocessing (AMP)

25.What is real time CPU Scheduling.
Real-time CPU scheduling is a type of CPU scheduling that is used in real-time systems. Real-time systems are systems that must meet deadlines, such as air traffic control systems or medical imaging systems.

26.What is thread scheduling.
Thread scheduling is the process of deciding which thread should be executed on the CPU at a time. It is an important part of operating systems because it determines how the CPU is shared among the threads that are running.

27.List the thread issues.
– System Calls.
– Thread Cancellation.
– Signal Handling.
– Thread Pool.
– Thread Specific Data

28. Give the necessary condition for deadlock to occur.
mutual exclusion, hold and wait, no preemption and circular wait.

29. What is Process Synchronization?
Processes Synchronization or Synchronization is the way by which processes that share the same memory space are managed in an operating system.

30. Define the term backup and recovery.
Backup refers to storing a copy of original data separately. Recovery refers to restoring the lost data in case of failure.

31. What are semaphores? Mention its types
Semaphores are integer variables that are used to solve the critical section problem by using two atomic operations. Wait and signal are used for process synchronization.
– Binary Semaphore – This is also known as a mutex lock. It can have only two values – 0 and 1. Its value is initialized to 1. …
Counting Semaphore – Its value can range over an unrestricted domain. It is used to control access to a resource that has multiple instances.

32. What is critical section problem?
The critical section problem is a problem in concurrent programming that arises when multiple processes need to access a shared resource in a mutually exclusive way. This means that only one process can be in the critical section at a time, otherwise the shared resource may be corrupted.

33. What is deadlock?
A deadlock in OS is a situation in which more than one process is blocked because it is holding a resource and also requires some resource that is acquired by some other process.

34. What are the methods for handling deadlock?
deadlock avoidance, deadlock prevention, deadline detection and recovery and deadlock ignorance.

35. Mention the two instructions used for the implementation of mutual exclusion in
critical section.
Test-and-set (TAS):
Compare-and-swap (CAS):
Lock (or Acquire)
Unlock (or Release)

36. Mention the solutions of critical section problem.
Some of the software-based solutions for critical section problems are Peterson’s solution, semaphores, monitors.

37.Define race condition.
When two processes access and manipulate the shared resource concurrently, and the resulting execution outcome depends on the order in which processes access the resource; this is called a race condition.

38. What is paging.(18)
Paging is a memory management scheme used in operating systems to manage physical memory (RAM) and virtual memory. It allows the operating system to provide each process with a virtual address space that is larger than the actual physical memory available. This helps in efficient memory utilization and multitasking.

39. What is a page fault? How do you we prevent it?
A page fault occurs when a program needs a memory page not currently in RAM. The OS interrupts execution to assess the situation. If the memory access is valid, it finds the page and, if not in RAM, replaces a page using algorithms like LRU. The missing page is fetched from storage, and the program resumes.

40. What are the disadvantages of contiguous memory allocation.(18)
Disadvantages :
– Memory wastage
– Fragmentation
– Inflexibility
– Difficulty in managing larger memory sizes
Advantages :
– Fast access to memory
– Simple to implement
– Efficient use of memory

41. Distinguish between logical and physical address space.(18)

42. Define fragmentation.(19,22,18)
Fragmentation in operating systems refers to the phenomenon where memory or storage space becomes divided into smaller, non-contiguous segments, leading to inefficient utilization of resources.

43. What is memory management unit?(19)
A memory management unit (MMU) is a computer hardware component that handles all memory and caching operations associated with the processor.
Here are some of the functions of the MMU:
– Address translation
– Memory protection
– Memory sharing
– Paging
– Swapping

44. Define swapping?(22)
Swapping is a memory management technique in which a process is temporarily moved from main memory to secondary memory (usually disk) when it is not actively being used. This frees up main memory for other processes, and the swapped-out process can be brought back into main memory when it is needed again.

45. Define Demand paging.(22)
Demand paging is a memory management technique in which a page is brought into memory only when it is needed. This is in contrast to prepaging, in which pages are brought into memory before they are needed.

46. Define page and frame.(21)
– processes are divided into equal parts called pages.
– In a paging system, the virtual address space of a process is divided into fixed-size blocks called “pages,”.
– main memory is also divided into equal parts and each part is called a frame.
– physical memory is divided into blocks of the same size called “frames.” The size of a page is typically a power of 2, such as 4KB or 8KB.

47.What is thrashing?
Thrashing in os is a phenomenon that occurs in computer operating systems when the system spends an excessive amount of time swapping data between physical memory (RAM) and virtual memory (disk storage) due to high memory demand and low available resources.

48.Fragmentation v/s compaction.(21)
Fragmentation & Compaction

49.What is meant by global and local allocation of frames?
Global allocation: In global allocation, a process can choose any frame in memory to store its pages. This means that a process can take a frame from another process, even if that process is currently using the frame.
Local allocation: In local allocation, a process can only choose frames from its own set of allocated frames. This means that a process cannot take a frame from another process.

50.What is fragmentation. Mention the two forms of it.
Fragmentation in operating systems refers to the phenomenon where memory or storage space becomes divided into smaller, non-contiguous segments, leading to inefficient utilization of resources. forms internal fragmentation and. External fragmentation.

51.What is internal fragmentation.
Internal fragmentation occurs when a process is allocated a memory block that is larger than the process actually needs. The unused portion of the memory block is called internal fragmentation.
External fragmentation occurs when there are small, unused chunks of memory scattered throughout the memory space. This can happen when a process is deallocated and its memory block is not immediately reused

52.Define logical memory and physical memory.
Logical memory is the address space that a program sees. It is generated by the CPU and is used to refer to data and instructions in memory. The logical address space is typically larger than the physical address space, because it allows the program to access more data and instructions than are actually present in memory at any given time.
Physical memory is the actual memory that is present in the computer. It is managed by the memory management unit (MMU), which translates logical addresses to physical addresses. The physical address space is typically smaller than the logical address space, because it is limited by the amount of physical memory available.

53. Logical memory v/s physical memory. Logical memory vs physical memory. 
54. List operations on file.
 Create
 Open
 Read
 Write
 Close
 Delete
 Rename
 Truncate
 Reposition
 Append

55. Define bit vector?
A bit vector in an operating system is a data structure that uses a sequence of bits to
represent a set of values. Each bit in the bit vector can represent a single value, and the
values can be either 0 or 1.

56. List the different file types.
 Regular files
 Directory files
 Special files
 Symbolic links
 Compressed files
 Encrypted files
 Virtual files

57. Define file. State any two file operations.
A file is a collection of data that is stored on a computer system. It can be anything from a
simple text file to a complex database. Files are organized into directories, which are like
folders on a filing cabinet.

58. Sequential v/s direct access.
Sequential vs direct access

59. List all various disk scheduling algorithms.
– First Come First Serve (FCFS)
– Shortest Seek Time First (SSTF)
– SCAN
– C-SCAN
– LOOK
– C-LOOK
– FSCAN

60. List the directory file attributes.
– File/Directory Name
– File Size
– Creation Time/Date
– Last Access Time/Date
– Last Modification Time/Date
– Permissions
– Ownership
– File Type

61. List the file access methods in os?
– Sequential access
– Direct access
– Indexed sequential access

62. Define Directory Structure in os?
A directory structure is a way of organizing files and folders on a computer system. It is a hierarchical structure, with each directory containing other directories and/or files.

63.Explain the components if Directory Structure in OS? or Mention the components.
– Directory entry: A directory entry is a data structure that stores information about a file or directory. It typically includes the file or directory name, the file or directory size, and the file or directory permissions.
– Directory tree: A directory tree is a hierarchical structure of directories and files. The root directory is the top-level directory in the directory tree. It is the starting point for all other directories and files.
Subdirectory: A subdirectory is a directory that is contained within another directory. Subdirectories can be nested to any level of depth.
 File: A file is a unit of data that is stored on a computer system. Files can be of any type, such as text, images, or programs.

64.what is protection in os with respective file.
Protection in an operating system refers to the ability to control access to files and other system resources. This is done by assigning permissions to users and groups.
main types of protection
– File permissions
– Process permissions
– Device permissions
– Device permissions

65.what is file system structure in os?
The file system structure in an operating system is the way that files and directories
are organized on a storage device. It is a hierarchical structure, with each directory
containing other directories and/or files.

66.list the allocation methods in os with respective file
– Contiguous allocation
– Linked allocation
– Indexed allocation
– Clustered allocation

67.What is free space management.
Free space management of allocating & deallocating free space on a storage device & it is the important part of operating system & File system

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!