Mapa mental
Processes

Conteúdo do mapa
Processes
What's a 'process'?
- A program IN execution
- A program that has its own address space includes:
- Text Section
- Stores the code that the processor executes
- Data section
- Stores global variables
- Stack
- Stores local variables + function parameters
- Heap
- Memory dynamically allocated during runtime
- Text Section
- Processors are separated from one another
- A program that has its own address space includes:
- Unit of work in a modern computer system
- NOT a program
- Program = passive entity
- Process = active entity
- Can be Independent or Cooperating
- e..g for info sharing, computation speedup, convience
- via shared memory or message passing
- e..g for info sharing, computation speedup, convience
- A program IN execution
Process Concept
- A key OS abstraction that users see
- The environment you interact with is built out of processes
- e.g. Shell
- e.g. executing a program you've compiled
- e.g. web browser
- Organising system activities around processes is useful for separating activities
- Resource Sharing
- Key Issue: Ensure all processes get fair share of CPU
- Pre-Emptive Multitasking
- OS runs one process for a while, takes CPU from that process and lets another process run
- Must save and restore process state
- Process State
- new
- process is being created
- running
- instructions being executed
- waiting
- process waiting for some event to occur (I/O)
- ready
- process waiting to be assigned processor by scheduler dispatcher
- terminated
- process finished execution
- Process Control Block (PCB)
- Holds current state of a process
- Process state
- Program counter
- CPU registers
- CPU scheduling information
- Memory management info
- Accounting info
- I/O status
- Holds current state of a process
- Context Switching
- Saving + Loading states
- Context switch time = overhead
- Solution: Threads
- new
- Process State
- Scheduling Queues
- Job Queue
- All processes in system
- Ready Queue
- All processes residing in memory 'ready'
- Device Queues
- Processes waiting for an I/O device
- Job Queue
- Must save and restore process state
- OS runs one process for a while, takes CPU from that process and lets another process run
- Pre-Emptive Multitasking
- Key Issue: Ensure all processes get fair share of CPU
- Resource Sharing
- The environment you interact with is built out of processes
- A key OS abstraction that users see
Operations on Processes
- Process Creation
- Parent process creates child processes
- Produces tree of processes
- Resource Sharing Possibilities
- Share all resources
- Subset of resources
- No resources shared
- Execution Possibilites
- P/C execute concurrently
- P waits for C termination
- Address Space Possibilites
- C duplicate of P
- C has mew program loaded
- Parent process creates child processes
- Process Termination
- Process executes last statement
- Asks OS to delete it (exit system call)
- Output data from child to parent (wait system call)
- Process resources de-allocated by OS
- Asks OS to delete it (exit system call)
- Parent may terminate execution of child process (abort system call)
- Cascading Termination = All children terminated
- Process executes last statement
- Process Creation
Imagens e arquivos do mapa
Informações
- Descrição
- Computer Science Mapa Mental sobre Processes, criado por Alex Bernini em 06-05-2019.
- Criado por
- Alex Bernini
- Visualizações
- 0
- Avaliação




