1/23
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Synch Io
The computer can’t do anything with it until it the computer computes an input/output
Asynch IO
Programming technique that allows a program to preform other tasks while waiting for input/output operations
Are interrupts external or internal processes?
External
When a process creates multiple threads, all threads share one (1) program counter (PC) that keeps track of the current location within the program being executed. True or False
False
One of the services an Operating System provides is “Protection and Security”, which provides an access control to the processes & files as well as the defense against internal and external attacks. True or False?
True
A computer can run a program stored on the disk directly without loading it to the main memory. True or False?
False
An Operating System is considered as an “interrupt-driven” software. True or False?
True
Differences between parallelism and concurrency?
Concurrency is when multiple tasks make progress by sharing time, but not necessarily running at the same moment, while parallelism is when multiple tasks are executed simultaneously on different processors or cores. Concurrency focuses on task management, whereas parallelism focuses on task execution.
Explain why an Operating System is usually designed to have Stack and Heap memory spaces grow into the opposite directions (one from lower address to higher, the other from higher to lower).
An operating system designs the stack and heap to grow in opposite directions to maximize efficient use of memory, allowing them to expand dynamically without immediately overlapping, thus optimizing available space between them. This layout minimizes fragmentation and better handles varying memory needs.

The first PID is the Java program's own process, while the second PID is for the new process created by running the ls -lrt command. Each represents a different process.
When using a Mutex lock to achieve synchronization, a thread failing to acquire a lock "busy waits" until successfully acquiring a lock. True or False?
True
When a thread starts waiting for a condition variable, a thread releases a lock previously acquired AND doesn't consume any CPU resources while waiting. True or False?
True
Semaphore initialized with the integer value 0 works in the same way as a Mutex lock. True or False?
False
Explain what a critical section of the code is when multiple processes and/or threads are running simultaneously.
A critical section is the part of a program where shared resources are able to be accessed, written, and modified from multiple people. While the processes are running only one user at a time can enter the critical section using synchronization (locks and semaphores).
What is a program?
A program is a set of instructions stored on disk.
What is a process?
A process is an instance of a program in execution, including its code, data, and resources like memory and CPU time.
What is parallelism?
the computer makes progress in multiple
jobs/processes simultaneously
What is concurrency?
the computer provides impression that
multiple jobs/processes are making progress
simultaneously.
Stack
Temporary data is only used minimally
Is creating a process slower then creating a thread? True or False
True
What is unsafe code?
Unsafe code allows multiple users to edit the code
Mutex lock
Only one thread can access the memory at the same time
Semaphore
Constantly checks if it can access. It allows multiple threads but has a limit.
Why are mutex and semaphore similar?
Because they use busy wait