Question
The routine that can be used to create a process on a Linux system is ______. A. wait() B. new() C. exec() D. fork() If
The routine that can be used to create a process on a Linux system is ______. A. wait() B. new() C. exec() D. fork()
If a C program read two command line arguments, like "file1", "file2" in the following command, what will be the value of the parameter "argc" of the "main" function?
./myprogram file1 file2
A. | 3 | |
B. | 4 | |
C. | 2 | |
D. | 1 |
3 points
QUESTION 7
In a Linux/Unix system, which command displays the list of entries in a directory?
A. | rm | |
B. | ps | |
C. | ls | |
D. | cp |
3 points
QUESTION 8
A process that has terminated, but whose parent has not yet called wait(), is known as a ________ process.
A. | zombie | |
B. | init | |
C. | orphan | |
D. | terminated |
3 points
QUESTION 9
What statement concerning privileged instructions is considered false?
A. | They may cause harm to the system. | |
B. | They can only be executed in kernel mode. | |
C. | They cannot be attempted from user mode. | |
D. |
3 points
QUESTION 10
How many philosophers may eat simultaneously in the Dining Philosophers problem with 7 philosophers?
A. | 2 | |
B. | 3 | |
C. | 4 | |
D. | 5 |
3 points
QUESTION 11
Policy ____.
A. | determines how to do something | |
B. | determines what will be done | |
C. | ||
D. | is not likely to change over time |
3 points
QUESTION 12
A counting semaphore ____.
A. | is essentially an integer variable | |
B. | is accessed through only one standard operation | |
C. | can be modified simultaneously by multiple threads | |
D. | cannot be used to control access to a thread's critical sections |
3 points
QUESTION 13
The major difficulty in designing a layered operating system approach is ____.
A. | appropriately defining the various layers | |
B. | making sure that each layer hides certain data structures, hardware, and operations from higher-level layers | |
C. | debugging a particular layer | |
D. | making sure each layer is easily converted to modules |
3 points
QUESTION 14
_____ can be used to prevent busy waiting when implementing a semaphore.
A. | Spinlocks | |
B. | Waiting lists | |
C. | Mutex lock | |
D. | Allowing the wait() operation to succeed |
3 points
QUESTION 15
What is the purpose of the semaphore mutex in the implementation of the bounded-buffer problem using semaphores?
A. | It indicates the number of empty slots in the buffer. | |
B. | It indicates the number of occupied slots in the buffer. | |
C. | ||
D. | It ensures mutual exclusion.
|
3 points
QUESTION 16
_____ is/are not a technique for passing parameters from an application to a system call.
A. | Cache memory | |
B. | Registers | |
C. | Stack | |
D. | Special block in memory |
3 points
QUESTION 17
A counting semaphore can never be used as a binary semaphore.
True
False
2 points
QUESTION 18
The long-term scheduler is designed to select a new process in the main memory for the CPU. It executes much less frequently than short-term scheduler.
True
False
2 points
QUESTION 19
A critical section is a code fragment of a program that needs to exclusively access and modify a shared resource.
True
False
2 points
QUESTION 20
Context-switch time is overhead and the system does no useful work while switching.
True
False
2 points
QUESTION 21
A binary semaphore is a value either 1 or 0.
True
False
2 points
QUESTION 22
Most resources used by a thread are allocated to the associated process rather than the thread itself.
True
False
2 points
QUESTION 23
A modern, well-designed operating system still has design flaws.
True
False
2 points
QUESTION 24
To compile a C program "prog.c" on a Unix/Linux machine, we can use the following command.
cc -o prog prog.c
True
False
2 points
QUESTION 25
UNIX kernels have traditionally been implemented using a microkernel approach.
True
False
2 points
QUESTION 26
A timer can be used to prevent a user program from never returning control to the operating system.
True
False
2 points
QUESTION 27
A process executing in user mode changes to kenel mode when it is executing kernel code during a system call.
True
False
2 points
QUESTION 28
Briefly describe when and why a deadlock may happen in the dining-philosophers problem. Try to give a solution to handle the deadlock.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started