Part II : 1. OS Intro [B1] Flashcards

Ch 1 B1 Operating systems

1
Q

What is an OS, and what are the goals of an OS?

A

A program between the user of the computer and the computer hardware.

Goals:
1. Execute user programs and solve user problems.
2. Make the computer available for the user.
3. Utilize the computer hardware as much as possible.

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

The roles of an OS is resource allocator, and control program. Explain what the roles are and do.

A

The resource allocator handle all the resources, and allocate these resources so that the programs can run as efficiently as possible.

The control program control various I/O devices and user programs. It also manages program execution to prevent errors and improper use of the computer.

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

How does an OS start running the computer?

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

What is multiprocessing?

A

A system. Also known as parallel processor system. Two or more processors or CPU cores work simultaneously to perform multiple instructions to increase performance and efficiency. Multiple independent processor units (chips), each with its set of resources; registers and cache.
Include multicore systems.

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

What is the difference of:
* Symmetric and
*Asymmetric
multiprocessing?

A

Asymmetric multiprocessing; where each processor is assigned a specific task, and may have its own dedicated memory and is responsible for executing a specific function. One boss-processor, the others are work processors. Boss processors controls the system and allocates tasks to workers.
-> Efficient use of resources, and give predictability.

While symmetric multiprocessing SMP; all processors are peers with no boss-worker relationship. All processors share physical memory.
-> Simple and highly scalable.

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

Which computer systems allow multiprocessing?

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

What is multiprogramming?

A

A technique allowing multiple jobs to be in memory at the same time, ensuring that the CPU always has a job to execute.

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

What are the advantages of multiprogramming?

A

Optimizing utilization of the CPU.

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

What is dual/ -multimode operation?

A

User mode and kernel mode. The CPU operate in different modes to distinguish between the execution of usr level code and privileged / system code.
User mode -> restricted access to system resources.
Kernel mode -> full access.

Help ensure the security and stability og the OS.

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

What is a timer?

A

A mechanism to ensure that the operating system maintain control over the CPU, so that a user program does not get stuck in a infinite loop or to fail to call system services and never return control to the OS.

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

Give an overview of how OS manage process/memory/mass-storage

A

NB copy paste CHATGPT atm
Process Management:

Process Creation and Termination: The OS is responsible for creating, scheduling, and terminating processes. This involves allocating resources such as CPU time, memory, and I/O devices.
Scheduling: The OS employs scheduling algorithms to determine the order in which processes are executed. This includes managing the ready queue and deciding which process gets access to the CPU at any given time.
Interprocess Communication (IPC): The OS facilitates communication between processes. This can involve shared memory, message passing, or other mechanisms for processes to exchange information.
Memory Management:

Memory Allocation: The OS is responsible for allocating and deallocating memory to processes. This includes managing different memory regions, such as the stack, heap, and code segments.
Virtual Memory: Many modern operating systems use virtual memory, allowing processes to use more memory than physically available by swapping data between RAM and secondary storage (like a hard drive).
Memory Protection: The OS ensures that one process cannot access the memory space of another unauthorized process, providing memory protection through techniques like segmentation and paging.
Mass Storage Management:

File System: The OS manages files on mass storage devices such as hard drives or SSDs. This includes organizing data into directories, supporting file operations (read, write, delete), and maintaining metadata.
Device Drivers: The OS includes device drivers that allow it to communicate with various mass storage devices. These drivers provide a standardized interface for the OS to interact with different hardware.
Disk Scheduling: When multiple processes or applications are trying to access the disk simultaneously, disk scheduling algorithms help optimize the order in which requests are serviced to improve overall system performance.
Caching and Buffering: The OS may use caching and buffering mechanisms to optimize access to mass storage. Frequently accessed data may be kept in cache to reduce the need for time-consuming disk operations.
Overall, the OS acts as an intermediary between the hardware and applications, providing a layer of abstraction that simplifies programming and resource management. Effective management of processes, memory, and mass storage is critical for ensuring the efficient and secure operation of a computer system.

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

Explain briefly what protection and security are.

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