Week 2-3 Flashcards

1
Q

What are the 8 components of an Operating System?

A
  • Process management
    • Memory management
    • File management
    • I/O management
    • Secondary Management
    • Networking
    • Protection System
    • Command- Interpreter
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a process?

A

• A collection of resources that are seen as instances of the program
◦ Includes: Memory, CPU time, one files, I/O

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

What are the process states?

A
  • New (Process Starts)
    • Ready (Dispatch to Running)
    • Wait (For I/O or event request)
    • Running (Interrupt turns to ready)
    • Exit to done
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are System calls and how are they passed? Examples of types?

A
  • They interface between the operating system and a running process,
    • Manages processes, file systems, device management, information maintenance, communication
    • Called by the stack or in a register
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are virtual machines and what are their benefits?

A
  • Allows for multiprocessing, which create the illusion that there is more than a CPU.
    • Allows for sandboxing, and portability. Example is the Linux Kernel for Android. Works across platforms
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the process control blocks?

A

◦ Holds information that programs use to run

◦ Queue information, process state, registers…

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

What is a context switch

A

• Allows for the storing of a process (More like the storing of registers) be used in the future so that another process can run

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

What are the three states of a Queue scheduler?

A
  • Ready Queue - Holds the processes that are ready to run
    • Device Queue - Holds all processes that are waiting for IO
    • Suspend Queue - Holds all processes that are suspended.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the two types of processes and what is their priority?

A
  • I/O - High Priority

* CPU bound - Low Priority

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

What is the difference between a parent and child process?

A

• Parents create subprocesses called child processes, can be separate or dependant on each other depending on OS. Processes are usually clones of each other.

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

What is the difference between a independent process and a cooperating process?

A
  • An indépendant process cannot be affected by other processes
    • Cooperating processes can be effected (think of the consumer producer model, or sending and receiving messages, through a mailbox or direct communication with explicit identifiers)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the types of Threads

A
  • User threads made by libraries. Advantages - Fast, but no multiprocessor support
    • Kernel Threads, Advantages - MP support, not as fast as user threads
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is process synchronization

A

Allows sharing of system resources so that data is properly able to be accessed by multiple processes
• Usually goes by race condition where a value depends on the process that finishes last

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

What is a critical section

A
  • A protected part of a process that a resource can access only one at a time
    • If a process stalls, it cannot be there forever.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is bounded waiting

A
  • A processes can only enter a critical section a certain amount of times
    • After a process makes a request for getting into its critical section, there is a limit for how many other processes can get into their critical section, before this process’s request is granted. So after the limit is reached, system must grant the process permission to get into its critical section. The purpose of this condition is to make sure that every process gets the chance to actually enter its critical section so that no process starves forever.
    • Uses wait, and signal
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the bakery algorithm?

A
  • Generalization for n processes.
  • Each process has an id. Ids are ordered.
  • Before entering its critical section, a process receives a number. The holder of the smallest number enters its critical section.
  • Tie breaker is done using the process id: if processes i and j hold the same number and i < j then i enters first.
17
Q

What are Semaphores and what are the two types

A
  • Counting and binary

* It is used to limit consumers of a specific resource. Think of a bouncer at a nightclub

18
Q

What is the reader writer problem

A

• Is a process is writing, no process can read, if reading, a writer must wait for process