Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

CS-374 M4 | QUESTIONS AND ANSWERS | 2026 UPDATE | 100% CORRECT!

Beoordeling
-
Verkocht
-
Pagina's
27
Cijfer
A+
Geüpload op
03-03-2026
Geschreven in
2025/2026

CS-374 M4 | QUESTIONS AND ANSWERS | 2026 UPDATE | 100% CORRECT!

Instelling
CS-374 M4
Vak
CS-374 M4

Voorbeeld van de inhoud

CS-374 M4 | QUESTIONS AND ANSWERS | 2026 UPDATE | 100% CORRECT!

Question 1
In Linux, user processes may run in kernel mode under restricted circumstances.
A) True
B) False
C) Only if they have root privileges
D) Only during system boot
E) Only when using the sudo command
Correct Answer: B) False
Rationale: User processes always run in user mode. When a process requires a kernel
service, it executes a system call, which switches the CPU to kernel mode to run kernel
code, but the user process itself does not "run" in kernel mode.

Question 2
In Linux, pressing *Ctrl-* while a process is running in the foreground generates a core dump
after process termination. This is because it sends which signal?
A) SIGINT
B) SIGKILL
C) SIGQUIT
D) SIGTERM
E) SIGSTOP
Correct Answer: C) SIGQUIT
Rationale: The default action for SIGQUIT (triggered by Ctrl-) is to terminate the process
and produce a core dump for debugging purposes.

Question 3
In Linux, the kernel is considered the "main process" of the operating system.
A) True
B) False
C) Only in single-user mode
D) True, because it has PID 1
E) False, because the kernel is a thread
Correct Answer: B) False
Rationale: The kernel is not a process; it is a resource manager that manages processes. The
first process started by the kernel is init (or systemd), which has PID 1.

Question 4
Which of the following statements regarding the exec() family of system calls is correct?
A) fork() must always be called after exec().
B) All exec() calls are ultimately based on the execve() system call.
C) exec() creates a new PID for the program it loads.
D) exec() returns to the calling program upon success.

, 2



E) exec() is used to create a background daemon.
Correct Answer: B) All exec() calls are ultimately based on the execve() system call.
Rationale: While there are several wrappers (execl, execp, etc.), execve() is the actual system
call provided by the kernel that handles program execution.

Question 5
A programmer uses execv("myprog", arg_list). Which of the following is true about this call?
A) Arguments are passed as an explicit list of strings.
B) The system searches the PATH environment variable for "myprog".
C) Arguments are supplied inside an array (vector).
D) It allows the passing of custom environment variables.
E) It terminates the child process and returns to the parent.
Correct Answer: C) Arguments are supplied inside an array (vector).
Rationale: The 'v' in execv stands for vector, meaning the arguments are passed as a null-
terminated array of character pointers.

Question 6
Which exec function should be used if the programmer wants to provide an explicit list of
arguments and manually specify the environment variables?
A) execv
B) execlp
C) execle
D) execvp
E) execl
Correct Answer: C) execle
Rationale: The 'l' indicates a list of arguments, and the 'e' indicates that a pointer to an
environment array is provided.

Question 7
The execlp() and execvp() system calls differ from execl() and execv() because they:
A) Require root privileges.
B) Perform command lookup by searching the directories listed in the PATH environment
variable.
C) Can only be called by the init process.
D) Do not require a null terminator in the argument list.
E) Automatically fork a new process before executing.
Correct Answer: B) Perform command lookup by searching the directories listed in the
PATH environment variable.
Rationale: The 'p' in these functions stands for "path," allowing the system to find the
executable in standard system directories.

, 3



Question 8
Which system call is used to retrieve the set of signals that are currently pending for a process
(signals that have been sent but are blocked)?
A) sigprocmask()
B) sigaddset()
C) sigpending()
D) sigaction()
E) kill()
Correct Answer: C) sigpending()
Rationale: sigpending() allows a process to examine which signals are waiting to be
delivered because they are currently in the process's blocked signal set.
Question 9
What is the purpose of the sigprocmask() system call?
A) To send a signal to a specific process group.
B) To change the disposition of a signal to SIG_IGN.
C) To examine or change the signal mask (blocked signals) of the calling process.
D) To terminate a process that is stuck in an infinite loop.
E) To map a signal to a specific hardware interrupt.
Correct Answer: C) To examine or change the signal mask (blocked signals) of the calling
process.
Rationale: sigprocmask() is used to block, unblock, or set the entire set of signals the process
refuses to handle at the moment.

Question 10
In sigprocmask(int how, const sigset_t *set, sigset_t *oldset), which value for how is used to
replace the current blocked set with a new one?
A) SIG_BLOCK
B) SIG_UNBLOCK
C) SIG_SETMASK
D) SIG_REPLACE
E) SIG_IGNORE
Correct Answer: C) SIG_SETMASK
Rationale: SIG_SETMASK ignores the previous mask and makes the provided set the new
signal mask.

Question 11
Which signal cannot have a handler function set for it and cannot be ignored?
A) SIGINT
B) SIGQUIT
C) SIGKILL

Geschreven voor

Instelling
CS-374 M4
Vak
CS-374 M4

Documentinformatie

Geüpload op
3 maart 2026
Aantal pagina's
27
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$18.99
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
DoctorGriffin Maryland University
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
2854
Lid sinds
9 maanden
Aantal volgers
20
Documenten
1566
Laatst verkocht
1 dag geleden

4.8

196 beoordelingen

5
174
4
16
3
2
2
2
1
2

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen