Wednesday, May 22, 2024

File System


A file is a collection of correlated information which is recorded on secondary or non-volatile storage like magnetic disks, optical disks, and tapes. It is a method of data collection that is used as a medium for giving input and receiving output from that program.

In general, a file is a sequence of bits, bytes, or records whose meaning is defined by the file creator and user. Every File has a logical location where they are located for storage and retrieval.

Objective of File management System

Here are the main objectives of the file management system:

  • It provides I/O support for a variety of storage device types.

  • Minimizes the chances of lost or destroyed data

  • Helps OS to standardized I/O interface routines for user processes.

  • It provides I/O support for multiple users in a multiuser systems environment.

Properties of a File System

Here, are important properties of a file system:

  • Files are stored on disk or other storage and do not disappear when a user logs off.

  • Files have names and are associated with access permission that permits controlled sharing.

  • Files could be arranged or more complex structures to reflect the relationship between them.

File structure

A File Structure needs to be predefined format in such a way that an operating system understands . It has an exclusively defined structure, which is based on its type.

Three types of files structure in OS:

  • A text file: It is a series of characters that is organized in lines.

  • An object file: It is a series of bytes that is organized into blocks.

  • A source file: It is a series of functions and processes.

File Attributes

A file has a name and data. Moreover, it also stores meta information like file creation date and time, current size, last modified date, etc. All this information is called the attributes of a file system.

Here, are some important File attributes used in OS:

  • Name: It is the only information stored in a human-readable form.

  • Identifier: Every file is identified by a unique tag number within a file system known as an identifier.

  • Location: Points to file location on device.

  • Type: This attribute is required for systems that support various types of files.

  • Size. Attribute used to display the current file size.

  • Protection. This attribute assigns and controls the access rights of reading, writing, and executing the file.

  • Time, date and security: It is used for protection, security, and also used for monitoring

File Type

It refers to the ability of the operating system to differentiate various types of files like text files, binary, and source files. However, Operating systems like MS_DOS and UNIX has the following type of files:

Character Special File

It is a hardware file that reads or writes data character by character, like mouse, printer, and more.

Ordinary files

  • These types of files stores user information.

  • It may be text, executable programs, and databases.

  • It allows the user to perform operations like add, delete, and modify.

Directory Files

  • Directory contains files and other related information about those files. Its basically a folder to hold and organize multiple files.

Special Files

  • These files are also called device files. It represents physical devices like printers, disks, networks, flash drive, etc.

Functions of File

  • Create file, find space on disk, and make an entry in the directory.

  • Write to file, requires positioning within the file

  • Read from file involves positioning within the file

  • Delete directory entry, regain disk space.

  • Reposition: move read/write position.

Commonly used terms in File systems

Field:

This element stores a single value, which can be static or variable length.

DATABASE:

Collection of related data is called a database. Relationships among elements of data are explicit.

FILES:

Files is the collection of similar record which is treated as a single entity.

RECORD:

A Record type is a complex data type that allows the programmer to create a new data type with the desired column structure. Its groups one or more columns to form a new data type. These columns will have their own names and data type.

File Access Methods

File access is a process that determines the way that files are accessed and read into memory. Generally, a single access method is always supported by operating systems. Though there are some operating system which also supports multiple access methods.

Three file access methods are:

  • Sequential access

  • Direct random access

  • Index sequential access

Sequential Access

In this type of file access method, records are accessed in a certain pre-defined sequence. In the sequential access method, information stored in the file is also processed one by one. Most compilers access files using this access method.

Random Access

The random access method is also called direct random access. This method allow accessing the record directly. Each record has its own address on which can be directly accessed for reading and writing.

Sequential Access

This type of accessing method is based on simple sequential access. In this access method, an index is built for every file, with a direct pointer to different memory blocks. In this method, the Index is searched sequentially, and its pointer can access the file directly. Multiple levels of indexing can be used to offer greater efficiency in access. It also reduces the time needed to access a single record.

File Directories

A single directory may or may not contain multiple files. It can also have sub-directories inside the main directory. Information about files is maintained by Directories. In Windows OS, it is called folders.

Following is the information which is maintained in a directory:

  • Name The name which is displayed to the user.

  • Type: Type of the directory.

  • Position: Current next-read/write pointers.

  • Location: Location on the device where the file header is stored.

  • Size : Number of bytes, block, and words in the file.

  • Protection: Access control on read/write/execute/delete.

  • Usage: Time of creation, access, modification

File types- name, extension

File TypeUsual extensionFunction
Executableexe, com, bin or noneready-to-run machine- language program
Objectobj, ocomplied, machine language, not linked
Source codec. p, pas, 177, asm, a‭‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬source code in various languages‭‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬
Batchbat, shSeries of commands to be executed
Texttxt, doctextual data documents
Word processordoc,docs, tex, rrf, etc.various word-processor formats‭ ‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬
Librarylib, hlibraries of routines
Archivearc, zip, tarrelated files grouped into one file, sometimes compressed.


Summary:

  • A file is a collection of correlated information which is recorded on secondary or non-volatile storage like magnetic disks, optical disks, and tapes.
  • It provides I/O support for a variety of storage device types.
  • Files are stored on disk or other storage and do not disappear when a user logs off.
  • A File Structure needs to be predefined format in such a way that an operating system understands it.
  • File type refers to the ability of the operating system to differentiate different types of files like text files, binary, and source files.
  • Create find space on disk and make an entry in the directory.
  • Indexed Sequential Access method is based on simple sequential access
  • In Sequential Access method records are accessed in a certain pre-defined sequence
  • The random access method is also called direct random access
  • Three types of space allocation methods are:
    • Linked Allocation
    • Indexed Allocation
    • Contiguous Allocation
  • Information about files is maintained by Directories

Tuesday, May 21, 2024

Threads


Thread is an execution unit which consists of its own program counter, a stack, and a set of registers. Threads are also known as Lightweight processes. Threads are popular way to improve application through parallelism. The CPU switches rapidly back and forth among the threads giving illusion that the threads are running in parallel.

As each thread has its own independent resource for process execution, multpile processes can be executed parallely by increasing number of threads.

Types of Thread

There are two types of threads:

  1. User Threads
  2. Kernel Threads

User threads, are above the kernel and without kernel support. These are the threads that application programmers use in their programs.

Kernel threads are supported within the kernel of the OS itself. All modern OSs support kernel level threads, allowing the kernel to perform multiple simultaneous tasks and/or to service multiple kernel system calls simultaneously.

Multithreading Models

The user threads must be mapped to kernel threads, by one of the following strategies:

  • Many to One Model

  • One to One Model

  • Many to Many Model

Many to One Model

  • In the many to one model, many user-level threads are all mapped onto a single kernel thread.

  • Thread management is handled by the thread library in user space, which is efficient in nature.

One to One Model

  • The one to one model creates a separate kernel thread to handle each and every user thread.

  • Most implementations of this model place a limit on how many threads can be created.

  • Linux and Windows from 95 to XP implement the one-to-one model for threads.

Many to Many Model

  • The many to many model multiplexes any number of user threads onto an equal or smaller number of kernel threads, combining the best features of the one-to-one and many-to-one models.

  • Users can create any number of the threads.

  • Blocking the kernel system calls does not block the entire process.

  • Processes can be split across multiple processors.

What are Thread Libraries?

Thread libraries provide programmers with API for creation and management of threads.

Thread libraries may be implemented either in user space or in kernel space. The user space involves API functions implemented solely within the user space, with no kernel support. The kernel space involves system calls, and requires a kernel with thread library support.

Three types of Thread

  1. POSIX Pitheads, may be provided as either a user or kernel library, as an extension to the POSIX standard.

  2. Win32 threads, are provided as a kernel-level library on Windows systems.

  3. Java threads: Since Java generally runs on a Java Virtual Machine, the implementation of threads is based upon whatever OS and hardware the JVM is running on, i.e. either Pitheads or Win32 threads depending on the system.

Benefits of Multithreading

  • Responsiveness

  • Resource sharing, hence allowing better utilization of resources.

  • Economy. Creating and managing threads becomes easier.

  • Scalability. One thread runs on one CPU. In Multithreaded processes, threads can be distributed over a series of processors to scale.

  • Context Switching is smooth. Context switching refers to the procedure followed by CPU to change from one task to another.

Multithreading Issues

Below we have mentioned a few issues related to multithreading. Well, it's an old saying, All good things, come at a price.

Thread Cancellation

Thread cancellation means terminating a thread before it has finished working. There can be two approaches for this, one is Asynchronous cancellation, which terminates the target thread immediately. The other is Deferred cancellation allows the target thread to periodically check if it should be cancelled.

Signal Handling

Signals are used in UNIX systems to notify a process that a particular event has occurred. Now in when a Multithreaded process receives a signal, to which thread it must be delivered? It can be delivered to all, or a single thread.

fork() System Call

fork() is a system call executed in the kernel through which a process creates a copy of itself. Now the problem in Multithreaded process is, if one thread forks, will the entire process be copied or not?

Security Issues

Yes, there can be security issues because of extensive sharing of resources between multiple threads.

There are many other issues that you might face in a multithreaded process, but there are appropriate solutions available for them. Pointing out some issues here was just to study both sides of the coin.

 

 

 

Wednesday, May 15, 2024

Operating system security


  • Installing updated antivirus engines and software

  • Scrutinizing all incoming and outgoing network traffic through a firewall

  • Creating secure accounts with required privileges only (i.e., user management)

 We're going to discuss following topics in this chapter.

  • Authentication

  • One Time passwords

  • Program Threats

  • System Threats

  • Computer Security Classifications

Authentication

Authentication refers to identifying each user of the system and associating the executing programs with those users. It is the responsibility of the Operating System to create a protection system which ensures that a user who is running a particular program is authentic. Operating Systems generally identifies/authenticates users using following three ways −

  • Username / Password − User need to enter a registered username and password with Operating system to login into the system.

  • User card/key − User need to punch card in card slot, or enter key generated by key generator in option provided by operating system to login into the system.

  • User attribute - fingerprint/ eye retina pattern/ signature − User need to pass his/her attribute via designated input device used by operating system to login into the system.

One Time passwords

One-time passwords provide additional security along with normal authentication. In One-Time Password system, a unique password is required every time user tries to login into the system. Once a one-time password is used, then it cannot be used again. One-time password are implemented in various ways.

  • Random numbers − Users are provided cards having numbers printed along with corresponding alphabets. System asks for numbers corresponding to few alphabets randomly chosen.

  • Secret key − User are provided a hardware device which can create a secret id mapped with user id. System asks for such secret id which is to be generated every time prior to login.

  • Network password − Some commercial applications send one-time passwords to user on registered mobile/ email which is required to be entered prior to login.

Program Threats

Operating system's processes and kernel do the designated task as instructed. If a user program made these process do malicious tasks, then it is known as Program Threats. One of the common example of program threat is a program installed in a computer which can store and send user credentials via network to some hacker. Following is the list of some well-known program threats.

  • Trojan Horse − Such program traps user login credentials and stores them to send to malicious user who can later on login to computer and can access system resources.

  • Trap Door − If a program which is designed to work as required, have a security hole in its code and perform illegal action without knowledge of user then it is called to have a trap door.

  • Logic Bomb − Logic bomb is a situation when a program misbehaves only when certain conditions met otherwise it works as a genuine program. It is harder to detect.

  • Virus − Virus as name suggest can replicate themselves on computer system. They are highly dangerous and can modify/delete user files, crash systems. A virus is generatlly a small code embedded in a program. As user accesses the program, the virus starts getting embedded in other files/ programs and can make system unusable for user

System Threats

System threats refers to misuse of system services and network connections to put user in trouble. System threats can be used to launch program threats on a complete network called as program attack. System threats creates such an environment that operating system resources/ user files are misused. Following is the list of some well-known system threats.

  • Worm − Worm is a process which can choked down a system performance by using system resources to extreme levels. A Worm process generates its multiple copies where each copy uses system resources, prevents all other processes to get required resources. Worms processes can even shut down an entire network.

  • Port Scanning − Port scanning is a mechanism or means by which a hacker can detects system vulnerabilities to make an attack on the system.

  • Denial of Service − Denial of service attacks normally prevents user to make legitimate use of the system. For example, a user may not be able to use internet if denial of service attacks browser's content settings.

Computer Security Classifications

As per the U.S. Department of Defense Trusted Computer System's Evaluation Criteria there are four security classifications in computer systems: A, B, C, and D. This is widely used specifications to determine and model the security of systems and of security solutions. Following is the brief description of each classification.

S.N.Classification Type & Description
1

Type A

Highest Level. Uses formal design specifications and verification techniques. Grants a high degree of assurance of process security.

2

Type B

Provides mandatory protection system. Have all the properties of a class C2 system. Attaches a sensitivity label to each object. It is of three types.

  • B1 − Maintains the security label of each object in the system. Label is used for making decisions to access control.

  • B2 − Extends the sensitivity labels to each system resource, such as storage objects, supports covert channels and auditing of events.

  • B3 − Allows creating lists or user groups for access-control to grant access or revoke access to a given named object.

3

Type C

Provides protection and user accountability using audit capabilities. It is of two types.

  • C1 − Incorporates controls so that users can protect their private information and keep other users from accidentally reading / deleting their data. UNIX versions are mostly Cl class.

  • C2 − Adds an individual-level access control to the capabilities of a Cl level system.

4

Type D

Lowest level. Minimum protection. MS-DOS, Window 3.1 fall in this category.

Input/Output OS Software


Basically, input/output software organized in the following four layers:

  • Interrupt handlers

  • Device drivers

  • Device-independent input/output software

  • User-space input/output software

In every input/output software, each of the above given four layer has a well-defined function to perform and a well-defined interface to the adjacent layers.

Now let's describe briefly, all the four input/output software layers that are listed above.

Interrupt Handlers

Whenever the interrupt occurs, then the interrupt procedure does whatever it has to in order to handle the interrupt.

Device Drivers

Basically, device drivers is a device-specific code just for controlling the input/output device that are attached to the computer system.

Device-Independent Input/Output Software

In some of the input/output software is device specific, and other parts of that input/output software are device-independent.

The exact boundary between the device-independent software and drivers is device dependent, just because of that some functions that could be done in a device-independent way sometime be done in the drivers, for efficiency or any other reasons.

Here are the list of some functions that are done in the device-independent software:

  • Uniform interfacing for device drivers

  • Buffering

  • Error reporting

  • Allocating and releasing dedicated devices

  • Providing a device-independent block size

User-Space Input/Output Software

Generally most of the input/output software is within the operating system (OS), and some small part of that input/output software consists of libraries that are linked with the user programs and even whole programs running outside the kernel.

 

Goals of the I/O Software

  • A key concept in the design of I/O software is known as device independence. It means that I/O devices should be accessible to programs without specifying the device in advance.

  • Uniform Naming, simply be a string or an integer and not depend on the device in any way. In UNIX, all disks can be integrated in the file-system hierarchy in arbitrary ways so the user need not be aware of which name corresponds to which device.

  • Error Handling: If the controller discovers a read error, it should try to correct the error itself if it can. If it cannot, then the device driver should handle it, perhaps by just trying to read the block again. In many cases, error recovery can be done transparently at a low level without the upper levels even knowing about the error.

  • Synchronous (blocking) and Asynchronous (interrupt-driven) transfers: Most physical I/O is asynchronous, however, some very high-performance applications need to control all the details of the I/O, so some operating systems make asynchronous I/O available to them.

  • Buffering: Often data that come off a device cannot be stored directly in their final destination.

  • Sharable and Dedicated devices: Some I/O devices, such as disks, can be used by many users at the same time. No problems are caused by multiple users having open files on the same disk at the same time. Other devices, such as printers, have to be dedicated to a single user until that user is finished. Then another user can have the printer. Introducing dedicated (unshared) devices also introduces a variety of problems, such as deadlocks. Again, the operating system must be able to handle both shared and dedicated devices in a way that avoids problems.

 

 

 

Monday, May 13, 2024

Operating System - I/O Hardware


Overview

Computers operate on many kinds of devices. General types include storage devices (disks, tapes),transmission devices (network cards, modems), and human-interface devices (screen, keyboard, mouse). Other devices are more specialized. A device communicates with a computer system by sending signals over a cable or even through the air. The device communicates with the machine via a connection point termed a port (for example, a serial port). If one or more devices use a common set of wires, the connection is called a bus.In other terms, a bus is a set of wires and a rigidly defined protocol that specifies a set of messages that can be sent on the wires.

Daisy chain

When device A has a cable that plugs into device B, and device B has a cable that plugs into device C, and device C plugs into a port on the computer, this arrangement is called a daisy chain. It usually operates as a bus.

Controller

A controller is a collection of electronics that can operate a port, a bus, or a device. A serial-port controller is an example of a simple device controller. This is a single chip in the computer that controls the signals on the wires of a serial port. The SCSI bus controller is often implemented as a separate circuit board (a host adapter) that plugs into the computer. It contains a processor, microcode, and some private memory to enable it to process the SCSI protocol messages. Some devices have their own built-in controllers.

I/O port

An I/O port typically consists of four registers, called the status , control, data-in, and data-outregisters.

Status Register

The status register contains bits that can be read by the host. These bits indicate states such as whether the current command has completed, whether a byte is available to be read from the data-in register, and whether there has been a device error.

Control register

The control register can be written by the host to start a command or to change the mode of a device. For instance, a certain bit in the control register of a serial port chooses between fullduplex and half-duplex communication, another enables parity checking, a third bit sets the word length to 7 or 8 bits, and other bits select one of the speeds supported by the serial port.

Data-in register

The data-in register is read by the host to get input.

Data-out register

The data out register is written by the host to send output.

Polling

Polling is a process by which a host waits for controller response.It is a looping process, reading the status register over and over until the busy bit of status register becomes clear. The controller uses/sets the busy bit when it is busy working on a command, and clears the busy bit when it is ready to accept the next command. The host signals its wish via the command-ready bit in the command register. The host sets the command-ready bit when a command is available for the controller to execute.

In the following example, the host writes output through a port, coordinating with the controller by handshaking

The host repeatedly reads the busy bit until that bit becomes clear.

The host sets the write bit in the command register and writes a byte into the data-out register.

The host sets the command-ready bit.

When the controller notices that the command-ready bit is set, it sets the busy bit.

The controller reads the command register and sees the write command.

It reads the data-out register to get the byte, and does the I/O to the device.

The controller clears the command-ready bit, clears the error bit in the status register to indicate that the device I/O succeeded, and clears the busy bit to indicate that it is finished.

I/O devices

I/O Devices can be categorized into following category.

Human readable

Human Readable devices are suitable for communicating with the computer user. Examples are printers, video display terminals, keyboard etc.

Machine readable

Machine Readable devices are suitable for communicating with electronic equipment. Examples are disk and tape drives, sensors, controllers and actuators.

Communication

Communication devices are suitable for communicating with remote devices. Examples are digital line drivers and modems.

Following are the differences between I/O Devices

Data rate

There may be differences of several orders of magnitude between the data transfer rates.

Application

Different devices have different use in the system

Complexity of Control

A disk is much more complex whereas printer requires simple control interface.

Unit of transfer

Data may be transferred as a stream of bytes or characters or in larger blocks.

Data representation

Different data encoding schemes are used for different devices.

Error Conditions

The nature of errors differs widely from one device to another.

Direct Memory Access (DMA)

Many computers avoid burdening the main CPU with programmed I/O by offloading some of this work to a special purpose processor. This type of processor is called, a Direct Memory Access(DMA) controller. A special control unit is used to transfer block of data directly between an external device and the main memory, without intervention by the processor. This approach is called Direct Memory Access(DMA).

DMA can be used with either polling or interrupt software. DMA is particularly useful on devices like disks, where many bytes of information can be transferred in single I/O operations. When used with an interrupt, the CPU is notified only after the entire block of data has been transferred. For each byte or word transferred, it must provide the memory address and all the bus signals controlling the data transfer. Interaction with a device controller is managed through a device driver.

Handshaking is a process between the DMA controller and the device controller. It is performed via wires using terms DMA request and DMA acknowledge.

 

 

Thursday, May 9, 2024

Services of Operating System


An operating system is an interface which provides services to both the user and to the programs. It provides an environment for the program to execute. It also provides users with the services of how to execute programs in a convenient manner. The operating system provides some services to program and also to the users of those programs. The specific services provided by the OS are off course different.

Following are the common services provided by an operating system:

  1. Program execution
  2. I/O operations
  3. File system manipulation
  4. Communication
  5. Error detection
  6. Resource allocation
  7. Protection

1) Program Execution

  • An operating system must be able to load many kinds of activities into the memory and to run it. The program must be able to end its execution, either normally or abnormally.

  • A process includes the complete execution of the written program or code. There are some of the activities which are performed by the operating system:

    • The operating system Loads program into memory

    • It also Executes the program

    • It Handles the program’s execution

    • It Provides a mechanism for process synchronization

    • It Provides a mechanism for process communication

2) I/O Operations

  • The communication between the user and devices drivers are managed by the operating system.

  • I/O devices are required for any running process. In I/O a file or an I/O devices can be involved.

  • I/O operations are the read or write operations which are done with the help of input-output devices.

  • Operating system give the access to the I/O devices when it required.

3) File system manipulation

  • The collection of related information which represent some content is known as a file. The computer can store files on the secondary storage devices. For long-term storage purpose. examples of storage media include magnetic tape, magnetic disk and optical disk drives like CD, DVD.

  • A file system is a collection of directories for easy understand and usage. These directories contain some files. There are some major activities which are performed by an operating system with respect to file management.

    • The operating system gives an access to the program for performing an operation on the file.

    • Programs need to read and write a file.

    • The user can create/delete a file by using an interface provided by the operating system.

    • The operating system provides an interface to the user creates/ delete directories.

    • The backup of the file system can be created by using an interface provided by the operating system.

4) Communication

