Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The routine that can be used to create a process on a Linux system is ______. A.

ID: 3801787 • Letter: T

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 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

3

4

2

1

3 points   

QUESTION 7

In a Linux/Unix system, which command displays the list of entries in a directory?

rm

ps

ls

cp

3 points   

QUESTION 8

A process that has terminated, but whose parent has not yet called wait(), is known as a ________ process.

zombie

init

orphan

terminated

3 points   

QUESTION 9

What statement concerning privileged instructions is considered false?

They may cause harm to the system.

They can only be executed in kernel mode.

They cannot be attempted from user mode.

3 points   

QUESTION 10

How many philosophers may eat simultaneously in the Dining Philosophers problem with 7 philosophers?

2

3

4

5

3 points   

QUESTION 11

Policy ____.

determines how to do something

determines what will be done

is not likely to change over time

3 points   

QUESTION 12

A counting semaphore ____.

is essentially an integer variable

is accessed through only one standard operation

can be modified simultaneously by multiple threads

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 ____.

appropriately defining the various layers

making sure that each layer hides certain data structures, hardware, and operations from higher-level layers

debugging a particular layer

making sure each layer is easily converted to modules

3 points   

QUESTION 14

_____ can be used to prevent busy waiting when implementing a semaphore.

Spinlocks

Waiting lists

Mutex lock

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?

It indicates the number of empty slots in the buffer.

It indicates the number of occupied slots in the buffer.

It ensures mutual exclusion.

3 points   

QUESTION 16

_____ is/are not a technique for passing parameters from an application to a system call.

Cache memory

Registers

Stack

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.  

A.

3

B.

4

C.

2

D.

1

Explanation / Answer

The routine that can be used to create a process on a Linux system is ______.

Answer:Option D. fork()

QUESTION 7

In a Linux/Unix system, which command displays the list of entries in a directory?

Answer: Option C.ls

QUESTION 8

A process that has terminated, but whose parent has not yet called wait(), is known as a ________ process.

Answer: Option A. zombie

QUESTION 9

What statement concerning privileged instructions is considered false?

Answer: Option C.They cannot be attempted from user mode.

QUESTION 10

How many philosophers may eat simultaneously in the Dining Philosophers problem with 7 philosophers?

Answer: Option B. 3

QUESTION 11

Policy ____.

Answer: Option B. determines what will be done

QUESTION 12

A counting semaphore ____.

Answer: Option A. is essentially an integer variable

QUESTION 13

The major difficulty in designing a layered operating system approach is ____.

Answer: Option A.appropriately defining the various layers

QUESTION 14

_____ can be used to prevent busy waiting when implementing a semaphore.

Answer: Option B. Waiting lists

QUESTION 15

What is the purpose of the semaphore mutex in the implementation of the bounded-buffer problem using semaphores?

Answer: Option D.It ensures mutual exclusion.

QUESTION 16

_____ is/are not a technique for passing parameters from an application to a system call.

Answer: Option A.Cache memory

QUESTION 17

A counting semaphore can never be used as a binary semaphore.

Answer: False

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote