0% found this document useful (0 votes)
15 views29 pages

Os Process

Uploaded by

md sajid
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)
15 views29 pages

Os Process

Uploaded by

md sajid
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/ 29

Computer :

 Operating System: Main functions of operating systems, Processes, Threads,


Interprocess communication, concurrency, Synchronization, Deadlock, CPU
scheduling, I/O scheduling, Resource scheduling. Deadlock and scheduling
algorithms, banker’s algorithm for deadlock handling. Memory management and
virtual memory. File Systems, I/O systems, DOS, UNIX and Windows.
 Data Structure: Arrays and their Applications; Sparse Matrix, Stacks, Queues,
Priority Queues, Linked Lists, Trees, Forest, Binary Tree, Threaded Binary Tree,
Binary Search Tree, AVL Tree, B Tree, B+ Tree, B* Tree, Data Structure for Sets,
Graphs, Sorting and Searching Algorithms; Hashing. Functions,Recursion,
Parameter passing.
• Digital Fundamentals: Data Types, Number Systems and Conversion, Complements,
Fixed Point Representation, Floating Point Representation, Error Detection Codes,
Computer Arithmetic - Addition, Subtraction, Multiplication and Division
Algorithms, Digital Computers, Logic Gates, Boolean Algebra,Map Simplifications,
Combinational Circuits, Flip-Flops, Sequential Circuits, Integrated Circuits,
Decoders, Multiplexers, Registers and Counters, Memory Unit.
OS:
• It acts as an interface between user and computer hardware
• Provides an environment in which user can execute programs, convenienthly.
and efficiently
• Set of utilities to simplify application development/execution
• Software abstracting the hardware
• acts as a resource allocator and a government which control the program.
 Services of OS:
 User Interface - This can take several forms like
GUI (Graphical User Interface)
CLI (Command line Interface)

 Program execution → System must be able to load a program into memory


and to run that program. The program must be able to end its execution,
either normally or ab normally (indicating error).
 I/O operation For efficiency and protection, users usually can't
control I/O devices directly. There for OS must provide a means to do I/O.

 File- system manipulation Programs need to read and write


files and directories. They also need to create and delete them by name,
search for a given file and list file information.

 CommunicationThere are many cases in which one process needs


to exchange information with another process

 Error detection → Errors may occur in the CPU & memory hardware
(such as power failure) etc, for each type of error, the OS should take
appropriate action to ensure correct and consistent Computing
Resource allocation when there are multiple sours or multiple jobs
running at same time, resources must be allocated to each of them
To keep back of which were we have success and what kind I of computer
resources. Usage statistics may be valuable cost for researchers who wish
to reconfigure the system to imports computing services

Protection and security When several separate processes executes


concurrently, it should met be possible for one process to interfere with
the others or with the OS itself. Protection in values
Ensuring that all access to system resources is controlled.
Security of the system from outsiders is also important.
NOTE
• Main functionality of OS is Program Execution
• In Protection, internal threats are involved.
• In security, external threats are involved
Goals of OS:
 Primary convenience (user friendly)
 Secondary Efficiency (time & space)
PARTS of OS:
ShellIt is an environment or a special user program which provide an
interface to user to services. It allows user to communicate with the
kernel.
 It is the interface between kernel and user.
 It is a command line interpreter

Kernel It is the part and core of an OS that manage operations of


computer and hardware.
 Kernel controls all the task of the system
 It is a low level program interfacing with the hardware on top of
which applications are running.
THREADA Thread is a separate execution path. It is a lightweight
process that the operating system can schedule and run concurrently
with other threads.

The operating system creates and manages threads, and they share the
same memory and resources as the program that created them.

This enables multiple threads to collaborate and work efficiently within


a single program.
Note:- Each thread belongs to exactly one process. In an operating
system that supports multithreading, the process can consist of many
threads. But threads can be effective only if CPU is more than 1
otherwise two threads have to context switch for that single CPU.
Which one of the following is not shared by threads?
a) program counter
b) stack
c) both program counter and stack
d) none of the mentioned
A process can be ___
a) single threaded
b) multithreaded
c) both single threaded and multithreaded
d) none of the mentioned
If one thread opens a file with read privileges then ___
a) other threads in the another process can also read from that file
b) other threads in the same process can also read from that file
c) any other thread can not read from that file
d) all of the mentioned
The time required to create a new thread in an existing
process is ___
a) greater than the time required to create a new process
b) less than the time required to create a new process
c) equal to the time required to create a new process
d) none of the mentioned
When the event for which a thread is blocked occurs?
a) thread moves to the ready queue
b) thread remains blocked
c) thread completes
d) a new thread is provided
Termination of the process terminates ___
a) first thread of the process
b) first two threads of the process
c) all threads within the process
d) no thread within the process
The register context and stacks of a thread are deallocated when
the thread?
(a)Terminates (b)blocks
(c)Unblocks (d)spawns
Thread synchronization is required because ___
a) all threads of a process share the same address space
b) all threads of a process share the same global variables
c) all threads of a process can share the same files
d) all of the mentioned
A thread is also called ___
a) Light Weight Process(LWP)
b) Heavy Weight Process(HWP)
c) Process
d) None of the mentioned
Which one of the following is not a valid state of a thread?
a) running
b) parsing
c) ready
d) blocked
SYSTEM CALL:
 It is a way for programs to interact with OS.
 It provides the service of OS to the user programs via API
(Application Programming Interface).
 Interface between process and OS to allow user level. processes
to request services of the OS.
 System calls que the only entry points into the kernel System.
TYPES OF SYSTEM CALLS
1 Process Control end, abort, create, terminate, allocate & free
memory.
2. File management create, open, close, delete, read file etc.
3. Device managementget device attribute, release
4. Information maintenancegetting system data, set time or
data etc.
5. Communication create, delete communication connection,
send, receive message etc.
BATCH OS

You might also like