Subject / 929 questions

Programming MCQs

Page 20 of Programming multiple-choice questions with answers. Tap an option to check yourself.

Page 20 of 47

Advertisement
Advertisement
Question 391 Operating Systems

What is a system call?

Correct answer A. The interface through which a user program requests a service from the operating system kernel

Open question
Question 392 Operating Systems

What is the difference between an interrupt and a trap?

Correct answer C. An interrupt comes from hardware such as a device, while a trap is a software-generated event such as a system call or division by zero

Open question
Question 393 Operating Systems

What does the interrupt vector hold?

Correct answer C. The addresses of the interrupt service routines for the various devices

Open question
Question 394 Operating Systems

Why does an operating system program a hardware timer to interrupt the CPU periodically?

Correct answer D. To stop a user program from keeping the CPU forever, so the kernel regains control

Open question
Advertisement
Question 396 Operating Systems

What is the key difference between a program and a process?

Correct answer B. A program is passive code stored on disk, while a process is a program in execution with its own state

Open question
Question 400 Operating Systems

What is a context switch?

Correct answer D. Saving the state of the running process and loading the saved state of another process

Open question