Monday, January 29, 2024

Components of an Operating Systems

 

Components of an Operating Systems

There are two basic components of an Operating System.

Shell

Shell is the outermost layer of the Operating System and it handles the interaction with the user. The main task of the Shell is the management of interaction between the User and OS. Shell provides better communication with the user and the Operating System Shell does it by giving proper input to the user it also interprets input for the OS and handles the output from the OS. It works as a way of communication between the User and the OS.

Kernel

The kernel is one of the components of the Operating System which works as a core component. The rest of the components depends on Kernel for the supply of the important services that are provided by the Operating System. The kernel is the primary interface between the Operating system and Hardware.


Functions of Kernel


The following functions are to be performed by the Kernel.

  • It helps in controlling the System Calls.
  • It helps in I/O Management.
  • It helps in the management of applications, memory, etc.

Types of Kernel

There are four types of Kernel that are mentioned below.

For more, refer to Kernel in Operating System.

Difference Between 32-Bit and 64-Bit Operating Systems

32-Bit Operating System64-Bit Operating System
32-Bit OS is required for running of 32-Bit Processors, as they are not capable of running on 64-bit processors. 64-Bit Processors can run on any of the Operating Systems, like 32-Bit OS or 64-Bit OS.
32-Bit OS gives a low efficient performance.64-Bit Operating System provides highly efficient Performance.
Less amount of data is managed in 32-Bit Operating System as compared to 64-Bit Os.A large amount of data can be stored in 64-Bit Operating System.
32-Bit Operating System can address 2^32 bytes of RAM.64-Bit Operating System can address 2^64 bytes of RAM.

Introduction of Assembler

 

Introduction of Assembler

Assembler is a program for converting instructions written in low-level assembly code into relocatable machine code and generating along information for the loader.

It is necessary to convert user written programs into a machinery code. This is called as translation of the high level language to low level that is machinery language. This type of translation is performed with the help of system software. Assembler can be defined as a program that translates an assembly language program into a machine language program. Self assembler is a program that runs on a computer and produces the machine codes for the same computer or same machine. It is also known as resident assembler. A cross assembler is an assembler which runs on a computer and produces the machine codes for other computer.

Assembler

It generates instructions by evaluating the mnemonics (symbols) in operation field and find the value of symbol and literals to produce machine code. Now, if assembler do all this work in one scan then it is called single pass assembler, otherwise if it does in multiple scans then called multiple pass assembler. Here assembler divide these tasks in two passes:

  • Pass-1:
    1. Define symbols and literals and remember them in symbol table and literal table respectively.
    2. Keep track of location counter
    3. Process pseudo-operations
    4. Defines program that assigns the memory addresses to the variables and translates the source code into machine code
  • Pass-2:
    1. Generate object code by converting symbolic op-code into respective numeric op-code
    2. Generate data for literals and look for values of symbols
    3. Defines program which reads the source code two times
    4. It reads the source code and translates the code into object code.

Firstly, We will take a small assembly language program to understand the working in their respective passes. Assembly language statement format:

[Label] [Opcode] [operand]

Example: M ADD R1, ='3'
where, M - Label; ADD - symbolic opcode;
R1 - symbolic register operand; (='3') - Literal

Assembly Program:
Label Op-code operand LC value(Location counter)
JOHN START 200
MOVER R1, ='3' 200
MOVEM R1, X 201
L1 MOVER R2, ='2' 202
LTORG 203
X DS 1 204
END 205

Let’s take a look on how this program is working:

  1. START: This instruction starts the execution of program from location 200 and label with START provides name for the program.(JOHN is name for program)
  2. MOVER: It moves the content of literal(=’3′) into register operand R1.
  3. MOVEM: It moves the content of register into memory operand(X).
  4. MOVER: It again moves the content of literal(=’2′) into register operand R2 and its label is specified as L1.
  5. LTORG: It assigns address to literals(current LC value).
  6. DS(Data Space): It assigns a data space of 1 to Symbol X.
  7. END: It finishes the program execution.

Working of Pass-1:

Define Symbol and literal table with their addresses. Note: Literal address is specified by LTORG or END.

Step-1: START 200

(here no symbol or literal is found so both table would be empty)

Step-2: MOVER R1, =’3′ 200

( =’3′ is a literal so literal table is made)

LiteralAddress
=’3′– – –

Step-3: MOVEM R1, X 201

X is a symbol referred prior to its declaration so it is stored in symbol table with blank address field.

SymbolAddress
X– – –

Step-4: L1 MOVER R2, =’2′ 202

L1 is a label and =’2′ is a literal so store them in respective tables

SymbolAddress
X– – –
L1202
LiteralAddress
=’3′– – –
=’2′– – –

Step-5: LTORG 203

Assign address to first literal specified by LC value, i.e., 203

LiteralAddress
=’3′203
=’2′– – –

Step-6: X DS 1 204

