What is an operating system?
An operating system is the software layer that manages a computer’s resources for its users and their applications.
What happens when you run a program?
CPU:- Fetches instructions stored in exe file- Loads data stored in exe file- Decodes and executes the instructions- Stores result to memory
What are the jobs of an OS?
What are the design goals of an operating system?
Explain short: What is the goal of process abstraction?
The goal of process abstraction is to run multiple processes concurrently, by time sharing the cpu. We then need mechanisms (context switch) and policy(scheduler). This makes the illuision that each program has it’s own isolated machine.
What is virtualization of the CPU?
What can a program read and update when it is running?
What is I/O?
I/O stands for input and output and is reffered to devices connected to a computer. This could be a mouse and keyboard.
Which states can a process be? Explain them| Give the possible transitions between the three states.
Which data structure is where the operating system keeps the program counter, stack pointer and other information about a process.
PCB (process control block)
What does a PCB (process control block) contains?
What does API stand for?
Application programming interface (API)
Why do we have an API in the OS?
What does fork() do?
What does exec() do?
In computing, exec() is a functionality of an operating system that runs an executable file in the context of an already existing process, replacing the previous executable.
What does exit() do?
Exit() terminates a process
What does wait() do?
Wait() causes a parent to block until child terminates/exits or a signal is received.
What happens during fork()?
What happens during wait()?
What happends during exec()?
What different modes can an OS run a executable from?| Which two modes does the OS have?
User and kernel mode
What is kernel mode?
When is trap function called?
What is a trap function?
It is a software interrupt generated by the user program or by an error when the operating system is needed by it to perform the system calls or an operation