Q: 1
Match the virtual memory terminologies in Column I to their descriptions in Column II:
| Column I | Column II |
|---|---|
| a. Virtual address | i. The virtual storage assigned to a process. |
| b. Virtual address space | ii. The range of memory addresses available to a process. |
| c. Address space | iii. The address of a storage location in main memory. |
| d. Real address | iv. The address assigned to a location in virtual memory to allow that location to be accessed as though it were part of main memory. |
Choose the correct option:
a – ii, b – i, c – iii, d – iv
a – iv, b – i, c – ii, d – iii
a – i, b – iii, c – ii, d – iv
a – iv, b – iii, c – i, d – ii
[ Option B ]
Virtual Memory is a memory management technique that gives an application the illusion of having a large, continuous block of memory, even though it may be physically fragmented or partially stored on disk.
| TERM | DESCRIPTION |
|---|---|
| Virtual Address | A virtual address is the address assigned to a location in virtual memory. It allows the CPU to access data as if it were in the main memory. |
| Virtual Address Space | This refers to the total virtual storage assigned to a process. It represents the range of virtual addresses a process can use. |
| Address Space | The address space defines the range of memory addresses available to a process (virtual or physical). |
| Real Address | The real address (also called physical address) refers to the actual location in the main memory (RAM). |
Q: 2 If a branch instruction causes a change in control flow during pipelining,
execution is delayed.
the pipeline is emptied and subsequent instructions are discarded.
only decoding is paused.
no change occurs.
[ Option B ]
Pipelining is a technique in CPUs where multiple instructions are overlapped in execution to improve performance. A branch instruction changes the normal sequential flow of execution by jumping to a different memory address. This can cause a control hazard, because the CPU may have already fetched instructions following the branch, which may no longer be correct.
Q: 3 Which of the following is a Linux System Call for Interprocess Communication (IPC)?
semctl
bind
sched_yield
link
[ Option A ]
In Linux, processes often need to communicate and share data with each other, this is called Interprocess Communication (IPC). Linux provides several IPC mechanisms like pipes, message queues, shared memory, and semaphores.
The semctl system call is used to control and manage semaphores, which are synchronization tools that help processes coordinate access to shared resources.
| IPC MECHANISM | SYSTEM CALL | PURPOSE |
|---|---|---|
| Pipes | pipe() | Communicate between parent and child processes. |
| Message Queues | msgsnd(), msgrcv() | Send and receive messages between processes. |
| Shared Memory | shmget(), shmat() | Allow processes to access common memory space. |
| Semaphores | semctl(), semget() | Synchronize process execution and resource access. |
Thank you so much for taking the time to read my Computer Science MCQs section carefully. Your support and interest mean a lot, and I truly appreciate you being part of this journey. Stay connected for more insights and updates! If you'd like to explore more tutorials and insights, check out my YouTube channel.
Don’t forget to subscribe and stay connected for future updates.