0% found this document useful (0 votes)
50 views24 pages

Abhishek Os File.

The document describes a lab report submitted by a student for their Operating Systems lab. The lab report includes details of various Linux commands executed, shell programming to check file permissions, and implementations of CPU scheduling algorithms like FCFS, SJF and priority scheduling.
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)
50 views24 pages

Abhishek Os File.

The document describes a lab report submitted by a student for their Operating Systems lab. The lab report includes details of various Linux commands executed, shell programming to check file permissions, and implementations of CPU scheduling algorithms like FCFS, SJF and priority scheduling.
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/ 24

NOIDA INSTITUTE OF ENGINEERING

AND TECHNOLOGY

OPERATING SYSTEMS LAB ( ACSE0453A )


(2ND YEAR / 4TH SEMESTER)

DEPARTMENT OF COMPUTER SCIENCE AND


ENGINEERING

Submitted By: Submitted To:


Name : ABHISHEK KUMAR CHAURASIA
Ms. Neeti Taneja
Roll No : 2001330100016

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016
INDEX
SR.NO NAME OF EXPERIMENT SIGNATURE
1. Linux Based Lab1: Execute Various types of Linux Commands
Commands (Miscellaneous, File oriented, Directory oriented)
Lab2: Shell Programming Write a shell program, which
accepts the name of a file from standard input and
perform the following test on it:
i. File Readable
ii. File writable
iii. Both readable and writable
2. CPU Lab3: Implement CPU Scheduling Algorithms:
Scheduling 1. FCFS
Algorithms 2. SJF
3. PRIORITY
Lab4:
4. Round Robin
5. Multi-level Queue Scheduling

3. Deadlock Lab5: Implementation of Banker’s algorithm for the


Management purpose of Deadlock Avoidance.

4. Memory Lab6: Write a program to simulate the following


Management contiguous memory allocation techniques:
Techniques a) First fit
b) Best fit
c) Worst Fit
Lab7:
a) Write a Program for implementation of Contiguous
memory fixed partition technique.
b) Write a program for implementation of Contiguous
memory variable partition technique.
Lab8: Write a program to simulate page replacement
algorithms:
a) FIFO
b) LRU
c) Optimal

5. Disk Lab9: Write a program to simulate Disk Scheduling


Scheduling Algorithms:
Techniques a) FCFS
b) SSTF
Lab 10:
c) SCAN & C-SCAN
d) Look & C-LOOK
6. Process Lab11: Write a program to simulate Producer-Consumer
Synchronizatio problem
n

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


LINUX OPERATING SYSTEM
Linux
Just like Windows, iOS, and Mac OS, Linux is an operating system. In fact, one of the
most popular platforms on the planet, Android, is powered by the Linux operating
system. An operating system is software that manages all of the hardware resources
associated with your desktop or laptop. To put it simply, the operating system
manages the communication between your software and your hardware. Without the
operating system (OS), the software wouldn’t function.

The Linux operating system comprises several different pieces:

1. Bootloader – The software that manages the boot process of your


computer. For most users, this will simply be a splash screen that pops up
and eventually goes away to boot into the operating system.
2. Kernel – This is the one piece of the whole that is actually called ?Linux?.
The kernel is the core of the system and manages the CPU, memory, and
peripheral devices. The kernel is the lowest level of the OS.
3. Init system – This is a sub-system that bootstraps the user space and is
charged with controlling daemons. One of the most widely used init systems
is systemd? which also happens to be one of the most controversial. It is the
init system that manages the boot process, once the initial booting is handed
over from the bootloader (i.e., GRUB or GRand Unified Bootloader).
4. Daemons – These are background services (printing, sound, scheduling,
etc.) that either start up during boot or after you log into the desktop.
5. Graphical server – This is the sub-system that displays the graphics on
your monitor. It is commonly referred to as the X server or just X.
6. Desktop environment – This is the piece that the users actually interact
with. There are many desktop environments to choose from (GNOME,
Cinnamon, Mate, Pantheon, Enlightenment, KDE, Xfce, etc.). Each desktop
environment includes built-in applications (such as file managers,
configuration tools, web browsers, and games).
7. Applications – Desktop environments do not offer the full array of apps.
Just like Windows and macOS, Linux offers thousands upon thousands of
high-quality software titles that can be easily found and installed. Most
modern Linux distributions (more on this below) include App Store-like
tools that centralize and simplify application installation. For example,
Ubuntu Linux has the Ubuntu Software Center which allows you to quickly
search among the thousands of apps and install them from one centralized
location.

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


LAB – I
Lab1: Execute Various types of Linux Commands (Miscellaneous, File oriented,
Directory oriented)

LINUX COMMANDS
1. Calendar Commands
$ cal :- Display the calendar for this month, with today highlighted

$ cal-3 :- Display last month, this month and next month of calendar.

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


$ cal 10 22 :- Display the calendar for October 2022

$ cal 2022 :- Display the entire year 2022 calendar

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


2. DATE COMMANDS
$ date :- Display the system day, date and time

$ date +%h :- The abbreviated month name(e.g., Feb) of calendar.

$ date +%d :- Day of month (e.g., 28 ) of calendar.

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


$ date +%y :- Last two digits of year ( e.g., 2022 – 22 )

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


$ date +%Y :- Display year

$ date +%M :- Display time in minute ( 11:25 – 25)

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


$ date +%S :- Display time in second ( 12:25:13 – 13 )

$ date +%H :- Display time in hour ( 12:25 – 12 )

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


$ echo “ message ” :- Display the message of echo.

$ who :- Returns nothing (empty).

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


$ whoami :- Displays the username of the current user.

3. DIRECTORY COMMANDS
$ pwd :- Display the current directory.

$ mkdir dirname :- Create your own directory.

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


$ ls :- To list files or directories.

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


4. FILE CREATION COMMANDS
$ cat>>filename :- Create your file and store data in it.
$ cat>>filename1 :-

$ cat>>filename2 :-

$ cat filename1:- Check your stored data in file1.

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


$ cat filename2:- Check your stored data in file2.

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


5. COPY COMMANDS
$ cp filename1 filename2 :- Copy data of first file to second file.

$ cat filename:- Check the stored data after copy data.

6. MOVE COMMANDS

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


$ mov filename1 filename2 :- Move data of first file to second file and delete the first
file by default.

7. CHANGING DIRECTORY COMMANDS


$ cd .. :- Move to previous directory

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


$ cd directory_name:- Move to inserted directory name.

8. REMOVE DIRECTORY
$ rmdirm dirname :- Delete/remove the created directory.

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


$ rm filename :- Check your directory is deleted or not.

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


LAB – II
Lab2: Shell Programming
Write a shell program, which accepts the name of a file from standard input and
perform the following test on it:
i. File readable
ii. File writable
iii. Both readable and writable

Firstly, we have to create a file


$ cat>>filename : Create your file and store data in it

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


Program :-

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


$ chmod_u+x_abc.sh : Used for execution of the program

$ ls_-l: Listing files and directories in long list format.

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


$ ./abc.sh : It is used for run the program.

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016


LAB – III
Lab3: Implement CPU Scheduling Algorithms:
1. FCFS
2. SJF
3. PRIORITY

ABHISHEK KUMAR CHAURASIA OS Lab File 2001330100016

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy