0% found this document useful (0 votes)
10 views

I1100 - Chapter - 03 - Operating Systems Audio

The document discusses the components and roles of operating systems. It provides examples of MS-DOS commands for file and directory management. The key points are: - The main components of an operating system include the kernel, file system

Uploaded by

yehya2792003
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

I1100 - Chapter - 03 - Operating Systems Audio

The document discusses the components and roles of operating systems. It provides examples of MS-DOS commands for file and directory management. The key points are: - The main components of an operating system include the kernel, file system

Uploaded by

yehya2792003
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Faculty of Sciences- III

I1100
Introduction to Computer Science

2020 - 2021
Operating system
Introduction

Ø Interface between applications and physical hardware


Ø Set of software that runs permanently on a computer and controls it from its startup (boot)
and as long as it is on.
Ø Ex of OS: Windows, Linux, Android, IOS

User

System

Hardware

3
The kernel is a program that constitutes the central core of an operati
computer resources (CPU, memory, Input/output) and enables the com

Operating system components hardware and software. The kernel is responsible for all major activitie
Its main function is the process execution, and managing the input/outp
A command interpreter (shell) allows the communication with th
command language in order to let the user to control the input/output
• The operating system is made up of a set of applications for
File system controls how data is stored and retrieved and allows you t

managing interactions with the hardware.


Among this set of software we distinguish:
• The kernel
The kernel is a program that constitutes the central core
of an operating system. It manages the computer resources
(CPU, memory, Input/output) and enables the communication
between the hardware and software.
The kernel is responsible for all major activities of an operating
system. Its main function is the process execution, and managing
the input/output, the memory, and files.
Figure 5: Operating System Structure

Particular characteristics of an operation system


An operating system is called multitasking (or multithreaded) when4 it can
Operating system components
Among this set of software we generally distinguish the
following components:
The file system
• Controls the way in which data is backed up and retrieved.
• Allows you to save files in a tree structure.
The command interpreter (shell)
– It is an interface between a user and the OS that allows
communication with the operating system via a command
language in order to allow the user to control the I / O units.

5
Characteristics of an operating system
• An operating system is called multi-task ( multithreaded )
when multiple tasks (called process) can be executed
simultaneously.
– An operating system is called multitasking (or multithreaded) when
it can perform more than one computer task at a time.
• Multyitasking is a technique that consists of running
multiple processes concurrently in parallel. These processes
share common processing resources such as a CPU.
• Multiprocessing is a technique which consists of
running many processors in parallel.
• Embedded systems are operating systems with a dedicated function intended to operate
on small machines (PDA, digital watches, and MP3 players) or embedded as part of a complete device
often including hardware and mechanical parts (traffic lights, factory controllers, hybrid vehicles, avionics, 6
Role of the operating system

• Processor management
– The OS is responsible for managing the allocation of the processor
between the different programs
• It is a matter of deciding which process is running at a given
time, when to stop the process, which will be the next, and
what it needs as resources for its execution.
• A process ( process ) is a sequence of instructions (in binary)
is loaded into memory ( RAM ) that run by the processor

7
Role of the operating system
• Input / output management
– The OS makes it possible to control the access of programs to
hardware resources via the drivers
– A driver is a program which contains the instructions to be executed
to use a certain computer peripheral. Each device has its own driver
• Network management
• Current operating systems offer user file sharing, protection
for these files, identification of machines and users
connected to the network, etc.

8
Role of the operating system
• Input / output management
– The OS makes it possible to control the access of programs to
hardware resources via the drivers
– A driver is a program which contains the instructions to be executed
to use a certain computer peripheral. Each device has its own driver
• Network management
• Current operating systems offer user file sharing, protection
for these files, identification of machines and users
connected to the network, etc.

9
Role of the operating system
• Central memory management (RAM)
– The OS is responsible for managing the memory space allocated to
each application.
• Secondary memory management (hard disk)
– = file management via a File Management System (FMS)
– The SGF offers primitives in order to create, copy, read, delete…
these files.
– It manages the space occupied by the files as well as the free space.
– It supports file sharing and protection in multi-user environment

10
File Management System
The main tasks of an FSM are:
• Store the files on a disk (distribution in the different blocks).
• Organize and structure all files (directories) in a hierarchical
manner.
• Allow to create, modify or delete a file
• Allow modification of file hierarchy.
• Manage free space on the hard drive.
• Manage files in a multi-user environment

11
File

– It is a data storage unit


– The OS establishes the correspondence between the file and the
binary system
– Files are usually created by users but some files are system
generated
– each file has a set of attributes that describe it: name, extension,
date and time of its creation or last modification, size, protection
– Some attributes are specified by the user, others are completed by
the operating system

12
Directory
• Called folder : computer object that can contain files and / or
directories
Structure sous Windows (Arborescence)
Structure in Windows (Tree structure)

13
MS-DOS
• The operating system allows the user to execute commands (often to
launch an application). A user can communicate with the operating
system (the Kernel functions) either via a command language
interface or via a graphical user interface (GUI).
• MS-DOS (Microsoft Disk Operating System) is an operating system
developed by Microsoft operating in single-tasking and single-user
mode. It is equipped with a command-line interface. The table
below presents some basic commands of MS-DOS:

Introduction to Computer Science (I1100) 2019- 14


2020
MS-DOS

• MS-DOS (Microsoft disk operating system) is an


operating system developed by Microsoft that operates in
single-task, single-session and single-user mode
• It is equipped with a command line interface

15
MS-DOS

ØExemples :

16
mkdir, md directory_name Create a directory
rmdir, rd directory_name Delete a directory
type nul > file_name Create a file
move file_name destination Move a file to a specific locatio

Examples of MS-DOS commands:

1. cd C:\Users cd .. : go to the parent directory cd C:\


2. copy C:\Users\A C:\Users\B : copy the content of the directory A into B
3. copy C:\Users\A\MyFile.txt C:\Users
4. del C:\Users\MyFile.txt
5. del C:\Users\A: delete the content of the directory A
6. mkdir C:\Users\REP rmdir C:\Users\REP
7. move C:\Users\MyFile.txt C:\Users\A : copy a text file into the directory A

Rania EL BAIDA 17
File and directory management (creation, delete, etc.)

User management

Software management
Exercises
Exercices
Exercise 1:

Use the MS-DOS commands to create a directory R1 in the C partition and two text files F1.txt and
F2.txt in R1. Then create a directory R2 in the D partition, and copy all the files of R1 into R2.

Exercise 2:

Write the MS-DOS commands that allow to:

1. Create two directories INFO and MATH, and a file fich.txt in the C partition.
2. Create two subdirectories INFO1 and INFO2 in the INFO directory.
3. Move the file fich.txt into the MATH directory.
4. Delete the directory INFO1 and the file fich.txt.

Exercise 3:

The current directory is “C:\R1”. Use the MS-DOS to do the following actions: Create two subdirectories
18
R11 and R12 in the directory R1. Create a file F11.txt in the directory R12. Without changing a directory,
copy the file F11.txt into the directory R11. Go to the directory R11. Remove the file F11.txt from the
19
Write the MS-DOS commands that allow to:

1. Create two directories INFO and MATH, and a file fich.txt in the C partition.
2. Create two subdirectories INFO1 and INFO2 in the INFO directory.
3. Move the file fich.txt into the MATH directory.
4. Delete the directory INFO1 and the file fich.txt.

Exercise 3:

The current directory is “C:\R1”. Use the MS-DOS to do the following actions: Create two subdirectories
R11 and R12 in the directory R1. Create a file F11.txt in the directory R12. Without changing a directory,
copy the file F11.txt into the directory R11. Go to the directory R11. Remove the file F11.txt from the
directory R12. Finally delete the directory R12.

Exercise 4:
4.1) Use the MS-DOS commands to create the following directory and file tree:

B 20
Exercise 3:

The current directory is “C:\R1”. Use the MS-DOS to do the following actions: Create two subdirectories
R11 and R12 in the directory R1. Create a file F11.txt in the directory R12. Without changing a directory,
copy the file F11.txt into the directory R11. Go to the directory R11. Remove the file F11.txt from the
directory R12. Finally delete the directory R12.

Exercise 4:
4.1) Use the MS-DOS commands to create the following directory and file tree:

D C

F1.docx F2.pdf F3.txt


pg. 40
I1100

4.2) Make D the current directory, create a file F4.pdf in the directory B.
4.3) Move all the files in the directory D into the directory B.
4.4) Delete all the subdirectories in the directory B. I should empty & delete all subdirectories in B.
4.5) Copy the directory B in the directory A 21
4.3) Move all the files in the directory D into the directory B.
4.4) Delete all the subdirectories in the directory B. I should empty & delete all subdirectories in B.
4.5) Copy the directory B in the directory A

Exercise 5: change current directory

L C

Suppose that the current the directory is D, and given the above directory tree. Use the MS-DOS
commands to:
5.1) Go to the parent directory A.

5.2) Go back to the directory D, and then to the directory K.

5.3) Create a subdirectory M in the directory L.

5.4) Create a subdirectory E in the directory D.

5.5) Delete the two directories C and L.


22

You might also like