Week 2-3 Flashcards
What are the 8 components of an Operating System?
- Process management
- Memory management
- File management
- I/O management
- Secondary Management
- Networking
- Protection System
- Command- Interpreter
What is a process?
• A collection of resources that are seen as instances of the program
◦ Includes: Memory, CPU time, one files, I/O
What are the process states?
- New (Process Starts)
- Ready (Dispatch to Running)
- Wait (For I/O or event request)
- Running (Interrupt turns to ready)
- Exit to done
What are System calls and how are they passed? Examples of types?
- 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
What are virtual machines and what are their benefits?
- 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
What are the process control blocks?
◦ Holds information that programs use to run
◦ Queue information, process state, registers…
What is a context switch
• Allows for the storing of a process (More like the storing of registers) be used in the future so that another process can run
What are the three states of a Queue scheduler?
- 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.
What are the two types of processes and what is their priority?
- I/O - High Priority
* CPU bound - Low Priority
What is the difference between a parent and child process?
• Parents create subprocesses called child processes, can be separate or dependant on each other depending on OS. Processes are usually clones of each other.
What is the difference between a independent process and a cooperating process?
- 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)
What are the types of Threads
- User threads made by libraries. Advantages - Fast, but no multiprocessor support
- Kernel Threads, Advantages - MP support, not as fast as user threads
What is process synchronization
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
What is a critical section
- 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.
What is bounded waiting
- 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