Midterm Flashcards

1
Q

Whats a process

A

an application program that is running on a system

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

What does a process do

A
  • the user creates a program, typically in a high-level language (for example, C)
  • the compiler converts the statements of the program into machine instructions and stores the
    instructions in a file; this file is called an executable or an executable image
  • the compiler also defines any static data or global data that the program needs and puts that information into the executable image
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What resource(s) does a process need

A
  • loads the executable image (the instructions and data) into memory
  • sets aside a memory region, called the stack, for the process
  • sets aside a second memory region, called the heap
  • sets the stack pointer to point to the top of the stack
  • jumps to the program’s first instruction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Process-Control Block

A
  • a data structure that the OS uses to keep track of active processes
  • contains all of the info that the OS needs about a particular process: where it is in memory; which
    user asked it to execute; what privileges it has; etc.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Memory-Protection: Base and Bound Checking

A

Memory protection mechanisms, such as base-and-bound checking, are used to ensure that a process cannot access memory outside its allocated region. In base-and-bound checking, each process is assigned a base register and a bound register. The base register specifies the start address of the process’s allocated memory, and the bound register specifies the size of the allocated memory. Any memory access outside this range triggers a hardware exception, preventing processes from interfering with each other’s memory.

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

Why Memory Protection Is Required:

A

Security: It prevents one process from accessing or modifying the memory used by other processes, enhancing system security and stability.
Isolation: It ensures that processes do not interfere with each other, reducing the risk of unintended data corruption or program crashes.
Reliability: Memory protection helps maintain the integrity of the operating system and user programs.

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

Contiguous Memory Allocation: Characteristics

A

Simplicity: It’s easy to implement because each process occupies a continuous region of memory.
Efficient Access: It allows for efficient memory access, as there is no fragmentation.

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

Contiguous Memory Allocation: Advantages

A

Efficient Memory Access: There is no need to traverse multiple memory blocks, leading to faster memory access.
Simple Management: Allocating and deallocating memory is straightforward.

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

Contiguous Memory Allocation: Disadvantages

A

Fragmentation: External fragmentation occurs when memory becomes fragmented, making it challenging to allocate memory for new processes.
Limited Flexibility: It may not be suitable for systems with varying memory needs and multiple processes.

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

What is Dual-Mode Operation

A

Dual-mode operation refers to the execution of a CPU in one of two modes: user mode and kernel mode (also known as supervisor or privileged mode). It’s needed for security and protection.

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

Why is Dual-Mode Operation Needed

A

Dual-mode operation is required to protect the integrity of the operating system and prevent user processes from accidentally or maliciously interfering with system operations. It allows the OS to maintain control over system resources and ensure system stability and security.

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