Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

OC – END OF LECTURE QUIZZES

Question 1 - 0.5 / 0.5 pts [Q1 from quiz 2 – 29th Jan]

A binary files can be defined as


a) A file that contains zeros and ones
b) A file that uses 7 bits out of each byte
c) A file that uses 9 bits out of each byte
d) A file that uses 8 bits out of each byte

Question 2 - 0.5 / 0.5 pts

The address space of a process refers to the space it uses in the


a) TLB
b) Hard-drive
c) Cache
d) RAM

Question 3 - 0.5 / 0.5 pts [Q3 from quiz 1 – 22nd Jan]

A program counter is
a) A register used to store the address of the latest instruction
run for a program. Each program has a program counter.
b) A register used to store the number of currently running
programs on a computer
c) A security mechanism to counter programs.

Question 4 - 0.5 / 1 pts [Q4 from quiz 1 – 22nd Jan]

Which of the following statements is true? (select two)


a) A thread can have multiple processes in it
b) Threads from the same process share the process' local
variables
c) A process can have multiple threads in it
d) Processes from the same thread share the thread's local
variables

Question 5 - 1 / 1 pts [Q2 from quiz 1 – 22nd Jan]

A stack frame is created when


a) A function is called
b) A parameter is passed to a function
c) A variable is dynamically created (e.g., using "new" in Java)
d) A static variable is created (e.g., using "int i;" in Java)

Question 6 - 1 / 1 pts [Q2 from quiz 2 – 29th Jan]

Examples of "Character" special files include (select two)


a) ".character" files
b) a network interface
c) .docx files
d) .txt files
e) a terminal

Question 7 - 1 / 1 pts [Q3 from quiz 2 – 29th Jan]


In the context of file management systems, "random access"
refers to
a) Generating a random number, then giving OS users access to
it.
b) No need to read bytes 1 to n-1 before reading or writing byte
n
c) The OS can randomly decide on which files to access first.
d) You need to read bytes 1 to n-1 before randomly reading or
writing byte n
Question 8 - 1.5 / 1.5 pts [Q4 from quiz 2 – 29th Jan]

Which of the following makes a text file executable? (some of the


options are not valid commands!)

a) chmod user+x file


b) chmod u x file
c) chmod u-x file
d) chmod a+exe file
e) chmod a+x file
(the above questions are from these screenshots below)
OC – TEST ANSWERS

You might also like