Operating Systems Flashcards

1
Q

What is an operating system?

A

An operating system is software that manages resources

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the 2 main responsibilites of an OS?

A
  1. To manage the resources of a system
  2. To provide an execution environment for programs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the 3 main components of an OS’s structure?

A
  1. UI (GUI, CLI)
  2. System Call Module
  3. Kernel (resource management, program execution, file system, etc.)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a kernel?

A

A kernel is the core component of an operating system. A kernel is composed of services such as resource management, program execution, file system, protection and security, etc. The kernel is what communicates with the hardware of a system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the 4 main hardware devices of a system?

A
  1. CPU
  2. Memory
  3. Storage
  4. I/O devices
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the purpose of a CPU?

A

The purpose of a CPU is to execute the instructions of a program that has been loaded into memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the difference between a single-core and multicore CPU?

A

A single-core CPU can only execute 1 process/thread at a time. A multicore CPU with N cores can execute N processes/threads at a time. Multicore CPUs make parallel execution possible

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How does CPU cache make a system more efficient?

A

CPU cache makes a system more efficient by storing future instructions so that the CPU does not have to retrieve it from memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What data structure is normally used to represent memory?

A

An array of bytes where each byte is indexed to a memory address

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the 3 attributes that you should keep in mind when comparing memory and storage?

A
  1. Speed
  2. Size
  3. Volatility
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a process?

A

A process is a program (executable) that has been loaded into memory for execution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Give an illustration of the structure of a single-threaded process

A
  • Heap (allocated memory)
  • Stack (function call memory)
  • Global data (initialized/uninitialized variables)
  • Code (executable code)
  • Thread (basic unit of executaion by the CPU)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Give an illustration of the structure of a multithreaded process

A
  • Heap (allocated memory) shared
  • Stack (function call memory) not shared
  • Global data (initialized/uninitialized variables) shared
  • Code (executable code) shared
  • Threads (basic unit of executaion by the CPU)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

When a process is created what data structure does the OS create to represent that process and where is it stored?

A

A process control block which contains the process ID, process state, and other information needed by the OS. This data structure is stored in kernel space

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Can 2 processes communicate with one another?

A

Yes, but this is not the default setting. If 2 processes agree to communicate with one another, they can do so by either shared memory or message passing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a thread?

A

A thread is the basic unit of execution by the CPU

17
Q

When a thread is created, what data structure does the OS create to represent that thread and where is it stored?

A

A thread control block which contains the thread ID, thread state, and other information needed by the OS. This data structure is stored in kernel space

18
Q

Can threads communicate with one another?

A

Yes. Since threads share the same code, global data, and heap of the current process, they can communicate faster than a process communicates with another process

19
Q

What is a thread pool?

A

A thread pool is a set of threads created by a program at start up. The logic is the same for connection pools, it is more efficient to have a pool of threads ready for use than to create and terminate a thread whenever it is needed

20
Q

What are the 2 main reasons why applications are operating-system specific?

A
21
Q

How can an application be made available to run on multiple operating systems?

A