Showing posts with label 703. Show all posts
Showing posts with label 703. Show all posts

21 Oct 2016

Lecture 1

Overview of today’s lecture
• Introduction to what an operating system is?
• Issues involved in the design of an operating system
• Different types of operating systems

Lets start
What is an operating system?

Top-down view
• Provides an extended or virtual machine abstraction to user programs
• Easier to program than the underlying hardware.
• All services are invoked and accomplished through system calls.


Bottom-up view
• Acts as a resource manager of a complex system
• Resources consist of processors, memories, timers, disks, mice, keyboard, network
interfaces, printers etc.
• OS manages allocation of these resources to user programs in an orderly and controlled
manner


Resource multiplexing
• OS multiplexes resources in two ways:
• In time, In space
• Time multiplexing involves different programs taking turns in using the resource.
Example: CPU scheduling, printer sharing.
• Space multiplexing involves different program getting part of the resource possibly at the
same time. Example: memory is divided into several running programs.

The major OS issues
• Structure: how is the OS organized?
• Sharing: how are resources shared across users?
• Naming: how are resources named (by users or programs)?
• Security: how is the integrity of the OS and its resources ensured?
• Protection: how is one user/program protected from another?
• Performance: how do we make it all go fast?
• Reliability: what happens if something goes wrong (either with hardware or with
program)?
• Extensibility: can we add new features?
• Communication: how do programs exchange information, including across a network?

More OS issues
• Concurrency: how are parallel activates (computation and I/O created and controlled?
• Scale: what happens as demands or resources increase?
• Persistence: how do you make data last longer than program executions?
• Distribution: how do multiple computers interact with each other?
• Accounting: how do we keep track of resources usage, and perhaps charge for it?

Type of Operating Systems

Main frame operating systems:

  • Huge amounts of I/O activity.
  • Transaction and time sharing services.
  • Batch processing is routine non-interactive jobs. e.g. claims processing, sales
  • reporting etc. Transaction processing systems handle large number of small
  • requests e.g. check processing in banks, air line reservations etc.
  • Time-sharing systems allow multiple remote users to run jobs at the same time e.g.
  • querying a database. OS Optimized for these tasks. Example is OS/390

Server operating systems

  • Run on very large PCs, workstations or even main-frames. They serve multiple users over a network simultaneously 
  • And allow them to share hardware and software. Examples are web servers, database transaction servers etc. Examples of
  • OS in this class are Win2K, XP and flavors of UNIX.

Multiprocessor operating systems

  • OS is basically a variation to server operating systems with special provisions for connectivity and communication management between different CPUs.

PC operating systems

  • OS provides a nice interface to a single user.
  • Typically used for word processing, spread sheets, Internet access etc.

Real-time operating systems

  • Characterized by time as the key parameter. Real-time response to internal and external events is more important than any other design goal. Classified into two sub-categories: Hard and Soft real-time.
  • Example applications include Industrial process control, robotics and assembly lines, air traffic control, network routers and telecommunication switches, multi-media systems etc.

Embedded operating systems

  • Embedded in small devices e.g. palm-top computers e.g. PDA, TV sets, micro-wave ovens, mobile phones. They have characteristics of real-time systems (mainly soft real-time) but also have restraints on power consumption, memory usage etc.
  • Examples include PalmOS and Windows CE. Height of this type is smart-card systems.

Distributed Systems

  • Distribute the computation among several physical processors.

Loosely coupled system

  • Each processor has its own local memory; processors communicate with one another through various communications lines, such as high-speed buses or telephone lines.
  • Advantages of distributed systems:
    • Resources Sharing, Computation speed up – load sharing, Reliability, Communications

Parallel Systems

  • Multiprocessor systems with more than on CPU in close communication.

Tightly coupled system

  • Processors share memory and a clock; communication usually takes place through the shared memory.
  • Advantages of parallel system
    • Increased throughput, Economical, Increased reliability, graceful degradation, fail soft systems.

Important Links


Assignment Solutions:
http://vustudents.ning.com/group/cs703advancedoperatingsystems
http://ebridge.pk/tag/cs703-2nd-assignment-solution/
http://vuinnovators.com/category/mscs/cs703/
https://helpdeskforbeginner.blogspot.com/2016/10/mscs-course-cs703-old-assignment-help.html#more

Books Download Link:
Reference Book 1:
Modern Operating Systems by Tanenbaum
Download Link:
http://www.vumultan.com/Books/CS703-Modern-Operating-Systems.pdf
Reference Book 2:
Operating Systems Concepts by Siberschatz, Galvin, Gagne
Download Link:
http://www.vumultan.com/Books/Operating-Systems-Concepts.pdf


20 Oct 2016

May 29- Mid Term 703

1.Benefits of different time quatum.
2.advantage of high synchronization construct over semaphore.
3.client server architecture working.
4.working of long term scheduler.

CS 703 31-05-2016 TIME : 9:00 am


Q#1. Suppose that a system is in an unsafe state. Show that that is possible for the process to completed their execution without entering a deadlock state.
Q#2.Major uses of threads.
Q#3.Possibility thread created or not.Write the possibility of failure thread creation.
Q#4.diagram ti us mai Quantum 8 or aik quantum 16 diya huwa ta next FCFS likha ta
a.which process will complete execution 2nd queue.
b.How move different queue how enter into different queues...

CS 703 30-05-2016 TIME : 7:30 am

Q#1. Suppose that a system is in an unsafe state. Show that that is possible for the process to completed their execution without entering a deadlock state.
Q#.2. Threads open resource sharing, are threads harmful for the system give solid reason?
Q#3. Do you think there are some events in computer systems that causes CPU scheduling?
Q#4. An operating system is running three concurrent P1,P2,P3 for three different users. each process require six units of computing time . P1 consist of a single thread, P2 consists of two threads , each requiring three of P2,S SIX TOTAL UNIT COMPUTING TIME....................
a) Suppose that the threads are kernel-supported and the kernel implements peemptive, round-robin scheduling of threads with a quantum on one time unit. of the first six units of time how many will devoted to each of the three process?
b) suppose threads are implemented entirely at the user level, and that .............

