MIT-101-Acitvity 1-Operating System and Networking

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Operating System and Networking

1. What are the two main functions of an operating system?


- There are actually three main functions of an operating system first is to manage the
computer's resources, such as the central processing unit, memory, disk drives, and printers,
next is to establish a user interface, and lastly execute and provide services for applications
software.

2. What is the difference between timesharing and multiprogramming systems?


- 1. Time Sharing:
Time Sharing is the logical extension of multiprogramming, in this time sharing Operating
system many users/processes are allocated with computer resources in respective time
slots. In this the processors time is shared with multiple users that’s why it is called as time
sharing operating system. It has a fixed time slice for the different processes. Its main
purpose is interactive response time.
 Benefits of Time-Sharing OS:
 Quick response.
 Reduces CPU idle time.
 All the tasks are given specific time.
 Less probability of duplication of software.
 Improves response time.

 Disadvantages of Time-Sharing OS:


 It consumes much resources.
 Requires high specification of hardware.
 It has a problem of reliability.
 Security and Integrity concerns.
 Probability of data communication problem.
-
- 2. Multiprogramming :
Multiprogramming operating system allows to execute multiple processes by monitoring
their process states and switching in between processes. In this processor and memory
underutilization problem is resolved and multiple programs runs on CPU that’s why it is
called multiprogramming. It has no fixed time slice for processes. Its main purpose is
resource utilization.
 Benefits of Multiprogramming OS :
 No CPU idle time.
 Tasks runs in parallel.
 Shorter response time.
 Maximizes total job throughput of a computer.
 Increases resource utilization.
 Disadvantages of Multiprogramming OS :
 Sometimes long time jobs have to wait long time.
 Tracking of all processes sometimes difficult.
 Requires CPU scheduling.
 Requires efficient memory management.
 No user interaction with any program during execution.

3. On early computers, every byte of data read or written was handled by the CPU (i.e., there was
no DMA). What implications does this have for multiprogramming?
- It makes multiprogramming less favorable since it is no longer the case that when one
process does I/O the CPU is completely free to work on other processes.

4. What is a trap instruction? Explain its use in operating systems.


- A Trap instruction is a software interrupt. TRAP instructions are used to switch from user
mode to Kernel mode and start execution at a fixed address within the kernel. The TRAP
instruction is fairly similar to the call instruction in the sense that the instruction following it
is taken from a distant location and the return address is saved on the stack for later use.
Trap instructions cannot jump to an arbitrary address.

5. The family-of-computers idea was introduced in the 1960s with the IBM System/360
mainframes. Is this idea now dead as a doornail or does it live on?
- It lives on today, with every major operating system having a family of computers. A family
of computers means a group of computers that differ in cost and performance but are able
to run the same software on the same OS.

6. What is the difference between kernel and user mode? Explain how having two distinct modes
aids in designing an operating system.
- 1. Kernel Mode
In Kernel mode, the executing code has complete and unrestricted access to the underlying
hardware. It can execute any CPU instruction and reference any memory address. Kernel
mode is generally reserved for the lowest-level, most trusted functions of the operating
system. Crashes in kernel mode are catastrophic; they will halt the entire PC.

2. User Mode
In User mode, the executing code has no ability to directly access hardware or reference
memory. Code running in user mode must delegate to system APIs to access hardware or
memory. Due to the protection afforded by this sort of isolation, crashes in user mode are
always recoverable. Most of the code running on your computer will execute in user mode.
7. For each of the following system calls, give a condition that causes it to fail: fork, exec, and
unlink.
- A system call is a way for programs to interact with the operating system. It provides an
interface between a process and operating system to allow user-level processes to request
services of the operating system. System calls are the only entry points into the kernel
system.
- Exec:
 The file is not executable for example a jpeg file.
 The file does not exist.
 The current user does not have the permission to access the file.
- Unlink:
 The file does not exist
 The user does not have the permission to access the specified file.
- Fork:
 There are no child processes, or the OS is out of available memory.

