Skip to main content

9. Operating System - Extra



Interrupt: In system programming, an interrupt is a signal to the processor emitted by hardware or software indicating an event that needs immediate attention.

Trap: In computing and operating systems, a trap, also known as an exception or a fault, is typically a type of synchronous interrupt caused by an exceptional condition (e.g., breakpoint, division by zero, invalid memory access).

Signal: A signal is a software-generated interrupt that is sent to a process by the OS because when the user press ctrl-c or another process tells something to this process. There is fix set of signals that can be sent to a process. Signals are identified by integers. A signal number has symbolic names.

System call: The interface between a process and an operating system is provided by system calls. System calls are usually made when a process in user mode requires access to a resource. Then it requests the kernel to provide the resource via a system call.

Types of System calls:

  • Process control.
  • File management.
  • Device management.
  • Information maintenance.
  • Communications.

Fork system call: Fork system call is used for creates a new process, which is called the child process

Exec: 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. This act is also referred to as an overlay.

Wait: The system call wait () is easy. This function blocks the calling process until one of its child processes exits or a signal is received. 

Exit: exit (system call): On many computer operating systems, a computer process terminates its execution by making an exit system call.

Thread: Thread is a single sequence stream within a process. Threads have the same properties as the process so they are called lightweight processes

Multicore programming: Multicore programming helps you create concurrent systems for deployment on multicore processors and multiprocessor systems. A multi-core processor system is a single processor with multiple execution cores in one chip. By contrast, a multiprocessor system has multiple processors on the motherboard or chip.

CPU scheduling: The aim of CPU scheduling is to make the system efficient, fast, and fair. 

Process synchronization: Process Synchronization means sharing system resources by processes.

Semaphore: In computer science, a semaphore is a variable or abstract data type used to control access to a common resource by multiple processes in a concurrent system such as a multitasking operating system.

Deadlock: A deadlock is a situation in which two computer programs sharing the same resource are effectively preventing each other from accessing the resource, 

MVT: MVT (Multiprogramming with a Variable number of Tasks) is the memory management technique in which each job gets just the amount of memory it needs. That is, the partitioning of memory is dynamic and changes as jobs enter and leave the system

MFT: MFT (Multiprogramming with a fixed number of Tasks) is one of the old memory management techniques in which the memory is partitioned into fixed-size partitions and each job is assigned to a partition. The memory assigned to a partition does not change.

Inter-process communication: Inter-process communication (IPC) is a set of programming interfaces that allow a programmer to coordinate activities among different program processes that can run concurrently in an operating system.

Multithreading: Multithreading is the ability of an operating system process to manage its use by more than one user at a time and to even manage multiple requests.

Contagious Memory Allocation: In contiguous memory allocation, when a process requests for the memory, a single contiguous section of a memory block is assigned to the process according to its requirement.

Critical section: 

Comments

Popular posts from this blog

3.Operating System - Services

Program Execution: The OS is responsible for executing programs. It loads the program into memory and executes the program. Program execution also includes process sync, process communication, and deadlock handling.  I/O Operation :  An I/O subsystem comprises I/O devices and their corresponding driver software. I/O operation means read or write operation with any file or any specific I/O device. OS provides the access to the required I/O device when required. File System Manipulation:  A file represents a collection of related information. A file system is normally organized into directories for easy navigation and usage. The operating system gives the permission to the program for operation on file. Permission varies from read-only, read-write, denied, and so on. Operating System provides an interface for the user to create/delete files. Operating System provides an interface for the user to create/delete directories. Operating System...

4.Operating System - Properties

Batch Processing:  Batch processing is a technique in which an Operating System collects the programs and data together in a batch before processing starts. Multitasking:  Multitasking is when multiple jobs are executed by the CPU simultaneously by switching between them. Multiprogramming:  Sharing the processor, when two or more programs reside in memory at the same time, is referred to as multiprogramming. Interactivity:  Interactivity refers to the ability of users to interact with a computer system. Real-Time System:  Real-time systems are usually dedicated, embedded systems. The Operating system must guarantee a response to events within fixed periods of time to ensure correct performance. Distributed Environment:  A distributed environment refers to multiple independent CPUs or processors in a computer system. The OS distributes computation logic among several physical processors. The processors do not share a memory or a clock. Instead, each proces...

CPP

Basics Downloading and installing CodeBlock Creating and explaining first project Hello World – the terms (keyword, main, header file) Keyword – Keywords are reserved words for compiler whose purpose is already defined in compiler and user cannot use for personal use. E.g if, else, double, switch main – main is a necessary function to define to execute C/C++ program. Without main, we cannot run our program. Header file  - header file contains functions that perform certain tasks  Characters \n, \t, \a data types: int – 4b, float – 4b, double – 8b, char – 1b, string – equal to the number of characters variable: rules to define a variable cannot start with numbers and special characters. Only special character acceptable is _ e.g. _age Camel case: weightInKg Snake Case: weight_in_kg declaration vs initialization arithmetic operations (+, -, *, /, %) input from user – cin, getline() relational operators (>=, <=, >, <, ==, !=) if selection statement if…else – double s...