It is a data declaration statement i.e X is assigned data space of 1. But X is a symbol which was referred earlier in step 3 and defined in step 6.This condition is called Forward Reference Problem where variable is referred prior to its declaration and can be solved by back-patching. So now assembler will assign X the address specified by LC value of current step.

SymbolAddress
X204
L1202

Step-7: END 205

Program finishes execution and remaining literal will get address specified by LC value of END instruction. Here is the complete symbol and literal table made by pass 1 of assembler.

SymbolAddress
X204
L1202
LiteralAddress
=’3′203
=’2′205

Now tables generated by pass 1 along with their LC value will go to pass-2 of assembler for further processing of pseudo-opcodes and machine op-codes.

Working of Pass-2:

Pass-2 of assembler generates machine code by converting symbolic machine-opcodes into their respective bit configuration(machine understandable form). It stores all machine-opcodes in MOT table (op-code table) with symbolic code, their length and their bit configuration. It will also process pseudo-ops and will store them in POT table(pseudo-op table). Various Data bases required by pass-2:

1. MOT table(machine opcode table)
2. POT table(pseudo opcode table)
3. Base table(storing value of base register)
4. LC ( location counter)

Take a look at flowchart to understand:

Flowchart

As a whole assembler works as:

Working of Assembler


Saturday, January 27, 2024

How to troubleshoot wired and wireless networks and troubleshooting tools

 

How to troubleshoot wired and wireless networks and troubleshooting tools

At times, your networks either wired or wireless will always be subject to some problems, failures and faults. In most of the cases, the problems that tend to arise or occur are not so much sophisticated and you can be easily troubleshoot them as long as you are conversant with all the network troubleshooting tools. You should also be equipped with the knowledge to help you identify a network problem so as to be in a position to establish the most ideal way to troubleshoot it. In some instances, some specific steps have to be followed in the course of troubleshooting. It is therefore important that you are also familiar with these steps so as to make your troubleshooting activity quite easy. Discussed below are some common network symptoms that can call for network troubleshooting.



Common symptoms

Here are some common symptoms of the problems which arise when the connection is made;


No connectivity

At times, the local devices we use tend to have no connectivity to a particular network or rather the internet. This can be very agonizing since it is a clear indication that your computer is not communicating with other network devices.

This is a problem that could be caused by many factors. However, the first step towards determining the absence of connectivity is through pinging. If your computer fails to ping, then it is outright that there is some problem. Try to take a look at the adapter configurations in the computer. Plug in the network cable. This problem can also result due to incorrect configuration of the device to a particular subnet mask. To establish if your device is connected to the internet, you should try pinging the Google DNS server and if connected, it gives a response to the ping.


APIPA address

Automatic private IP addresses are addresses that are automatically assigned by your operating system when the DHCP server is unavailable. These are addresses that are designed to work on local links or subnets. To determine the available IP configurations in your network, you can use the IPCONFIG command.


Limited connectivity

Limited connectivity is not quite a serious problem as it basically means that your device has access to some connection but not fully. This problem can be easily resolved by checking the connection's bandwidth or checking the network adapters for problems that could be resulting into such an issue. You should also ensure that there is no network interference.


Local connectivity

Local connectivity is at times lost as a result of poor subnet configurations. In such a case, your device is not able to communicate with other devices on the same local network due to some mismatch in the subnets.


Intermittent connectivity

An intermittent connectivity is a network problem that mainly comes as a result of having duplicate IP addresses on a particular network. By having duplicate Ip addresses it means that the devices have exactly the same IP addresses and therefore it may lead to a situation where some devices can barely communicate with each other. Such a problem causes devices to appear as if they are communicating with some device and not others. This problem can be easily solved by making sure that there are no duplicate IP addresses on the network maybe by removing one of the devices, making IP address reconfigurations and making sure that all network users have a unique IP address.


IP conflict

An Ip conflict in a network is mainly as a result of the existence of duplicate ip addresses. In spite of this being a bad networking problem, the operating system has the capability of detecting duplicate IP addresses. An IP conflict can result into the absence of communication between subnets configured in different machines.


Slow transfer speeds

This is a problem that many network users tend to refer to as slow networks. Handling this problem can be quite challenging owing to the fact that it can be experienced in many different places. In this case, you may require to bring down the problem into pieces so as to easily identify the availability and health of your network.


Such a problem can arise due to very many reasons which can be quite difficult to establish. You can decide to manually set your network speed so that it remains constant throughout and hence no instances of slowing down. The networking hardware can also be the cause of such a problem and therefore checking the network adapter can be of much help. You should also take a look at the networking cables.


Low RF signal

Low radio frequency signal is a challenge that is mainly witnessed in wireless networks. In this case, network interference becomes highly sensitive such as conflicting frequencies due to an activated access point. Such a problem can also be induced by the presence of some other signal emitting devices such as a microwave.


In cases where there are numerous access points, you should ensure that the frequencies do not overlap so as to reduce the chances of interference.



Tools:

The following tools can be used to correct the problems;


Cable tester

