0% found this document useful (0 votes)
3 views7 pages

Operating System1

Set 1 consists of 30 questions focused on Processes, Threads, and Inter-Process Communication (IPC), each with four answer options. Key topics include the definition of a process, characteristics of threads, IPC mechanisms, and process states. The document concludes with a note that Set 2 will cover Concurrency, Synchronization, and Deadlock.

Uploaded by

Narasimha Reddy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views7 pages

Operating System1

Set 1 consists of 30 questions focused on Processes, Threads, and Inter-Process Communication (IPC), each with four answer options. Key topics include the definition of a process, characteristics of threads, IPC mechanisms, and process states. The document concludes with a note that Set 2 will cover Concurrency, Synchronization, and Deadlock.

Uploaded by

Narasimha Reddy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Great — I’ll start with Set 1: Questions 1–30 covering Processes, Threads, and Inter-

Process Communication (IPC). Each question has four options and the correct answer.

Set 1: Questions 1–30

Q1. A process is best defined as:


A. A program stored on disk
B. A program in execution
C. A set of files
D. A hardware resource
Answer: B

Q2. Which of the following is a lightweight process?


A. Process
B. Thread
C. Semaphore
D. Monitor
Answer: B

Q3. Which component is stored in the Process Control Block (PCB)?


A. Program code only
B. Process state
C. File data
D. Hardware address only
Answer: B

Q4. Which process state indicates that the process is currently being executed by the
CPU?
A. Ready
B. Waiting
C. Running
D. Terminated
Answer: C
Q5. The system call used to create a new process in UNIX is:
A. exec()
B. fork()
C. wait()
D. exit()
Answer: B

Q6. Which system call replaces the current process image with a new program?
A. fork()
B. exec()
C. wait()
D. kill()
Answer: B

Q7. Threads within the same process share:


A. Program counter
B. Registers
C. Address space
D. Stack
Answer: C

Q8. Which of the following is not shared among threads of the same process?
A. Code section
B. Data section
C. Heap
D. Stack
Answer: D

Q9. A thread has its own:


A. Address space
B. Stack
C. Code section
D. Heap
Answer: B

Q10. Which model maps many user-level threads to one kernel thread?
A. One-to-one
B. Many-to-one
C. Many-to-many
D. Two-level
Answer: B

Q11. Which model maps each user thread to a separate kernel thread?
A. Many-to-one
B. One-to-one
C. Many-to-many
D. Hybrid
Answer: B

Q12. The main advantage of multithreading is:


A. Increased memory usage
B. Improved responsiveness
C. Elimination of context switching
D. Reduced CPU utilization
Answer: B

Q13. Context switching occurs when:


A. A process terminates
B. The CPU switches from one process to another
C. A file is opened
D. A thread is created
Answer: B

Q14. Which queue contains processes waiting to be assigned to the CPU?


A. Job queue
B. Ready queue
C. Device queue
D. Waiting queue
Answer: B

Q15. Which queue contains all processes in the system?


A. Ready queue
B. Device queue
C. Job queue
D. Waiting queue
Answer: C

Q16. Inter-process communication (IPC) is required because:


A. Processes always share memory
B. Processes are independent and isolated
C. Threads cannot communicate
D. CPU scheduling requires it
Answer: B

Q17. Which IPC mechanism allows processes to exchange messages directly?


A. Paging
B. Message passing
C. Segmentation
D. Swapping
Answer: B

Q18. Shared memory IPC is generally:


A. Slower than message passing
B. Faster than message passing
C. Used only for remote communication
D. Not suitable for synchronization
Answer: B
Q19. Which IPC mechanism uses a region of memory shared among processes?
A. Pipes
B. Message queues
C. Shared memory
D. Sockets
Answer: C

Q20. A pipe is typically used for communication between:


A. Unrelated processes
B. Processes on different machines
C. Parent and child processes
D. Threads only
Answer: C

Q21. Which IPC mechanism supports communication between unrelated processes on the
same machine?
A. Anonymous pipes
B. Named pipes
C. Registers
D. Cache
Answer: B

Q22. Sockets are commonly used for:


A. File allocation
B. Network communication
C. Memory allocation
D. CPU scheduling
Answer: B

Q23. Which IPC mechanism stores messages in a queue until they are processed?
A. Shared memory
B. Message queue
C. Pipe
D. Semaphore
Answer: B

Q24. In shared memory IPC, synchronization is usually achieved using:


A. Compilers
B. Semaphores
C. Page tables
D. Device drivers
Answer: B

Q25. Which of the following is not an IPC mechanism?


A. Shared memory
B. Message passing
C. Pipes
D. Paging
Answer: D

Q26. A process waiting for I/O completion is in the:


A. Ready state
B. Running state
C. Waiting/Blocked state
D. Terminated state
Answer: C

Q27. Which scheduling queue holds processes waiting for a particular I/O device?
A. Ready queue
B. Job queue
C. Device queue
D. Thread queue
Answer: C

Q28. A child process created by fork() initially:


A. Shares the same PID as the parent
B. Has a copy of the parent’s address space
C. Has no code section
D. Cannot execute independently
Answer: B

Q29. Which system call causes a process to wait for a child process to terminate?
A. exec()
B. fork()
C. wait()
D. exit()
Answer: C

Q30. A zombie process is a process that:


A. Is currently running
B. Is waiting for I/O
C. Has terminated but still has an entry in the process table
D. Has been swapped out
Answer: C

This completes Set 1 (Questions 1–30) on Processes, Threads, and IPC. Next, I can
continue with Set 2: Questions 31–60 covering Concurrency, Synchronization, and
Deadlock.

You might also like