McQs Midterm

1.Asynchronous exception are caused by events external to the __________.
Processor
Memory
Vector Table
Data range
2.In _______memory allocator application allocates and frees space.
Dynamic
Explicit 
Implicit 
Static
3. To show free block in implicit list method we use _____ digit.
0
00
11
1
4. In reference counting, each ______has “ref count” of pointers to it.
Object
Block
Heap Address
Stack
5. A task in Linux that is present in the run queue (ready queue) at any given time has its state set to_______. 
TASK_INTERRUPTIBLE 
TASK_STOPPED
TASK_RUNNING
TASK_ZOMBIE
6. A process _______ defines the readiness of the process to be scheduled for execution.
Scheduler
Counter
State
Executer
7. Functions that are called from a thread must be thread ______.
Safe
Oriented
Dependent
Independent

For More: http://vuinnovators.com/cs703-current-paper-mcqs-solved/

Midterm Question

Diffeeence between Long term scheduler, medium term and short term scheduler. How long term scheduler helps.. (10)
Uses of threads (5)
One code was given, I have to tell the logic of that code. (5)
And last question was about high-level synchronization advantages over semaphore. (5)

Todays 703 paper - August 2016

10 mcqs
11: discuss arena allocator pattrens
12: explain FCFS is usefule in single user enviromrnt
13: difrerene of policy and mechanism
14: describe ways of real time system
15: we disccuss the file systems explain which system is better and why?
16: how virus works and spread explain with example
17: describe two ways for FIFO and LRU page replacement algorithms

Bulk - Final Paper

todays 703 paper
mcqs new thy recent papers men se just 3 thy .10
Q.Briefly explain major security issues. 10
Answer:
• Isolation
Separate processes execute in separate memory space
Process can only manipulate allocated pages
• Authentication
Who can access the system. Involves proving identities to the system
• Access control
When can process create or access a file?
Create or read/write to socket?
Make a specific system call?
• Protection problem
Ensure that each object is accessed correctly and only by those processes that are allowed to do so
• Comparison between different operating systems
Compare protection models: which model supports least privilege most effectively?
Which system best enforces its protection model?
Q. When a program enters into an infinite loop and never returns control back to CPU. Explain how timer interrupts help to terminate this condition?
Answer: An infinite loop (also known as an endless loop or unproductive loop) is a sequence of instructions in a computer program which loops endlessly, either due to the loop having no terminating condition, having one that can never be met, or one that causes the loop to start over. In older operating systems with cooperative multitasking, infinite loops normally caused the entire system to become unresponsive. With the now-prevalent preemptive multitasking model, infinite loops usually cause the program to consume all available processor time, but can usually be terminated by the user. Busy wait loops are also sometimes called "infinite loops". One possible cause of a computer "freezing" is an infinite loop; others include thrashing, deadlock, and access violations.
So long as the system is responsive, infinite loops can often be interrupted by sending a signal to the process (such as SIGINT in Unix), or an interrupt to the processor, causing the current process to be aborted. This can be done in a task manager, in a terminal with the Control-C command, or by using the kill command or system call. However, this does not always work, as the process may not be responding to signals or the processor may be in an uninterruptible state, such as in the Cyrix coma bug (caused by overlapping uninterruptible instructions in an instruction pipeline). In some cases other signals such as SIGKILL can work, as they do not require the process to be responsive, while in other cases the loop cannot be terminated short of system shutdown.
Q.Differentiate static permission inheritance and dynamic permission inheritance.5
Q.how we can overcome fragmentation ?5
Q. if a file is saved and than removes .. files remove but still link are active . now if you save a new file with the same name at same path what problem occur and how we can avoid this problem. 5.
Q.(a) How many bytes are contained within the physical memory?
(b) How large is the virtual address?
(c) What is the physical address that corresponds to virtual address 0x312?
(d) What is the physical address that corresponds to virtual address 0x1E9?
Solution
(a) Number of bytes in physical memory is equal to 2 ^(7 + 7) = 16K bytes. This is because 12 bits are required to address physical memory location out of which 3 bits are to refer frame no. within page table + 2 bits to locate page from segment and remaining 7 bits for offset with frame.
(b) The size of virtual memory is 2 ^ 20 ( 20 = 2 for segment index, + 3 for page table index + 3 for frame index in page table + 7 for frame number and 5 for offset within frame).
(c) 312 (Hex) = 001100010010 = 00(segment) in table number 3 (refer to the data in question at entry 0 in segment table then find page 3, in page 3 find 110 (6th entry) which is 78; that is 120 th frame then the offset with the frame is given by the last 7 bits 0010010.
Q.Describe the functionality of each line. (Marks 10)….
/*Parents code*/
Ssize-tread(int fd,void*buf,size-tcount)
1-close(pipe fd[1]);
2-n=strln(teststring);
3-nr=read(pipefd[0],buf,nA);
4-rc=write(1,buf,nr);
5-wait(&status);
6-printf(“Good work child!\n”);
7-return(0);
}
Ans . read() reads count bytes in buf from fd; then it closes the fd file descriptor on pipe ; strlen() returns length of teststring ; same as read did before; then write writes to buf ; wait() blocks the caller and terminates the child; print goodluck n return zero....