What is operating systems Flashcards
What is an Operating System (OS)?
An Operating System (OS) is a software that acts as an intermediary between the hardware of a computer and the user or application programs. It manages hardware resources and provides a platform for applications to run.
Why do we need an Operating System?
We need an OS to manage hardware resources like memory, CPU, storage, and I/O devices. Without an OS, users would have to manually handle these tasks, which would be inefficient and impractical. The OS abstracts these complexities and provides a user-friendly interface.
What are the key functions of an Operating System?
The key functions of an OS include: 1) Process Management, 2) Memory Management, 3) File System Management, 4) Device Management, 5) Security and Access Control, 6) Networking, and 7) User Interface.
What is Process Management in an OS?
Process Management involves managing running processes (programs in execution). It handles CPU scheduling, multitasking, and ensures efficient use of the processor.
What is Memory Management in an OS?
Memory Management involves allocating and deallocating memory to processes. It handles virtual memory to optimize RAM usage and prevents processes from accessing each other’s memory (isolation).
What is File System Management in an OS?
File System Management organizes files and directories on storage devices. It manages file creation, deletion, and access permissions.
What is Device Management in an OS?
Device Management involves managing communication with hardware devices like printers, disks, etc. It provides device drivers to interact with hardware.
What is Security and Access Control in an OS?
Security and Access Control protect the system from unauthorized access. It manages user permissions and authentication.
What is Networking in an OS?
Networking enables communication between computers over a network. It manages protocols like TCP/IP, HTTP, etc.
What is a User Interface in an OS?
A User Interface provides a way for users to interact with the system, such as a Graphical User Interface (GUI) or Command-Line Interface (CLI).
What is the difference between a Process and a Thread?
A Process is an independent program in execution with its own memory space, while a Thread is a lightweight unit of execution within a process that shares the same memory space. Multithreading allows multiple threads to run concurrently within a single process.
What are Scheduling Algorithms in an OS?
Scheduling Algorithms determine how the CPU is allocated to processes. Common algorithms include: 1) First-Come-First-Serve (FCFS), 2) Shortest Job First (SJF), 3) Round Robin, and 4) Priority Scheduling.
What is Synchronization in an OS?
Synchronization ensures that multiple processes or threads do not simultaneously access shared resources, which could lead to race conditions. Tools like semaphores and mutexes are used to achieve synchronization.
What is a Deadlock in an OS?
A Deadlock is a situation where two or more processes are unable to proceed because each is waiting for the other to release a resource. The four conditions for deadlock are: 1) Mutual Exclusion, 2) Hold and Wait, 3) No Preemption, and 4) Circular Wait.
How can Deadlocks be prevented or avoided?
Deadlocks can be prevented by breaking one of the four conditions: 1) Avoid Mutual Exclusion, 2) Eliminate Hold and Wait, 3) Allow Preemption, or 4) Break Circular Wait. Deadlock Avoidance uses algorithms like the Banker’s Algorithm to ensure safe resource allocation.
What is Paging in Memory Management?
Paging is a memory management technique where physical memory is divided into fixed-size blocks called pages. Logical memory is also divided into pages of the same size. The OS maps logical pages to physical frames using a page table.
What is Virtual Memory?
Virtual Memory is a memory management technique that allows a system to use more memory than physically available by temporarily transferring data from RAM to disk storage. It enables efficient multitasking and prevents out-of-memory errors.
What is a File System in an OS?
A File System is a method used by an OS to organize and store files on a storage device. It manages file creation, deletion, access permissions, and directory structures.
What are the types of File Allocation Methods?
The types of File Allocation Methods are: 1) Contiguous Allocation, 2) Linked Allocation, and 3) Indexed Allocation. Each method has its own advantages and disadvantages in terms of efficiency and fragmentation.
What is I/O Management in an OS?
I/O Management involves handling input/output operations between the CPU and peripheral devices like keyboards, mice, printers, and disks. The OS uses device drivers and interrupt mechanisms to manage I/O operations efficiently.
What is a Kernel in an OS?
The Kernel is the core component of an OS. It manages system resources, communication between hardware and software, and ensures security and stability. It operates in kernel mode, which has unrestricted access to hardware.
What are the types of Operating Systems?
The types of Operating Systems include: 1) Batch OS, 2) Time-Sharing OS, 3) Distributed OS, 4) Network OS, 5) Real-Time OS, and 6) Embedded OS. Each type is designed for specific use cases.
What is Multitasking in an OS?
Multitasking is the ability of an OS to run multiple processes or tasks concurrently. It is achieved by rapidly switching the CPU between processes, giving the illusion of simultaneous execution.
What is Context Switching?
Context Switching is the process of saving the state of a currently running process and loading the state of another process so that it can be executed. It is essential for multitasking and is managed by the OS.