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
Document preview thumbnail
Voorbeeld 2 van de 7 pagina's
Tentamen (uitwerkingen)

CSCI 1730 FINAL (LAMARCA) QUESTIONS

Document preview thumbnail
Voorbeeld 2 van de 7 pagina's

CSCI 1730 FINAL (LAMARCA) QUESTIONS

Voorbeeld van de inhoud

CSCI 1730 FINAL (LAMARCA) QUESTIONS


What is concurrency? State some different examples of concurrency in systems
programming. - Answer -concurrency - when two or more3 things are executing at the
same time. Examples of concurrency - bash, operating system, emacs, user programs,
signals, pipes, File I/O, and sockets.

How does a C programmer write a single program that can exhibit concurrent behavior?
What system calls are involved in creating a process that exhibit concurrent behavior? -
Answer -the user can call fork or use a pthread in a single program. System calls: fork()
and pthread()

What is IPC? How does IPC relate to systems programming and concurrency? -
Answer -IPC - inter-process communication. It allows the programmer to coordinate
activities among various program processes which can run concurrently in a OS

What system calls are used in network IPC and concurrency? - Answer -system calls:
socket(), bind(), listen(), accept(), connect(), send(), recv(), close()

What is a thread? Why is a thread also called a lightweight process? - Answer -A
thread is a way for a program to divide into itself into two or more simultaneously
running tasks. Sometimes called lightweight processes because they have their own
stack but can access shared data.

what is the difference between a multi-threaded process and a process that forks into a
child and parent process? - Answer -Threading runs multiple line of execution
intraprocesses. Forking is a means of creating new processes.

What system calls are associated with pthreads? - Answer -system calls:
pthread_self(), pthread_equal(), pthread_create(), pthread_exit(), pthread_join(),

what is a signal handler and when are they used? - Answer -signal handler - a function
which is called when the target environment when the corresponding signal occurs

what system calls are associated with sockets? - Answer -system calls:

what is an active participant? - Answer -client

what is a passive participant? - Answer -server

What system calls does a passive participant typically call that an active participant may
not typically call. - Answer -listen() and accept()

, Do concurrent processes need to be run on the same machine? - Answer -no

Suppose computer A is running process B and computer C is running process D. also
suppose A and C are different computers running different hardware and B & C are
running concurrently. Can IPC be established between be and D. So then, what system
calls are typically involves in the IPC between B and C? If not, explain why B and C
cannot establish IPC? - Answer -

what system calls are used to handle the IPC between the two processes in the
command below
? ls | grep *.c - Answer -

what is section 1 of the manual pages on odin used for? - Answer -Applications

what is section 2 of the manual pages on odin used for? - Answer -system calls

what is section 3 of the manual pages on odin used for? - Answer -library functions

When reading a manual page on odin, how do you know what section you are in? -
Answer -

what is the difference between a library function call and a system function call? -
Answer -system call - a call made by the program to enter into kernel mode to access a
process
function call - made by the program to access a library function defined in a
programming library

what are the functions htonl(...) and ntohl(...) used for? Why are they typically used? -
Answer -htonl() - takes a 32-bit number in host byte order and returns a 32-bit number
in the network byte order
ntohl()- converts the unsigned integer netlong from network byte order to host byte
order.
used in TCP/IP networks, do nothing on big-endian, on little-endin they reverse the byte
order,
used for machines to communicate with each other over the network

In C++, what is the difference between pass by value and pass by reference? - Answer
-pass by value only passes a copy of a variable. meanwhile pass by refernce actually
passes the variable allowing it to be changed.

Does C have pass by reference? if not, how do we use pass by value to simulate pass
by reference behavior in C? - Answer -No. You can use dereferenced pointers as
arguments in the function definition. Also use the 'address of' (&) operator on the
variables when calling the functions

Documentinformatie

Geüpload op
13 december 2025
Aantal pagina's
7
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden
€12,39

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

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.
GEEKA
3,8
(363)
Verkocht
2147
Volgers
1448
Items
59408
Laatst verkocht
3 dagen geleden

Echte notities, van echte studenten
Elk document op Stuvia is geschreven door een medestudent die hetzelfde vak deed. Zo leer je van iemand die het al heeft gehaald.



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