In the computer system, there is a collection of processors which do not share memory peripherals devices or a clock, the operating system manages communication between all the processes. Multiple processes can communicate with every process through communication lines in the network. There are some major activities that are carried by an operating system with respect to communication.

  • Two processes may require data to be transferred between the process.

  • Both the processes can be on one computer or a different computer, but are connected through a computer network.

5) Error handling

An error is one part of the system that may cause malfunctioning of the complete system. The operating system constantly monitors the system for detecting errors to avoid some situations. This give relives to the user of the worry of getting an error in the various parts of the system causing malfunctioning.

The error can occur anytime and anywhere. The error may occur anywhere in the computer system like in CPU, in I/O devices or in the memory hardware. There are some activities that are performed by an operating system:

  • The OS continuously checks for the possible errors.

  • The OS takes an appropriate action to correct errors and consistent computing.

6) Resource management

When there are multiple users or multiple jobs running at the same time resources must be allocated to each of them. There are some major activities that are performed by an operating system:

  • The OS manages all kinds of resources using schedulers.

  • CPU scheduling algorithm is used for better utilization of CPU.

7) Protection

The owners of information stored in a multi-user computer system want to control its use. When several disjoints processes execute concurrently it should not be possible for any process to interfere with another process. Every process in the computer system must be secured and controlled.

 

Wednesday, May 8, 2024

What is a Process

?

Process is the execution of a program that performs the actions specified in that program. It can be defined as an execution unit where a program runs. The OS helps you to create, schedule, and terminates the processes which is used by CPU. A process created by the main process is called a child process.

Process operations can be easily controlled with the help of PCB(Process Control Block). You can consider it as the brain of the process, which contains all the crucial information related to processing like process id, priority, state, CPU registers, etc.

What is Process Management?

Process management involves various tasks like creation, scheduling, termination of processes, and a dead lock. Process is a program that is under execution, which is an important part of modern-day operating systems. The OS must allocate resources that enable processes to share and exchange information. It also protects the resources of each process from other methods and allows synchronization among processes.

It is the job of OS to manage all the running processes of the system. It handles operations by performing tasks like process scheduling and such as resource allocation.

Process Architecture

Here, are the Architecture Steps:

  • Stack: The Stack stores temporary data like function parameters, returns addresses, and local variables.

  • Heap Allocates memory, which may be processed during its run time.

  • Data: It contains the variable.

  • Text: Text Section includes the current activity, which is represented by the value of the Program Counter.

Process Stages

There are mainly seven stages of a process which are:

  • New: The new process is created when a specific program calls from secondary memory/ hard disk to primary memory/ RAM a

  • Ready: In a ready state, the process should be loaded into the primary memory, which is ready for execution.

  • Waiting: The process is waiting for the allocation of CPU time and other resources for execution.

  • Executing: The process is an execution state.

  • Blocked: It is a time interval when a process is waiting for an event like I/O operations to complete.

  • Suspended: Suspended state defines the time when a process is ready for execution but has not been placed in the ready queue by OS.

  • Terminated: Terminated state specifies the time when a process is terminated

Process Control Block(PCB)

Every process is represented in the operating system by a process control block, which is also called a task control block.

Here, are important components of PCB

  • Process state: A process can be new, ready, running, waiting, etc.

  • Program counter: The program counter lets you know the address of the next instruction, which should be executed for that process.

  • CPU registers: This component includes accumulators, index and general-purpose registers, and information of condition code.

  • CPU scheduling information: This component includes a process priority, pointers for scheduling queues, and various other scheduling parameters.

  • Accounting and business information: It includes the amount of CPU and time utilities like real time used, job or process numbers, etc.

  • Memory-management information: This information includes the value of the base and limit registers, the page, or segment tables. This depends on the memory system, which is used by the operating system.

  • I/O status information: This block includes a list of open files, the list of I/O devices that are allocated to the process, etc.

Summary:

  • A process is defined as the execution of a program that performs the actions specified in that program.

  • Process management involves various tasks like creation, scheduling, termination of processes, and a dead lock.

  • The important elements of Process architecture are 1)Stack 2) Heap 3) Data, and 4) Text

  • The PCB is a full form of Process Control Block. It is a data structure that is maintained by the Operating System for every process

  • A process state is a condition of the process at a specific instant of time.

  • Every process is represented in the operating system by a process control block, which is also called a task control block.

 

Data Link Layer

In the OSI model, the data link layer is a 4 th  layer from the top and 2 nd  layer from the bottom. The communication channel t...