0% found this document useful (0 votes)
7 views8 pages

Expt 1_COS_008

The document outlines an experiment for a Computer Operating System course at K. J. Somaiya College of Engineering, focusing on basic UNIX commands for file system management. It details the objectives, theoretical background of operating systems, and specific commands for file operations, process management, and user interaction. Additionally, it includes post-lab questions addressing command syntax, operating system functions, and comparisons between DOS and Windows.

Uploaded by

jossilwhatsapp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views8 pages

Expt 1_COS_008

The document outlines an experiment for a Computer Operating System course at K. J. Somaiya College of Engineering, focusing on basic UNIX commands for file system management. It details the objectives, theoretical background of operating systems, and specific commands for file operations, process management, and user interaction. Additionally, it includes post-lab questions addressing command syntax, operating system functions, and comparisons between DOS and Windows.

Uploaded by

jossilwhatsapp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

K. J.

Somaiya College of Engineering, Mumbai-77


(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

Course Name: Computer Operating System (Elective) Semester: VII


Date of Performance: 8 /8/ 2024 Batch No: A1
Faculty Name: Prof Nilesh Lakade Roll No: 16010221008
Faculty Sign & Date: Grade/Marks: / 25

Expt No: 1
Title: Exploring basic Commands of UNIX: Shell, Processes, Files.

Aim and Objective of the Experiment:


 To Explore basic commands for handling File system under Unix/Linux using shell
scripts.(Creating groups, chown , chmod, directory name).

COs to be achieved:
CO 1: Explain the fundamental concepts of operating system
CO5: Explain basic features of Unix and Mobile OS.

Theory:

An operating system (OS) is a resource manager. It takes the form of a set of software routines that
allow users and application programs to access system resources (e.g. the CPU, memory, disks,
modems, printers network cards etc.) in safe efficient and abstract way.

● The operating system kernel is in direct control of the underlying hardware. The kernel
provides low-level device, memory and processor management functions (e.g. dealing with interrupts
from hardware devices, sharing the processor among multiple programs, allocating memory for
programs etc.)
● Basic hardware-independent kernel services are exposed to higher-level programs through a
library of system calls (e.g. services to create a file, begin execution of a program, or open a logical
network connection to another computer).
● Application programs (e.g. word processors, spreadsheets) and system utility
programs (simple but useful application programs that come with the operating system, e.g. programs
which find text inside a group of files) make use of system calls. Applications and system utilities are
launched using a shell (a textual command line interface) or a graphical user interface that provides
direct user interaction.

Operating systems can be distinguished from one another by the system calls, system utilities and
user interface they provide, as well as by the resource scheduling policies implemented by the kernel.
UNIX has been a popular OS for more than two decades because of its multi-user, multi-tasking
environment, stability, portability and powerful networking capabilities.
Linux is a free open source UNIX OS for PCs.
Linux has all of the components of a typical OS :

Computer Operating System Semester: VII Academic Year: 2024-25


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

● Kernel

The Linux kernel includes device driver support for a large number of PC hardware devices (graphics
cards, network cards, hard disks etc.), advanced processor and memory management features, and
support for many different types of file systems. In terms of the services that it provides to
application programs and system utilities, the kernel implements most BSD and SYSV system calls,
as well as the system calls described in the POSIX.1 specification.

The kernel (in raw binary form that is loaded directly into memory at system startup time) is typically
found in the file /boot/vmlinuz, while the source files can usually be found in /usr/src/linux.

● Shells and GUIs

Linux supports two forms of command input: through textual command line shells similar to those
found on most UNIX systems (e.g. sh - the Bourne shell, bash – the Bourne again shell and csh - the
C shell) and through graphical interfaces (GUIs) such as the KDE and GNOME window managers.

● System Utilities

Virtually every system utility that you would expect to find on standard implementations of UNIX
has been ported to Linux. This includes commands such as ls, cp, grep, awk, sed, bc, wc, more, and
so on. These system utilities are designed to be powerful tools that do a single task extremely well
(e.g. grep finds text inside files while wc counts the number of words, lines and bytes inside a file).
Users can often solve problems by interconnecting these tools instead of writing a large monolithic
application program.

● Application programs

Linux distributions typically come with several useful application programs as standard. Examples
include the emacs editor, xv (an image viewer), gcc (a C compiler), g++ (a C++ compiler), xfig (a
drawing package), latex (a powerful typesetting language) and soffice (Star Office, which is an MS-
Office style clone that can read and write Word, Excel and PowerPoint files).

Description of Commands and options:

DOS commands: Attrib, dir, chkdsk, shutdown, tree, create a batch file, output and input redirection

Windows utilities: msconfig, defragmenter, performance monitor, task manager, registry editor, event
viewer, process explorer.

Computer Operating System Semester: VII Academic Year: 2024-25


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

Unix Commands:

1) Unix file operations: ls, cp, rm , mv, chmod, chown ,chgrp


