Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 16 pages
Exam (elaborations)

CSCI 1730 FINAL (LAMARCA) FINAL EXAM QUESTIONS AND ANSWERS GRADED A+ 2026

Document preview thumbnail
Preview 3 out of 16 pages

CSCI 1730 FINAL (LAMARCA) FINAL EXAM QUESTIONS AND ANSWERS GRADED A+ 2026

Content preview

CSCI 1730 FINAL (LAMARCA) FINAL
EXAM QUESTIONS AND ANSWERS
GRADED A+ 2026




What is concurrency? State some different examples of concurrency in systems programming. -
ANS 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? - ANS 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? - ANS 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? - ANS system calls: socket(),
bind(), listen(), accept(), connect(), send(), recv(), close()


What is a thread? Why is a thread also called a lightweight process? - ANS 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.




@COPYRIGHT 2026/2027 ALL RIGHTS RESERVED
1

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


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


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


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


what is an active participant? - ANS client


what is a passive participant? - ANS server


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


Do concurrent processes need to be run on the same machine? - ANS 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? - ANS


what system calls are used to handle the IPC between the two processes in the command below

? ls | grep *.c - ANS


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

@COPYRIGHT 2026/2027 ALL RIGHTS RESERVED
2

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


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


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


what is the difference between a library function call and a system function call? -
ANS 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? -
ANS 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? - ANS 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? - ANS 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


What different kinds of constructors and destructors are there in C++? What are their purposes?
Explain why C doesn't have constructors and destructors. Explain why Java classes typically


@COPYRIGHT 2026/2027 ALL RIGHTS RESERVED
3

Document information

Uploaded on
March 4, 2026
Number of pages
16
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$12.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
TheStar
3.7
(140)
Sold
713
Followers
178
Items
27203
Last sold
1 day ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions