Operating Systems Basics
Operating Systems Basics
3A) explain in detail how process management and memory management activities are
handled in operating systems, and apply this understanding to describe their roles in
system performence.
Ans)
Process Management:
1. Process Scheduler: The scheduler determines the CPU run time for each
process.
2. Process State: Process transition between states: new, ready, waiting and
Terminated.
3. Inter Process Communication(IPC): Enables processes to share data to
coordinate activites.
4. DeadLock Handling: Prevents and resolves Deadlocks using techniques like
resource allocation.
Memory Management:
Memory management ensures the optimal use of System memory while providing
isolation and security for processes.
Virtual Memory: Uses disk space as an extension of RAM, allowing larger programs to
run,
4A)Apply your knowledge to list the functionalities and types of operating systems,
and illustrate how each type contributes to system operations.
Ans)
• Similar Types of jobs or process are batched together and exectute at a time.
• The Os is always in System memory(RAM).
• System picks and begins executing one job or process one after another.
• CPU is never idle, it keeps on processing.
• Increases CPU utilization.
5A) apply bestfit,worstfit,and first fit memory management algorithms to describe their
approaches and provide appropriate examples to illustrste each concept.
Ans)
These algorithms are used in dynamic memory allocation to allocate memory blocks to
process in a way that minimizes fragmentation.
BestFit: Allocates the smallest available block that is large enough to satisfy the
request.
Example:
Steps:
2. 417KB → Allocates from 500KB. Remaining: [100KB, 83KB, 200KB, 88KB, 600KB]
3. 112KB → Allocates from 200KB. Remaining: [100KB, 83KB, 88KB, 88KB, 600KB]
4. 426KB → Allocates from 600KB. Remaining: [100KB, 83KB, 88KB, 88KB, 174KB]
WorstFit: Allocates the largest available block to the process, aiming to leave gap for
future allocation.
Steps:
FirstFit: Allocates the first found memory block that is large enough to satisfy the
request.
Steps:
1. 212KB → Allocates from 500KB (first suitable block). Remaining: [100KB, 288KB,
200KB, 300KB, 600KB]
Note: example are for understanding purposes, they are not required to learn.
2A)Illustrate the concept of lottery scheduling to a scenario with two process with one
has 75% of tickets and and the other has 25% of the tickets. Explain how this scheduling
would manage their execution.
Example:
For example,
OPERATING SYSTEMS SEM_ IN-1 THEORY QUESTIONS AND ANSWERS
Like this, the more both processes fight over the lotteries, the more process time they
get to their needed time.
2B) demonistrate your understanding of a process and process life cycle to summarize
their key stages and transitions.
Process Life Cycle: It describes the stages a process goes through from its creation to
termination.
Stages:
Ready: The process is prepared for execution but waiting for the CPU. It is in the queue
managed by scheduler.
Running: The process is actively being executed on the CPU. Only one process per CPU
core can be in this state at any time.
Waiting(Blocked): The process is waiting for an event to happen. It is not eligible for CPU
time.
2C) analyze the function of translation lookaside buffer(TLB) and interpret its impact on
memory management
OPERATING SYSTEMS SEM_ IN-1 THEORY QUESTIONS AND ANSWERS
Ans)TLB is an specialized , Fast cache that stores the recent transitions between virtual
memory to physical memory(RAM) addresses. It is critical in systems that use Virtual
Memory .
• Performance Improvement.
• Reducing page Table overhead.
• Impact on multi level page tables.
• Impact on cache performance.
• Scalability issues.
Ans)
Paging is an scheme that eliminates the need for continuos allocation of Physical
memory, theirby avoiding fragmentation and making efficient use of memory.
It divides processe’s logical address and physical address into fixed size blocks, called
pages and frames respectively.
Types of Pagings:
Simple paging: A basic implementation of paging where physical memory is divided into
fixed size frames and logical address is divided into fized size pages.
Demand paging: Pages are loaded into memory only when they are needed.
Pure demand paging: not even a single page is loaded into memory when they are not
needed.
OPERATING SYSTEMS SEM_ IN-1 THEORY QUESTIONS AND ANSWERS
1A)
Time sharing system: A system which multiple users share the computing resources of
by time slicing(servers or mainframes).
1B)
Shell: Shell is a command line interface that allows users to type in commands to
control OS.
1C)
1D)
Virtual Memory:
Virtual Memory is using disk space as Main memory (RAM) which allows running large
programmes and better efficiency.
1E)
Splitting: It refers to the process of dividing large empty space into usable small blocks,
when there is a request for storage.
1F)
Benefits:
Segmentation divides memory into logical units, making it easier for programmers to
access specific parts of memory.
OPERATING SYSTEMS SEM_ IN-1 THEORY QUESTIONS AND ANSWERS
Drawbacks: