Operating Systems Concepts: Process Management, Kernels, and Concurrency, Summaries of Computer science

A comprehensive overview of operating systems, covering key concepts such as process state models, objectives, and characteristics of modern operating systems. It delves into process management, memory management, and different operating system architectures like monolithic kernels and microkernels. The document also explores process scheduling algorithms, inter-process communication (ipc), multithreading models, and the differences between processes and threads. It is designed to enhance understanding of operating system principles and their practical applications, making it a valuable resource for students and professionals in computer science. This document also includes extra questions about types of schedulers and comparison between monolithic and microkernels. A valuable resource for students and professionals in computer science.

Typology: Summaries

2023/2024

Uploaded on 07/16/2025

ashish-chaurasiya
ashish-chaurasiya 🇮🇳

1 document

1 / 19

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Q1)Explain process state model
Q2)Explain objectives and characteristics of modern operating systems
Functions: Operating systems have various functions mentioned below
1) Process management
Creation, Execution & Deletion of user and system processes.
Control the execution of user’s application.
Scheduling of process.
Synchronization, inter-process communication and deadlock handling for processes.
2) Memory management -
It allocates primary as well as secondary memory to the user and system and system process.
Reclaims the allocated memory from all the processes that have finished its execution.
Once used block become free, OS allocates it again to the processes.
Monitoring and keeping track of how much memory used by the process.
3) File management -
Creation & Deletion of files and directories.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13

Partial preview of the text

Download Operating Systems Concepts: Process Management, Kernels, and Concurrency and more Summaries Computer science in PDF only on Docsity!

Q1)Explain process state model Q2)Explain objectives and characteristics of modern operating systems Functions: Operating systems have various functions mentioned below

  1. Process management – Creation, Execution & Deletion of user and system processes. Control the execution of user’s application. Scheduling of process. Synchronization, inter-process communication and deadlock handling for processes.
  2. Memory management - It allocates primary as well as secondary memory to the user and system and system process. Reclaims the allocated memory from all the processes that have finished its execution. Once used block become free, OS allocates it again to the processes. Monitoring and keeping track of how much memory used by the process.
  3. File management - Creation & Deletion of files and directories.

It allocates storage space to the files by using different file allocations methods. It keeps back-up of files and offers the security for files.

  1. Device management - Device drivers are open, closed and written by OS. Keeps an eye on device driver communicate, control and monitor the device driver.
  2. Protection & Security – The resources of the system are protected by the OS. Keeps back-up of data. Lock the system for security purpose by password. Objectives: (Also maybe, OS services)

2)Layered Structure Layered approach, in which the operating system is broken into a number of layers. The bottom layer is the hardware and the top layer is the user interface. An operating-system layer is an implementation of an abstract object made up of data and the operations that can manipulate those data. The layers are selected so that each uses functions (operations) and services of only lower-level layers. This approach simplifies debugging and system verification. The first layer can be debugged without any concern for the rest of the system, because, by definition, it uses only the basic hardware (which is assumed correct) to implement its functions. Once the first layer is debugged, its correct functioning can be assumed while the second layer is debugged, and so on. If an error is found during the debugging of a particular layer, the error must be on that layer, because the layers below it are already debugged. Thus, the design and implementation of the system are simplified. The major difficulty with the layered approach involves appropriately defining the various layers. Because a layer can use only lower-level layers, careful planning is necessary. 3 )Microkernel This method structures the operating system by removing all the non essential components from the kernel and implementing them as system and user level programs. This results in a smaller kernel. Typically, microkernels provide minimal process and memory management, in addition to a communication facility. The main function of the micro kernel is to provide a communication facility between the client program and the various services that are also running in user space. Communication is provided by message passing. One benefit of the microkernel approach is ease of extending the operating system. All new services are added to user space and consequently do not require modification of the kernel. When the

kernel does have to be modified, the changes tend to be fewer, because the microkernel is a smaller kernel. The resulting operating system is easier to port from one hardware design to another. The microkernel also provides more security and reliability, since most services are running as user- rather than kernel-processes. If a service fails, the rest of the operating system remains untouched. However, microkernels can suffer from performance decreases due to increased system function overhead 4)Modules The best current methodology for operating-system design involves using object-oriented programming techniques to create a modular kernel. Here, the kernel has a set of core components and links in additional services either during boot time or during run time. Such a strategy uses dynamically loadable modules and is common in modern implementations of UNIX, such as Solaris, Linux, and Mac OS X. Such a design allows the kernel to provide core services yet also allows certain features to be implemented dynamically. For example, device and bus drivers for specific hardware can be added to the kernel, and support for different file systems can be added as loadable modules. The overall result resembles a layered system in that each kernel section has defined, protected interfaces; but it is more flexible than a layered system in that any module can call any other module. Example- 5)Virtual machines