8. To use cache memory, main memory is divided into cache lines, typically 32 or 64 bytes long. An
entire cache line is cached at once. What is the advantage of caching an entire line instead of a
single byte or word at a time?
- A memory access exhibits the principle of locality of reference, where if one location is read
then the probability of accessing nearby locations next is very high, particularly the following
memory locations. So, by caching an entire cache line, the probability of a cache hit next is
increased. Also, modern hardware can do a block transfer of 32 or 64 bytes into a cache line
much faster than reading the same data as individual words.

9. In Section 1.4, nine different types of operating systems are described. Give a list of applications
for each of these systems (one per operating systems type).
- Mainframe OS
 Mainframe computer likes as a big centralized machine that contains the large
memory, huge storage space, multiple high-grade processors, so it has ultra
processing power compare to standard computer systems. So, mainframe computer
system’s importance is increasing for large scale organization, scientific research,
consumer statistics, and census data, because it is capable to execute multiple
complex programs concurrently at the ultra speed.
 Examples are z/OS, z/VM, z/VSE™ and z/TPF
- Server OS
 A server operating system, also called a server OS, is an operating system specifically
designed to run on servers, which are specialized computers that operate within
a client/server architecture to serve the requests of client computers on the
network.
 Examples are Windows Server 2003, Windows Server 2008, Windows Server 2012,
FreeBSD, Linux (excluding RHEL), Windows Server 2000, Red Hat Enterprise Linux
(RHEL), Mac OS X Server and Solaris.
- Multiprocessor OS
 A multiprocessing operating system (OS) is one in which two or more central
processing units (CPUs) control the functions of the computer. Each CPU contains a
copy of the OS, and these copies communicate with one another to coordinate
operations. The use of multiple processors allows the computer to perform
calculations faster, since tasks can be divided up between processors.
 Examples are Windows NT, 2000, XP, and Unix.
- Personal computer OS
 Personal computer operating system provides a good interface to a single user.
Personal computer operating systems are widely used for word processing,
spreadsheets and Internet access. Mostly used for personal purposes.
  Microsoft Windows, macOS, and Linux.

- Handheld computer OS
 These are operating systems that supports pocket sized computers which process
information, signals, graphics, audio, video and exchanges them other devices, for
example is our smartphones.
 Examples of handheld operating systems are Android OS, Apple iOS, Symbian and
Palm OS.
- Embedded Computer OS
 An embedded operating system is an operating system for embedded computer
systems. Embedded operating systems are computer systems designed for a specific
purpose, to increase functionality and reliability for achieving a specific task.
Examples of devices that uses embedded computer os are MP3 players, mobile
phones, video game consoles, digital cameras, DVD players, and GPS.
 Examples are embedded linux, integrity os and Vxworks.
- Sensor node os
 The OS acts as a resource manager for complex systems. In a typical system these
resources include processors, memories, timers, disks, mice, keyboard, network
interfaces, etc. The job of the OS is to manage the allocation of these resources to
users in an orderly and controlled manner.
- Real time OS
 A real-time operating system is an operating system intended to serve real-time
applications that process data as it comes in, typically without buffer delays.
Processing time requirements (including any OS delay) are measured in tenths of
seconds or shorter increments of time.
- Smart card OS
 The OS is the hardware-specific firmware that provides basic functionality as
secure access to on-card storage, authentication and encryption. Only a few cards
allow writing programs that are loaded onto the smart card – just like programs on a
computer.
10. Virtual machines have become very popular for a variety of reasons. Nevertheless, they have
some downsides. Name one.
- Advantages:

 Can use multiple operating system environments on the same computer.


 Virtual machines can provide an instruction set architecture, or ISA, structure
different than the actual computer. The ISA serves as the interface between
software and hardware.
 When you create your virtual machine, you create a virtual hard disk. So, everything
on that machine can crash, but if it does, it won’t affect the host machine.
 There are security benefits to running virtual machines. For example, if you need to
run an application of questionable security, you can run it in a guest operating
system. So, if the application causes damage, then it will be only temporary after the
guest is shut down. Virtual machines also allow for better security forensics by
monitoring guest operating systems for deficiencies and allowing the user to
quarantine it for analysis.

You might also like