2) Text file operations in Unix : cat , more , less , head, tail , grep
3) Unix directory management commands : cd, pwd , ln, mkdir, rmdir
4) Unix system status commands: hostname, w, uname ,utime
5) Process management: ps, top, kill, nice
6) Unix users commands: whoami , id, groups, passwd , who, last

Implementation details/Circuit Diagram/ Block Diagram:

Computer Operating System Semester: VII Academic Year: 2024-25


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

Computer Operating System Semester: VII Academic Year: 2024-25


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

Computer Operating System Semester: VII Academic Year: 2024-25


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

Computer Operating System Semester: VII Academic Year: 2024-25


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

Post Lab Subjective/Objective type Questions:


1. Explain how do you read and interpret syntax of any OS command.
Reading and interpreting the syntax of an operating system command involves understanding its
structure and components.
Commands typically consist of a command name followed by options, arguments, and sometimes
subcommands. The command name is the primary instruction that specifies what action to perform,
such as `ls` for listing directory contents or `cp` for copying files.
Options, also known as flags or switches, modify the behavior of the command. They are usually
prefixed with a hyphen (`-`) for single-character options or double hyphens (`--`) for multi-character
options. For example, in the command `ls -l`, `-l` is an option that changes the output format to a
long listing.
Arguments are additional parameters provided to the command to specify the targets or data on
which the command operates. These might include filenames, directory paths, or other input values.
For example, in the command `cp file1.txt /backup/`, `file1.txt` is the source file and `/backup/` is
the destination directory.
Some commands support subcommands, which allow for more complex operations by breaking
down the command into smaller, specific actions. For instance, `git` has various subcommands like
`git commit` and `git push`, each performing different tasks related to version control.
To accurately interpret a command, you can refer to its manual page or help documentation. This is
often accessed using `man` followed by the command name (e.g., `man ls`) or the `--help` option
(e.g., `ls --help`). These resources provide detailed descriptions of the command's syntax, options,
arguments, and usage examples, helping users understand how to properly use and customize the
command for their needs.

2. Explain different functions of the operating systems.


Operating systems perform several critical functions to manage and support the operation of
computer systems.
One primary function is process management, which involves creating, scheduling, and terminating
processes. The operating system ensures that each process receives sufficient CPU time and
manages multitasking by handling context switching between processes. This function is essential
for running multiple applications simultaneously and for maintaining system stability.
Memory management is another crucial function, where the operating system oversees the allocation
and deallocation of memory. It ensures that each process has the necessary memory resources and
manages the system’s memory to prevent conflicts and optimize performance. This includes
managing virtual memory and handling paging and segmentation.
File management encompasses the creation, deletion, and organization of files and directories. The
operating system provides a file system that allows users and applications to store, retrieve, and
manipulate data efficiently. It also manages permissions and access controls to ensure data security
and integrity.
Device management involves controlling and coordinating hardware devices such as printers, disk
drives, and network interfaces. The operating system uses device drivers to facilitate communication
between software and hardware, handling input and output operations and managing device status.

Computer Operating System Semester: VII Academic Year: 2024-25


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

User interface management includes providing ways for users to interact with the system. This can
be through graphical user interfaces (GUIs), which offer windows, icons, and menus, or through
command-line interfaces (CLIs) that allow users to execute commands directly. The operating
system manages user input and displays information in a user-friendly manner.
Overall, these functions are integral to ensuring that the operating system effectively manages
hardware resources, supports user interactions, and provides a stable and efficient computing
environment.

3. Give the difference between DOS and WINDOWS.


DOS and Windows are both operating systems, but they have significant differences in their design,
functionality, and user experience. DOS, or Disk Operating System, is a single-tasking, command-
line based operating system primarily used in the early personal computing era. It provides a text-
based interface where users interact with the system by typing commands. DOS operates with
limited graphical capabilities and does not support multitasking, meaning it can run only one
program at a time. Its file management is basic, with limited support for modern file systems and no
native support for networking. Windows, on the other hand, refers to a series of graphical operating
systems developed by Microsoft. Starting with Windows 3.x, which introduced a graphical user
interface (GUI) on top of DOS, modern Windows versions, such as Windows 10 and Windows 11,
provide a full-featured GUI environment. Windows supports multitasking, allowing users to run
multiple applications simultaneously. It offers advanced file management features, robust
networking capabilities, and extensive support for hardware and software through a rich ecosystem
of applications and drivers.
In summary, DOS is a simple, text-based operating system with limited functionality and no support
for multitasking, while Windows provides a graphical interface with extensive features, multitasking
support, and advanced capabilities for file management and networking.

Conclusion:

Thus, we have explored the basic commands for handling File system under Unix/Linux using shell
scripts.(Creating groups, chown , chmod, directory name).

Signature of faculty in-charge with Date:

Computer Operating System Semester: VII Academic Year: 2024-25


Roll No:

You might also like