The kernel acts as the core of the operating system and is divided into three key parts:

  1. System-Call Interface to the Kernel: o Provides a way for user applications to request services from the kernel. o Examples: File system operations (open, read, write), process control (fork, exec,wait), memory management (mmap, brk).
  2. Core Kernel Functions: o Process Management: CPU scheduling, process switching. o Memory Management: Virtual memory, demand paging, page replacement. o File System Management: File system operations, disk and tape drivers. o Device Management: I/O system, character and terminal drivers, signals handling.
  3. Kernel Interface to the Hardware: o The lowest level of the kernel, responsible for direct interaction with hardware components via drivers. If UNIX system architecture is asked: Kernel-explained above

Q 6 )Explain IPC

  • IPC refers to inter process communication
  • Inter process communication (IPC) is the sharing of data between running processes in a computer system.
  • There are two fundamental models of IPC communication: (1) shared memory and (2) message passing. In the shared-memory model, a region of memory that is shared by cooperating processes is established. Processes can then exchange information by reading and writing data to the shared region.
  • In the message passing model, communication takes place by means of messages exchanged between the cooperating processes.
  • Every process has its own data,stack, and extra segment. If two processed need to communicate they need a common memory where sender can write a message and receiver can read it.
  • For bidirectional communication, both processed need read and write permissions to access this common memory.
  • This common memory is called the channel (The same concept applies to multiple processed in a broadcast manner)
  • The CPU can be taken away from a running process before it finishes.
  • A higher-priority process can interrupt a lower-priority one.
  • Used in multitasking and time-sharing systems. -. E.g- RR, SJF, Priority(preempttive)
  1. Non-Preemptive Scheduling
  • Once a process starts execution, it cannot be interrupted until it completes or performs I/O.
  • Simpler but can cause long waiting times (convoy effect).
  • Used in batch processing systems.
  • E.g- FCFS, SJF, Priority(non preemptive) Q 8 )Explain process and process control block A process is a program in execution or an executable instance of a program.

A process is more than the program code, which is sometimes known as the text section. It also includes the current activity, as represented by the value of the program counter and the contents of the processor's registers. A process generally also includes the process stack, which contains temporary data (such as function parameters, return addresses, and local variables), and a data section, which contains global variables. A process may also include a heap, which is memory that is dynamically allocated during process run time. Each process in the operating system is represented by a process control block also known as task control block. Q 9 )Compare process scheduling and process switching

Q 11 )Discuss different multithreading models Many to One: The many-to-one model maps many user-level threads to one kernel thread. Thread management is done by the thread library in user space, so it is efficient; but the entire process will block if a thread makes a blocking system call. Also, because only one thread can access the kernel at a time, multiple threads are unable to run in parallel on multiprocessors. One to One: The one-to-one model maps each user thread to a kernel thread. It provides more concurrency than the many-to-one model by allowing another thread to run when a thread makes a blocking system

call; it also allows multiple threads to run in parallel on multiprocessors. The only drawback to this model is that creating a user thread requires creating the corresponding kernel thread. Because the overhead of creating kernel threads can burden the performance of an application, most implementations of this model restrict the number of threads supported by the system. Many to Many: The many-to-many model multiplexes many user-level threads to a smaller or equal number of kernel threads. In many to one model, true concurrency is not achieved as the kernel can schedule only one process at a time and in one to one, although it allows for improved concurrency abilities, the developer should not create too many threads. Many to many solves both these problems as developers can create as many user threads as necessary, and the corresponding kernel threads can run in parallel on a multiprocessor. Also, when a thread performs a blocking system call, the kernel can schedule another thread for execution. (If difference is asked: )

Q12)Compare process and threads

Extra Questions: Q)Explain types of schedulers

  1. Long-Term Scheduler or Job Scheduler The job scheduler is another name for Long-Term scheduler. It selects processes from the pool (or the secondary memory) and then maintains them in the primary memory’s ready queue. The Multiprogramming degree is mostly controlled by the Long-Term Scheduler. The goal of the Long-Term scheduler is to select the best mix of IO and CPU bound processes from the pool of jobs. If the job scheduler selects more IO bound processes, all of the jobs may become stuck, the CPU will be idle for the majority of the time, and multiprogramming will be reduced as a result. Hence, the Long-Term scheduler’s job is crucial and could have a Long-Term impact on the system.
  2. Short term scheduler CPU scheduler is another name for Short-Term scheduler. It chooses one job from the ready queue and then sends it to the CPU for processing. To determine which work will be dispatched for execution, a scheduling method is utilised. The Short-Term scheduler’s task can be essential in the sense that if it chooses a job with a long CPU burst time, all subsequent jobs will have to wait in a ready queue for a long period. 3.Medium Term scheduler The switched-out processes are handled by the Medium-Term scheduler. If the running state processes require some IO time to complete, the state must be changed from running to waiting. This is accomplished using a Medium-Term scheduler. It stops the process from executing in order to make space for other processes. Swapped out processes are examples of this, and the operation is known as swapping Q)Compare monolithic and microkernels.

Q) Explain classical problems in CS (notes) Q)Explain petersons solution and hardware solutions like test and set,lock based,swap. (notes) Q)What is context switching?(notes) Q)What are computing environments in OS?(notes)