Processes Flashcards
(19 cards)
How does Linux represent a process?
As a task_struct
structure containing PID, state, parent, children, open files, and address space.
What are the typical mobile process management limits in iOS?
Single foreground process controlled by UI and multiple background processes in memory with limits on task duration and activity.
What is a context switch?
The process of saving the state of the current process and loading the state of another process during CPU switching.
What is the difference between a short-term and long-term scheduler?
What is the difference between a short-term and long-term scheduler?
What is shared memory IPC?
A method where processes share a common memory region for communication, requiring synchronization
What is the purpose of a medium-term scheduler?
To reduce degree of multiprogramming by swapping processes in and out of memory and disk.
What are the main IPC models?
Shared memory and message passing.
What is a thread in a process?
A thread is a control flow within a process, allowing multiple locations to execute concurrently, with storage for thread details and program counters.
What is the Linux fork()
system call?
What is the Linux fork()
system call?
What are the key process states?
New, Running, Waiting, Ready, Terminated.
What is a process in an operating system?
A process is a program in execution, consisting of code, current activity, stack, data, and heap, that is active and managed by the OS.
What are the main process scheduling queues?
Job queue (all processes), ready queue (in memory, ready to run), device queues (waiting for I/O devices).
What are typical resource sharing options between parent and child processes?
Share all resources, share subset of resources, or no resources; and execute concurrently or wait for termination.
What are the main parts of a process?
Program code (text), current activity (program counter, registers), stack, data section, and heap.
What does the exec()
system call do?
Replaces the process’s memory space with a new program after a fork()
.
What is message passing in IPC?
A mechanism where processes communicate and synchronize by sending and receiving messages.
What is a socket in interprocess communication?
An endpoint for communication, identified by IP address and port, used for network communication.
What information does the Process Control Block (PCB) contain?
Process state, program counter, CPU registers, scheduling info, memory info, accounting info, I/O status.
What is a context switch overhead?
Time spent saving and loading process states during a CPU switch, which is overhead and not productive work.