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.

 

Operating System Types


Single-user systems

A computer system that allows only one user to use the computer at a given time is known as a single-user system. The goals of such systems are maximizing user convenience and responsiveness, instead of maximizing the utilization of the CPU and peripheral devices.

Single-user systems use I/O devices such as keyboards, mice, display screens, scanners, and small printers. They can adopt technology developed for larger operating systems.

They may run different types of operating systems, including DOS, Windows, and MacOS. Linux and UNIX operating systems can also be run in single-user mode.

Batch Systems

Early computers were large machines run from a console with card readers and tape drives as input devices and line printers, tape drives, and card punches as output devices. The user did not interact directly with the system; instead, the user prepared a job, (which consisted of the program, data, and some control information about the nature of the job in the form of control cards) and submitted this to the computer operator. The job was in the form of punch cards, and at some later time, the output was generated by the system. The output consisted of the result of the program, as well as a dump of the final memory and register contents for debugging.

To speed up processing, operators batched together jobs with similar needs and ran them through the computer as a group. For example, all FORTRAN programs were compiled one after the other.

The major task of such an operating system was to transfer control automatically from one job to the next. Such systems in which the user does not get to interact with his jobs and jobs with similar needs are executed in a “batch”, one after the other, are known as batch systems. Digital Equipment Corporation’s VMS is an example of a batch operating system.

Multi-programmed Systems

Such systems organize jobs so that CPU always has one to execute. In this way, CPU utilization is increased. The operating system picks and executes from amongst the available jobs in memory. The job has to wait for some task such as an I/O operation to complete. In a non-multi-programmed system CPU would sit idle while in case of multiprogrammed system, the operating system simply switches to, and executes another job.

Time-sharing systems

These are multi-user and multi-process systems. Multi-user means system allows multiple users simultaneously. In this system, a user can run one or more processes at the same time. Examples of time-sharing systems are UNIX, Linux, Windows server editions.

Real-time systems

Real time systems are used when strict time requirements are placed on the operation of a processor or the flow of data. These are used to control a device in a dedicated application. For example, medical imaging system and scientific experiments.

Operating System Examples

There are many types of operating system. Some most popular examples of operating system are:

Unix Operating System

Unix was initially written in assembly language. Later on, it was replaced by C, and Unix, rewritten in C and was developed into a large, complex family of inter-related operating systems. The major categories include BSD, and Linux.

“UNIX” is a trademark of The Open Group which licenses it for use with any operating system that has been shown to conform to their definitions.

macOS

Mac-OS is developed by Apple Inc. and is available on all Macintosh computers. It was formerly called “Mac OS X” and later on “OS X”.  MacOS was developed in 1980s by NeXT and that company was purchased by Apple in 1997.

Linux

Linux is Unix-like operating system and was developed without any Unix code. Linux is open license model and code is available for study and modification. It has superseded Unix on many platforms. Linux is commonly used smartphones and smartwatches.

Microsoft Windows

Microsoft Windows is most popular and widely used operating system. It was designed and developed by Microsoft Corporation. The current version of operating system is Windows-10.

Microsoft Windows was first released in 1985. In 1995, Windows 95 was released which only used MS-DOS as a bootstrap.

 

Operating System Components

An operating system has various components that perform different tasks for proper execution of programs. Following are main components of the operating system.

Process Management

A process can be a program in execution that needs resources like CPU time, memory, files and I/O devices to accomplish its tasks. The operating system is responsible for

  • Creating and terminating user and system processes
  • Suspending and resuming processes
  • Providing mechanisms for process synchronization
  • Providing mechanisms for process communication
  • Providing mechanisms for deadlock handling

Main Memory Management

Main memory is a large array of words or bytes. These bytes are called memory locations and range in size from hundreds of thousands to billions. Every word or byte has its own address. Main memory is a repository of quickly accessible data shared by the CPU and I/O devices. It contains the code, data, stack, and other parts of a process. The central processor reads instructions of a process from main memory during the machine cycle. The OS is responsible for the following activities in connection with memory management.

  • Keeping track of free memory space
  • Keeping track of which parts of memory are currently being used and by whom
  • Deciding which processes are to be loaded into memory when memory space becomes available
  • Deciding how much memory is to be allocated to a process
  • Allocating and deallocating memory space as needed
  • Ensuring that a process is not overwritten on top of another

Secondary Storage Management

The programs to be executed, along with the data they access, must be in the main memory or primary storage during their execution. Since main memory is too small to accommodate all data and programs, and because the data it holds are lost when the power is lost, the computer system must provide secondary storage to backup main memory. Most programs are stored on a disk until loaded into the memory and then use disk as both the source and destination of their processing. Like all other resources in a computer system, proper management of disk storage is important.
The operating system is responsible for the following activities in connection with disk management:

  • Free-space management
  • Storage allocation and deallocation
  • Disk scheduling

Input/Output Management

The input and output subsystem consists of:

  • A memory management component that includes buffering, caching and spooling
  • A general device-driver interface
  • Drivers for specific hardware devices

File Management

Computers can store information on several types of physical media, e.g. magnetic tape, magnetic disk and an optical disk. The operating system maps files onto physical media and accesses these media through storage devices. Operating system is responsible for the following activities pertaining to file management:

  • Creating and deleting files
  • Creating and deleting directories
  • Supporting primitives (operations) for manipulating files and directories
  • Mapping files onto the secondary storage
  • Backing up files on stable (nonvolatile) storage media

Protection System

If a computer system has multiple users and allows concurrent execution of multiple processes then the various processes must be protected from each other’s activities. Protection is any mechanism for controlling the access of programs, processes or users to the resources defined by a computer system.

Networking

A distributed system is a collection of processors that do not share memory, peripheral devices or a clock. Instead, each processor has it own local memory and clock, and the processors communicate with each other through various communication lines, such as high- speed buses or networks.

The processors in a communication system are connected through a communication network. The communication network design must consider message routing and connection strategies and the problems of contention and security.

A distributed system collects physically separate, possibly heterogeneous, systems into a single coherent system, providing the user with access to the various resources that the system maintains.

Command Line Interpreter

One of the most important system programs for an operating system is the command interpreter, which is the interface between the user and operating system. Its purpose is to read user commands and try to execute them. Some operating systems include the command interpreter in the kernel. Other operating systems (for example UNIX, Linux, and DOS) treat it as a special program that runs when a job is initiated or when a user first logs on (on time-sharing systems). Examples of shells for UNIX and Linux are Bourne shell (sh), C shell (csh), Bourne Again shell (bash), TC shell (tcsh), and Korn shell (ksh). You can use any of these shells by running the corresponding command, listed in parentheses for each shell.

 

 

What is computer security?

Computer security basically is the protection of computer systems and information from harm, theft, and unauthorized use. It is the process ...