The cable tester is a network troubleshooting tool that comes to effect after crimping. It is a device used to ascertain that all cables have been crimped properly. Depending on their use, they can be simple or highly advanced. The device is used to check the wire mappings so as to ensure that each wire is fitted in its appropriate connection pin. To ascertain a well crimped cable, the cable tester tends to produce some signals indicating that both ends of the cable are alright.


Loopback plug

The loopback plug or cable is a network troubleshooting tool that you should use in instances where you suspect a problem with your networking hardware. It is considered the best for testing physical hardware. It is known as loop back because it gets a signal coming from a port and gets it back to the same hardware. The loop back cable should not be confused with a crossover cable. In most cases, loop back cables are used hand in hand with some network diagnostic software so as to facilitate sending the network signals through the loop back cable.


Punch down tools

The punch down wiring tool becomes a highly essential tool when there are many wiring blocks being used as patch panels in your organization. Using the punch down tool can be quite hectic and tedious owing to the fact that you should take every individual wire and punch it into the wiring blocks. The punch down tool also trims every single wire being punched in. By using the punch down tool, you tend to create some sort of electrical connection since you have pushed down the wire cables into the blocks. Using the punch down tool calls for a high level of organization since the wires to be punched down are numerous and therefore you should ensure that each wire is punched into its rightful position. After proper punching of the cables, you should come up with a special type of documentation so as to have an easy time in case the punch down activity will be required in the future.


Toner probes

The toner probes are used in cases where punching down of the cables was done and no documentation was done. If you are not sure of the wire ends, use a toner probe since it is designed to find where such wires happen to go. Toner probes can be in two forms, first is the tone generator which you can connect to the wires while the other is the toner alligator which you can directly plug an RJ45 or RJ11 cable.


Wire strippers

Wire strippers are tools that are used to peel of the outer sheath on a networking cable so as to make it easy to crimp. It appears like some sort of knife that you use to peel the outer cable cover.


Crimper

The crimper is a special type of tool that is mainly used to cut the Ethernet cables into the right size. This mainly applies to environments where you are required to set up your own network without using cables that have been purchased in their accurate sizes. Crimpers can be used for Ethernet cables, coaxial cables, twisted pair cables and the fibre optic cables. This is a device that you use to put a connector on one end of the cable. For top quality connections, you must ensure that you have the best crimper especially in cases where there are hundreds of cables to crimp. To become an expert in cable crimping, constant practice is required.



Command Line Tools

PING

The ping is a command line utility that is used to check for connectivity between two devices. With this command, you are in a position to determine the reachability of another remote device through your device. It is an important network troubleshooting tool especially when configuring your device for the first time or if determining a problem about the device not communicating with others on a network. When you execute the ping command, you should expect some responses from the remote device which then indicates that your device can communicate with the remote one properly.


IPCONFIG

The IPCONFIG command is used to determine the ip address configurations for a particular device. This command is considered to be the initial step when carrying out network troubleshooting. Prior to pinging a device, you must know its local ip address and default gateway thus making this command so much important. Apart from giving information about ip addresses, it will also give information concerning other network adapter components and their configurations.


TRACERT

The tracert command is also referred to as the trace route. This is a command that enables you to determine the exact path taken by a packet as it moves between two computers or points. The working of the trace route command is in that it sends information onto the network and when it gets to the first router, the router responds with another message indicating that the packet has been received by the user. At times, the router might not send the message back.


NETSTAT

The netstat command gives you the ability to view all active connections on your computer. The netstat command allows you to acquire a lot of information and details related to a network using the command line interface. This command gives loads of information both on incoming communications and outgoing communications. There are some different netsta commands such as netstat-a which shows incoming and outgoing active connections, netstat-b shows the programs using the communication and netstat-in shows all information as a whole without having to perform DNS queries.


NBTSTAT

The NBTSTAT command is one that allows you to easily access most of the windows-specific networking features and also troubleshoot them. This is a command abbreviated whose full definition is Net BIOS OVER TCP/IP Statistics. With this command, you can query devices not only the ones located locally but also those across the network using Windows NetBIOS language to know its configurations with regard to Windows networking.


NET

The net command is one important command especially in cases where you can only access the command line interface of a machine. It provides all networking commands in a command prompt view. So as to know the command you are looking for, you should type net followed by a question mark and a list of all available commands is displayed.


Wireless locator

A wireless locator is a troubleshooting tool used in wireless networks since in such networks, cable testers and crimpers are of no importance. You can use this device to try and locate wireless frequencies and also map out their location easily.


It is undoubtedly true that effective use of all network troubleshooting tools plays a very important role in ensuring top notch efficiency in your networks' operations. It is highly advisable that a network professional masters the use of such troubleshooting tools. On the other hand, network problems should not be an issue to worry especially based on the fact that most of them are slightly related and bear some similarity in terms of their causes and troubleshooting methods.


Components of an Operating Systems

  Components of an Operating Systems There are two basic components of an Operating System. Shell Kernel Shell Shell is the outermost layer ...