Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

YUSUF MAITAMA SULE UNIVERSITY KANO FOCULTY OF SCIENCE

DEPARTMENT OF COMPUTER SCIENCE


OPERATING SYSTEM GROUP 3 ASSIGNMENT

GROUP MEMBERS:
1. Abubakar Hussain
2. Hussain Mustapha
3. Abdulrazak Abubakar

Q1 (a) Memory Management is a crucial aspect in computing Elaborate.

Answer
Memory management is a critical aspect of computer systems, involving the organization and
utilization of memory resources.

Memory management is the process by which an operating system keeps track of each byte in a
computer's memory and is responsible for allocating and de-allocating memory when needed. It
serves vital purposes which include:

1. Resource Allocation: Memory management allocates physical memory to running processes or


applications, ensuring they have enough space to execute and store data. It helps prevent
processes from overwriting each other's data, which can lead to system crashes and data
corruption.
2. Address Translation: Memory management translates logical addresses (used by processes) into
physical addresses (used by the hardware). This enables applications to access and store data in
memory without needing to know its actual physical location.
3. Protection: It enforces memory protection by preventing processes from accessing or modifying
memory regions that do not belong to them.
4. Sharing: Memory management facilitates data sharing among processes, enabling more efficient
resource utilization.
Q1 (b) Memory management has some key components, Elaborate on three of them briefly

Answer

1. Memory Allocation: This process involves allocating memory to processes as they request it.
Operating systems employ various allocation techniques, including fixed partitions, variable
partitions, and paging.
2. Mapping: mapping, also known as address translation, translates logical addresses to physical
addresses. This is essential for protecting the integrity of memory and ensuring that processes
cannot interfere with one another.
3. Memory Protection: Memory protection mechanisms ensure that processes do not access
memory regions outside their allocated space.

Note: These are the required ones but one can choose from among those that are not among the
above.

4. Swapping: When physical memory becomes scarce, the operating system can swap portions
of data in and out of secondary storage (like a hard drive).
5. Fragmentation: Memory management systems must address fragmentation to optimize
memory usage and reduce waste.

Q2 (a) Caching is a special way of improving memory access which reduces the time taken to retrieve
data by the CPU, Discuss briefly
Answer
Cache memory is a type of computer memory that temporarily stores frequently used data for quick
access.
In other words
Cache memory is a chip-based computer component that makes retrieving data from the
computer's memory more efficient. It acts as a temporary storage area that the computer's
processor can retrieve data from easily.
The primary purpose of cache memory is to speed up the interactions between the computer's
central processing unit (CPU) and its main memory. It achieves this by storing copies of frequently
used or recently used data close to the CPU. When the CPU needs to read from or write to a
location in main memory, it first checks whether a copy of that data is in the cache. If so, the CPU
immediately reads from or writes to the cache, which is much faster than reading from or writing to
main memory.
In summary, cache memory plays a crucial role in reducing the time taken to access data from the
main memory, thereby enhancing the speed and performance of a computer.
Q2b Compare and Contrast on Paging and Segmentation

Answer
SN paging Segmentation
Paging is a memory management Segmentation is a memory management scheme in
scheme in which each process is which a process is divided into variable-sized
divided into fixed-size pages. segments.
Pages are allocated to processes as Segments can be allocated to processes in a non-
a whole unit. contiguous manner
Paging is managed by hardware Segmentation is managed by software through a
through a page table segment table.
Paging results in less internal Segmentation results in more internal fragmentation
fragmentation, but more external but less external fragmentation.
fragmentation.
Page size is fixed and determined Segment size is variable and determined by the
by the system. process.

Q3 (a) Explain why mobile operating systems such as IOS and Android do not support swapping.

Answer
Swapping involves moving inactive pages from main memory to disk storage to free up space for
active pages.
There are three reasons that make the mobile operating system not to accept swapping which
include
(1) These mobile devices typically use flash memory with limited capacity and swapping is
avoided because of this space constraint.
(2) Flash memory can support a limited number of write operations before it becomes less
reliable.
(3) Poor throughput between flash memory and CPU on mobile platform.

3 (b) Explain briefly the following with regard to Contiguous Memory Allocation:
First fit:
Worse fit:
Best fit:
Answer
• First fit. Allocate the first hole that is big enough to the process. Searching can start either at the
beginning of the of holes or at the location of the previous first-fit search. We stop searching when
we find a free hole that is large enough
. • Best fit. Allocate the smallest hole that is big enough. We must search the entire list, unless the
list is ordered by size.
• Worst fit. Allocate the largest hole. Again, we must search the entire list, unless it is sorted by
size.

You might also like