Operating Systems Flashcards
What is an operating system?
The program that manages a computer’s resources, especially the allocation of those resources among other programs (CPU)
Purpose of operating system
Running several applications at the same time. The Operating System needs to manage the use of hardware resources amongst several applications
Definition of a process
A program in memory that is in execution.
Several processes can be in memory at the same time.
Processes can be run through several threads.
Consists of code (machine code instructions) and data in memory
Layered Architecture of an OS
Kernel + libraries + tools
Advantages of UNIX
Highly modular– includes only features you need
Highly scalable and portable– from mobile phones, desktops to supercomputer
Highly reliable– update mechanism, desktop, servers and cloud
Highly cost-effective – Linux and Android are free
Describe the five different states a process can obtain during its lifespan
running- a process currently has CPU ready- process is ready to get CPU blocked- process is waiting for some event new- created but not admitted exit- process destruction
What is a message identifier?
Named constant that identifies the purpose of the message
What are message parameters?
Specify data or the location of data used by a window procedure when processing a message
How are threads and processes scheduled?
CPU priority. They wait in a queue for their turn on the CPU. A process/thread can be in different states, i.e. waiting or running. The OS scheduler determines how long each process/thread can run before it is taken off the CPU.
How is the memory managed?
All memory areas, allocated or available, are preceded and followed by structures known as memory links. These links contain information about the area that they enclose. Using this information, the operating system can determine if the area is available or in use. If the area is currently in use, the operating system can also decide whether the area can be moved to virtual memory or moved to another location in the main memory.
How is the address translation performed?
When the system allocates a frame to any page, it translates this logical address into a physical address and creates an entry into the page table to be used throughout the execution of the program. When a process is to be executed, its corresponding pages are loaded into any available memory frames
How is the disk space for files organised?
divide files into blocks of fixed size
file is stored as blocks that are not necessarily adjacent
Explain the FAT file system
The FAT file system divides the disk space into
blocks. Pointers to each block are used in the File Allocation Table. Files are broken up into many blocks which are linked together. The entries in the File Allocation Table are the block number of the next linked block. The directory entry contains a pointer to the first file block.
Characteristics of process
Process environment- lives in a protected (memory) environment. No interference between processes. But communication between processes is possible (IPC - inter-process communication)
Resource Ownership- allocated virtual address space
(protected memory). Assigned from main memory. Control of I/O channels. Files
Code Execution- Single thread (classic process). Multi-threaded (modern process)
What are threads?
A sequence of instructions which exist within the same process. Every process has at least one thread. Threads of the same process share the same process resources, including memory and file access. Threads can run in parallel.